Paper Overview
- Field: NLP
- Authors: Liliana Hotsko, Yinxi Li, Yuntian Deng
- Published: 2026-06-04
- arXiv: 2606.06492
- Code2LoRA-Static: converts a single repository snapshot into an adapter, suitable for comprehension of stable codebases.
- Code2LoRA-Evo: maintains an adapter backed by a GRU hidden state updated per code diff, suitable for active development of evolving codebases.
- Static track: 40K training / 12K test assertion-completion tasks
- Evolution track: 215K training / 87K test commit tasks
- Static track: Code2LoRA-Static reaches 63.8% cross-repository and 66.2% in-repository exact match, on par with the per-repository LoRA upper bound.
- Evolution track: Code2LoRA-Evo achieves 60.3% cross-repository exact match, +5.2pp better than a single shared LoRA.
- Hypernetwork-generated LoRA adapters can encode repository knowledge without inference-time token overhead.
- GRU-based adapter maintenance enables tracking of evolving codebases across commits.
- RepoPeftBench provides a large-scale testbed for repository-level adaptation of code models.
Abstract
Code language models need repository-level context to resolve imports, APIs, and project conventions. Existing methods inject this knowledge as long inputs (retrieved through RAG or dependency analysis) or through per-repository fine-tuning and LoRA — costly at repository scale and brittle to evolving codebases. The authors introduce Code2LoRA, a hypernetwork framework that generates repository-specific LoRA adapters, effectively injecting repository knowledge with zero inference-time token overhead.
Code2LoRA supports two usage scenarios:
Benchmark and Results
To evaluate Code2LoRA, the authors built RepoPeftBench, a benchmark spanning 604 Python repositories:
Results:
Key Takeaways
*Auto-collected on 2026-06-07*