Table of Contents
Fetching ...

SERA: Soft-Verified Efficient Repository Agents

Ethan Shen, Danny Tormoen, Saurabh Shah, Ali Farhadi, Tim Dettmers

TL;DR

SERA tackles the cost and complexity barrier of training open-weight coding agents specialized to private codebases. It introduces Soft Verified Generation (SVG), a two-rollout, supervised-finetuning approach that forgoes heavy test infrastructures and reinforcement learning, enabling rapid, scalable data generation from individual repositories. Across SWE-bench Verified and targeted repository specialization, SERA achieves state-of-the-art open-source performance at a fraction of prior costs, and scaling laws show it can reach frontier performance with orders of magnitude less expenditure. The work emphasizes open science, reproducibility, and practical deployment, offering a pathway for small teams to build private-code assistants while detailing limitations and robustness considerations. Overall, SERA demonstrates that open-weight models can rival frontier systems for code tasks while dramatically expanding access and customization capabilities for private repositories.

Abstract

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.

SERA: Soft-Verified Efficient Repository Agents

TL;DR

SERA tackles the cost and complexity barrier of training open-weight coding agents specialized to private codebases. It introduces Soft Verified Generation (SVG), a two-rollout, supervised-finetuning approach that forgoes heavy test infrastructures and reinforcement learning, enabling rapid, scalable data generation from individual repositories. Across SWE-bench Verified and targeted repository specialization, SERA achieves state-of-the-art open-source performance at a fraction of prior costs, and scaling laws show it can reach frontier performance with orders of magnitude less expenditure. The work emphasizes open science, reproducibility, and practical deployment, offering a pathway for small teams to build private-code assistants while detailing limitations and robustness considerations. Overall, SERA demonstrates that open-weight models can rival frontier systems for code tasks while dramatically expanding access and customization capabilities for private repositories.

Abstract

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.
Paper Structure (47 sections, 10 equations, 6 figures, 19 tables)

This paper contains 47 sections, 10 equations, 6 figures, 19 tables.

Figures (6)

  • Figure 1: (a) Scaling and cost comparison of coding agent training approaches using self-hosted vLLM inference. (b) Repository specialization scaling law on Django, where $\alpha$ denotes the fraction of Django-specific data in the training mixture. With full specialization ($\alpha = 1.0$), the model matches teacher performance at 8k samples; general data alone ($\alpha = 0.0$) requires 25k samples -- a 3.5$\times$ advantage in sample efficiency.
  • Figure 2: Overview of SVG (Soft Verified Generation). In the first rollout, a teacher model is prompted to make a change starting from a randomly selected function, producing a trajectory and patch. This trajectory is converted into a synthetic pull request. In the second rollout, the teacher attempts to reproduce the patch given only the PR description. Soft verification compares the two patches using line-level recall for training data selection. We use $r \geq 0.5$ as an example threshold.
  • Figure 3: Scaling and cost comparison of coding agent training approaches. Top: API cost when using z.ai with cached input pricing. Bottom: vLLM cost when self-hosting the teacher model. Horizontal lines indicate the cost at which our scaling law predicts matching Devstral-Small-2 and GLM-4.5-Air performance. Exact data points are provided in Table \ref{['tab:scaling_data']}.
  • Figure 4: Scaling law for repository specialization on Django. The specialization ratio $\alpha$ denotes the fraction of Django-specific data in the training mixture, with the remainder being general coding data. Dashed horizontal lines show the performance of GLM-4.5-Air and Devstral-Small-2 on Django instances, with shaded regions indicating $\pm 1$ standard deviation. With full specialization ($\alpha = 1.0$), the student model matches teacher performance at approximately 8,000 samples, significantly outperforming training on general data alone ($\alpha = 0.0$). Specialization performance increases with the ratio of Django-specific data.
  • Figure 5: Verification analysis comparing soft and hard verification approaches. Scaling curves show SWE-bench Verified performance for different verification thresholds ($r = 0.0, 0.25, 0.75, 1.0$) on $\mathbf{T_2}$ trajectories alongside unverified $\mathbf{T_1}$ trajectories. All thresholds achieve similar performance at each scale, indicating that strict verification provides no significant benefit over soft or even unverified data.
  • ...and 1 more figures