Code2LoRA: Hypernetwork-Generated Adapters for Code Language Models under Software Evolution
Summary
Code2LoRA introduces a hypernetwork that generates LoRA adapters from a repository in a single forward pass, allowing frozen code LLMs to adapt to repository context without extra tokens, and supporting evolving codebases efficiently. It also delivers RepoPeftBench, a benchmark for repo-conditioned code modeling.
View Cached Full Text
Cached at: 06/05/26, 06:10 PM
Paper page - Code2LoRA: Hypernetwork-Generated Adapters for Code Language Models under Software Evolution
Source: https://huggingface.co/papers/2606.06492 Repository context is the bottleneck for code LLMs: every completion needs to know the project’s imports, APIs, and conventions, and today we pay for that context at every single query - through RAG, dependency analysis, or ever-longer prompts - or we fine-tune a LoRA per repo and watch it go stale on the next commit.
We ask a simple question: what if the repositoryitselfwere the prompt, but only once?Code2LoRAis a hypernetwork that reads a repo (or its stream of commits) and emits a LoRA adapter for a frozen code LLM in a single forward pass. The repo’s knowledge lives in the weights, and inference adds zero extra tokens.
It comes in two flavors.
- Code2LoRA-Staticsnapshots a repo into an adapter and, with no per-repo training, already matches the per-repository LoRA upper bound on in-repo eval and beats RAG / dependency-resolved-context / FFT+RAG cross-repo (+9.9pp EM).
- Code2LoRA-Evois the part we’re most excited about: a GRU walks the commit history and refreshes the adapter in O(1) per commit, so the model keeps up with active development instead of fighting it. On a strictly post-cutoff 92-repo OOD holdout — repos the encoder has never seen — Code2LoRA-Evo lifts a Qwen2.5-Coder backbone from 44.6% to 74.1% EM.
To make all of this measurable we also releaseRepoPeftBench: 604 Python repos, 62K static and 400K commit-derived assertion-completion tasks, with in-repo, cross-repo, and temporal-OOD splits. We hope it’s useful as a benchmark for repo-conditioned and evolution-aware code modeling beyond our own setup.
Code:https://anonymous.4open.science/r/code2lora-6857· Data & models: https://huggingface.co/code2lora
Similar Articles
@_akhaliq: Code2LoRA Hypernetwork-Generated Adapters for Code Language Models under Software Evolution
This paper introduces Code2LoRA, a hypernetwork-based method to generate adapters for code language models, addressing challenges under software evolution.
JumpLoRA: Sparse Adapters for Continual Learning in Large Language Models
JumpLoRA introduces a novel sparse adapter framework for continual learning in LLMs using JumpReLU gating to dynamically isolate task parameters and prevent catastrophic forgetting. The method enhances LoRA-based approaches and outperforms state-of-the-art continual learning methods like ELLA.
ReLoRA: Knowledge-Reusing Adaptation for Fast Rollout of Evolving LLM Services
ReLoRA is a knowledge-reusing adaptation framework that efficiently restores service-ready LoRA adapters for evolving LLM services, reducing time-to-readiness by up to 8.9× and improving accuracy by up to 4.6% through adaptive initialization and scheduled regularization.
Beyond LoRA: Is Sparsity-Induced Adaptation Better?
This paper proposes sparsity-induced adaptations to LoRA, including Cheap LoRA (cLA) and a chained circulant variant (c³LA), and provides theoretical generalization bounds along with empirical evaluations showing up to 10% training time reduction and 15% peak GPU memory savings while maintaining competitive performance.
Video2LoRA: Parametric Video Internalization for Vision-Language Models
This paper introduces Video2LoRA, a method that predicts Low-Rank Adaptation (LoRA) weights directly from video representations, enabling efficient video processing in frozen vision-language models. It reduces visual token load by up to 1500x and query TTFT by 6-80x while maintaining performance on video summarization and captioning benchmarks.