SERA:軟體驗證的高效儲存庫代理
SERA: Soft-Verified Efficient Repository Agents
January 28, 2026
作者: Ethan Shen, Danny Tormoen, Saurabh Shah, Ali Farhadi, Tim Dettmers
cs.AI
摘要
開源程式碼代理模型理應具備相較閉源系統的根本優勢:它們能夠針對私有程式庫進行專項優化,將儲存庫特定資訊直接編碼至模型權重中。然而,訓練成本與複雜度使得此優勢長期停留於理論層面。我們的研究證明這種優勢現已具備實踐可行性。本文提出「軟驗證高效儲存庫代理」(SERA),這是一種高效的程式碼代理訓練方法,能快速且低成本地創建專用於私有程式庫的代理模型。僅透過監督式微調(SFT),SERA就在完全開源(開放數據、方法、程式碼)模型中實現了頂尖性能,同時達到如Devstral-Small-2等前沿開源權重模型的效能水平。相較於強化學習,SERA模型的創建成本降低26倍;與先前的合成數據方法相比,達到同等性能的成本降低57倍。我們提出的「軟驗證生成」(SVG)方法能從單一程式庫生成數千條訓練軌跡,結合成本效益優勢,使私有程式庫專項優化成爲可能。除儲存庫專項優化外,我們更將SVG應用於更大規模的程式庫集合,生成超過20萬條合成訓練軌跡。基於此數據集,我們針對程式碼代理訓練的擴展律、消融實驗及干擾因素進行了深入分析。總體而言,我們相信這項工作將大幅加速開源程式碼代理的研究進程,並展現開源模型在私有程式庫專項優化方面的優勢。我們將SERA作為Ai2「開源程式碼代理系列」的首個模型發布,同時開放全部程式碼、數據及與Claude Code的整合方案,以支持研究社群發展。
English
Open-weight coding agents should hold a fundamental advantage over closed-source systems: they can be specialized to private codebases, encoding repository-specific information directly in their weights. Yet the cost and complexity of training has kept this advantage theoretical. We show it is now practical. 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 only supervised finetuning (SFT), SERA achieves state-of-the-art results among fully open-source (open data, method, code) models while matching the performance of frontier 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. Our method, Soft Verified Generation (SVG), generates thousands of trajectories from a single code repository. Combined with cost-efficiency, this enables specialization to private codebases. Beyond repository specialization, we apply SVG to a larger corpus of codebases, generating over 200,000 synthetic trajectories. We use this 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 specialize 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.