Code2LoRA: Hypernetwork-Generated Adapters for Code Language Models under Software Evolution
English summary
Code2LoRA is a hypernetwork framework built on Qwen2.5-Coder-32B-Instruct that generates repository-specific LoRA adapters for code language models without adding token overhead at inference. It supports both static adaptation for stable codebases and evolving adaptation for actively changing ones, injecting repository context such as imports, APIs, and project conventions. The method was evaluated on RepoPeftBench, a benchmark of 604 Python repositories, where it achieved high accuracy on both tracks and outperformed traditional fine-tuning approaches. The code, model checkpoints, and datasets are publicly available.
Chinese summary
Code2LoRA是一个基于Qwen2.5-Coder-32B-Instruct的超网络框架,能为代码语言模型生成特定仓库的LoRA适配器,且推理时不增加token开销。该框架支持静态代码库的静态适配和活跃变化代码库的演进适配,可注入导入、API及项目约定等仓库上下文。在包含604个Python仓库的RepoPeftBench基准上,其静态与演进两个任务均取得高准确率,优于传统微调方法。代码、模型检查点及数据集均已公开。
Key points
A hypernetwork generates repository-specific LoRA adapters with no additional inference tokens.
超网络生成特定仓库的LoRA适配器,推理无额外token开销。
Dual adaptation modes: static for stable repositories and evolving for continuously updated codebases.
双适应模式:静态适配稳定仓库,演进适配持续更新的代码库。
Evaluated on the new RepoPeftBench benchmark of 604 Python repositories, outperforming traditional fine-tuning.
在包含604个Python仓库的RepoPeftBench新基准上评估,性能优于传统微调。
Full open-source release: code, model checkpoints, and datasets are available.
完全开源:提供代码、模型检查点和数据集。