AI 비교하기AI 사용하기AI 최신정보AI 커뮤니티
Our VisionTermsPrivacyContact

Code2LoRA Framework for Evolving Codebase Context

Code2LoRA Framework for Evolving Codebase Context

HuggingFace
Saturday, June 6, 2026
  • •Code2LoRA generates repository-specific adapters for code LLMs using a hypernetwork framework to inject project-level context.
  • •The framework features a static mode and an evolution mode, the latter using a GRU to update adapters per commit.
  • •RepoPeftBench testing shows Code2LoRA-Evo achieving 74.1% exact match accuracy on 92 out-of-distribution repositories.
  • •Code2LoRA generates repository-specific adapters for code LLMs using a hypernetwork framework to inject project-level context.
  • •The framework features a static mode and an evolution mode, the latter using a GRU to update adapters per commit.
  • •RepoPeftBench testing shows Code2LoRA-Evo achieving 74.1% exact match accuracy on 92 out-of-distribution repositories.

Researchers from the University of Waterloo introduced Code2LoRA, a hypernetwork framework that generates repository-specific LoRA adapters (small modules added to a frozen model to specialize its behavior without full retraining) to provide code language models with necessary context. By converting repository snapshots or commit streams directly into adapter weights, the framework eliminates inference-time token overhead typically required by RAG or extended prompt methods. Code2LoRA operates in two modes: Code2LoRA-Static, which processes a single repository state, and Code2LoRA-Evo, which uses a GRU hidden state (a type of recurrent unit that tracks sequences) to update the adapter incrementally as code evolves through commit diffs.

To benchmark these capabilities, the researchers developed RepoPeftBench, a dataset containing 604 Python repositories and thousands of assertion-completion tasks. In the static track, which includes 40K training and 12K test tasks, Code2LoRA-Static achieved 63.8% cross-repo and 66.2% in-repo exact match scores, matching the performance of per-repository LoRA training. The evolution track, consisting of 215K commit-derived training tasks and 87K test tasks, showed Code2LoRA-Evo reaching a 60.3% cross-repo exact match rate, representing a 5.2 percentage point improvement over a shared LoRA baseline. On a holdout set of 92 repositories outside the training distribution, Code2LoRA-Evo improved a Qwen2.5-Coder backbone from 44.6% to 74.1% exact match accuracy.

Researchers from the University of Waterloo introduced Code2LoRA, a hypernetwork framework that generates repository-specific LoRA adapters (small modules added to a frozen model to specialize its behavior without full retraining) to provide code language models with necessary context. By converting repository snapshots or commit streams directly into adapter weights, the framework eliminates inference-time token overhead typically required by RAG or extended prompt methods. Code2LoRA operates in two modes: Code2LoRA-Static, which processes a single repository state, and Code2LoRA-Evo, which uses a GRU hidden state (a type of recurrent unit that tracks sequences) to update the adapter incrementally as code evolves through commit diffs.

To benchmark these capabilities, the researchers developed RepoPeftBench, a dataset containing 604 Python repositories and thousands of assertion-completion tasks. In the static track, which includes 40K training and 12K test tasks, Code2LoRA-Static achieved 63.8% cross-repo and 66.2% in-repo exact match scores, matching the performance of per-repository LoRA training. The evolution track, consisting of 215K commit-derived training tasks and 87K test tasks, showed Code2LoRA-Evo reaching a 60.3% cross-repo exact match rate, representing a 5.2 percentage point improvement over a shared LoRA baseline. On a holdout set of 92 repositories outside the training distribution, Code2LoRA-Evo improved a Qwen2.5-Coder backbone from 44.6% to 74.1% exact match accuracy.

Read original (English)·Jun 6, 2026
#code2lora#lora#hypernetwork#repopeftbench#code llm#fine tuning