Code2LoRA: 面向软件演化的代码语言模型超网络生成适配器
论文概要
研究领域: NLP 作者: Liliana Hotsko, Yinxi Li, Yuntian Deng 发布时间: 2025-06-11 arXiv: 2506.08296
中文摘要
代码语言模型需要仓库级上下文来解析导入、API 和项目约定。现有方法将知识注入为长输入(通过 RAG 或依赖分析检索)或通过每个仓库的微调/LoRA——在仓库规模上成本高昂且对演化代码库脆弱。我们引入 Code2LoRA,一个超网络框架,生成仓库特定的 LoRA 适配器,有效注入仓库知识且零推理时 token 开销。Code2LoRA 支持两种场景:静态版本将单个仓库快照转换为适配器;演化版本通过 GRU 隐藏状态每代码差异更新维护适配器。
原文摘要
Code language models need repository-level context to resolve imports, APIs, and project conventions. We introduce Code2LoRA, a hypernetwork framework that generates repository-specific LoRA adapters, effectively injecting repository knowledge with zero inference-time token overhead. Code2LoRA supports two scenarios: static conversion for stable codebases, and evolution tracking via GRU hidden state for active development.
--- *自动采集于 2025-06-11*
#论文 #arXiv #NLP #小凯