用低成本方法训练可适配私有代码库的开源编程代理,性能媲美顶尖闭源模型。
SERA: Soft-Verified Efficient Repository Agents
- 通过软验证生成技术,无需单元测试即可批量生成代码轨迹。
- 仅用监督微调即达开源模型领先水平,训练成本仅为强化学习的1/26。
- 适合想快速定制私有代码库智能助手的研究者与开发者。
开放权重的编程代理相比闭源系统具有根本优势:能针对私有代码库进行特化,将仓库信息直接编码于模型权重中。然而训练成本与复杂性长期使这一优势停留在理论阶段。我们提出软验证高效仓库代理(SERA),一种高效训练编程代理的方法,可快速廉价地创建专属于私有代码库的代理。利用软验证生成(SVG),我们从任意代码仓库生成数千条轨迹,无需单元测试。除仓库特化外,我们将SVG扩展至更大规模代码库集合,生成超20万条合成轨迹。仅通过监督微调(SFT),SERA在完全开源(数据、方法、代码)模型中表现领先,性能媲美开放权重模型Devstral-Small-2。构建SERA模型的成本比强化学习低26倍,比以往合成数据方法低57倍即可达到相当性能。我们使用该数据集对编程代理训练的缩放规律、消融实验与混淆因素进行了详细分析。总体而言,我们认为本工作将极大加速开源编程代理研究,并凸显可适配私有代码库的开源模型优势。我们发布SERA作为艾伦人工智能研究院‘开放编程代理’系列首模型,附带全部代码、数据及Claude Code集成,支持研究社区。
原文摘要 · Abstract (English)
Open-weight coding agents should hold a fundamental advantage over closed-source systems because they can specialize to private codebases, encoding repository-specific information directly in their weights. Yet the cost and complexity of training has kept this advantage theoretical until now. We present Soft-Verified Efficient Repository Agents (SERA), an efficient method for training coding agents that enables the rapid and cheap creation of agents specialized to private codebases. Using Soft Verified Generation (SVG), we generate thousands of trajectories from any code repository, without requiring unit tests. Beyond repository specialization, we apply SVG to a larger corpus of codebases, generating 200,000+ synthetic trajectories. Using only supervised finetuning (SFT), SERA achieves leading results among fully open-source (open data, method, code) models while matching the performance of open-weight models like Devstral-Small-2. Creating SERA models is 26x cheaper than reinforcement learning and 57x cheaper than previous synthetic data methods to reach equivalent performance. We use our dataset to provide detailed analysis of scaling laws, ablations, and confounding factors for training coding agents. Overall, we believe our work will greatly accelerate research on open coding agents and showcase the advantage of open-source models that can adapt to private codebases. We release SERA as the first model in Ai2's Open Coding Agents series, along with all our code, data, and Claude Code integration to support the research community.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。