daVinci-Dev: Agent-native Mid-training for Software Engineering
Ji Zeng, Dayuan Fu, Tiantian Mi, Zhuang Yumin, Yaxing Huang, Xuefeng Li, Lyumanshan Ye, Muhang Xie, Qishuo Hua, Zhen Huang, Mohan Jiang, Hanning Wang, Shijie Xia, Yang Xiao, Jie Sun, Yunze Wu, Pengfei Liu
Overview
daVinci-Dev: Agent-native Mid-training for Software Engineering

Key moments
- 0:00 Introduction and the core bet on mid-training
- 2:00 Defining agent-native data and pull request reconstruction
- 4:00 Environmental trajectories and pipeline rigor
- 6:00 Evaluation results and SWE-bench performance
- 8:00 Mechanisms, information density, and generalization
- 10:00 Open sourcing and audience Q&A on Docker environments
- 12:00 Discussion on generalization settings and conclusion
Overview
daVinci-Dev: Agent-native Mid-training for Software Engineering
Speakers: Ji Zeng; Dayuan Fu; Tiantian Mi; Zhuang Yumin; Yaxing Huang; Xuefeng Li; Lyumanshan Ye; Muhang Xie; Qishuo Hua; Zhen Huang; Mohan Jiang; Hanning Wang; Shijie Xia; Yang Xiao; Jie Sun; Yunze Wu; Pengfei Liu
Conference: ICML
YouTube: https://slideslive.com/39083527
This talk introduces daVinci-Dev, a novel agent-native mid-training paradigm designed to equip foundation models with the complex, interactive behaviors required for software engineering agents. Presented at ICML by Ji Zeng and collaborators from the Shanghai Innovation Institute, Shanghai Jiao Tong University, and the Generative AI Research Lab, the work addresses a fundamental distribution mismatch in machine learning for code: while modern coding agents operate within dynamic environments—navigating thousands of repository files, reading context, executing tests, and recovering from errors—base models are traditionally trained on static, finished-code artifacts.
The core contribution of this work is a shift in how foundational language models are prepared for downstream agentic tasks. By demonstrating that agentic coding skills must be structurally integrated during the mid-training phase rather than solely grafted on via post-training supervised fine-tuning (SFT) or reinforcement learning (RL), the authors establish a new state-of-the-art among open-source training recipes. Impressively, daVinci-Dev achieves these top-tier results while utilizing fewer than half the mid-training tokens of comparable systems, validating that information density and data distribution alignment are far more critical than brute-force token scaling.
Background
▶ Watch: Introduction and the core bet on mid-training (0:00)
In the systems and machine learning community, training models for software engineering has traditionally relied on predicting the next token across massive corpora of static code files. These corpora showcase the finished product—clean repositories, finalized functions, and pristine scripts—completely omitting the iterative trial-and-error process by which code is actually written. When deployed as interactive agents, however, models face an entirely different distribution: an open-loop or closed-loop environment where they must localize relevant files, examine code bases, edit files, execute test suites, analyze error traces, and revise their strategies when tests fail.
This creates a severe distribution mismatch between static pre-training data and interactive deployment trajectories. Historically, the machine learning community has attempted to bridge this gap exclusively through post-training interventions, such as SFT on finished trajectories or RL guided by test feedback. However, post-training can only refine the foundational capabilities already present in the base model. As highlighted by prior observations like Octo-Thinker, a weak base model invariably caps a system's performance ceiling before RL can even begin.
Relying solely on more static code files during pre-training or mid-training only amplifies the distribution mismatch. Consequently, the central question for systems builders is not whether to execute mid-training, but precisely what data to mid-train on. daVinci-Dev resolves this by defining an agent-native data supervision strategy that preserves both the complete information flow of software development and the dynamic feedback loops of executable environments.
Key Findings
▶ Watch: Environmental trajectories and pipeline rigor (4:00)
The primary finding of daVinci-Dev is that baking agent-native data into the mid-training phase dramatically enhances both sample efficiency and downstream performance. Evaluated on SWE-bench Verified, the daVinci-Dev model achieves scores of 56.1 at the 32B scale and 58.5 at the 72B scale, establishing the highest performance among open training recipes using agentic scaffolds at equivalent model sizes.
Crucially, these results were achieved while initializing from non-coder base models—specifically Qwen-2.5-Base (at 32B and 72B parameters)—which are deliberately harder starting points than dedicated code-specialized variants. Furthermore, daVinci-Dev accomplished this using just 73 billion mid-training tokens, representing more than a 50% reduction compared to previous best open mid-training recipes like Kimi-Dev (which utilized 150 billion tokens).
Additional key findings include:
- Consistent Scaling Gains: Across multiple SFT regimes and model sizes, enabling agent-native mid-training consistently improved performance (e.g., boosting the 72B weak-SFT pass rate from 37% to 46%).
- Behavioral Improvements: The model demonstrated significantly better file localization. On the 32B model, the precision and recall of edited files both increased by approximately 10 points, while the total number of files read remained stable.
- Cross-Domain Generalization: Beyond software engineering benchmarks, daVinci-Dev exhibited consistent performance improvements on general coding benchmarks (HumanEval, EvalPlus) and scientific reasoning tasks (GPQA, SuperGPQA), despite never being explicitly trained on those domains.
- Log-Linear Scaling: Performance scales log-linearly with mid-training tokens, and with hundreds of millions of public GitHub pull requests available, the data supply remains far from plateauing.
Technical Deep Dive
▶ Watch: Evaluation results and SWE-bench performance (6:00)
The technical architecture of daVinci-Dev relies on two complementary data types that form the agent-native supervision pipeline: contextually native data and environmentally native trajectories.
1. Contextually Native Data (Type One)
Constructed from millions of raw GitHub pull requests, this data stream supplies the knowledge and structure of real software engineering work. Instead of slicing pull requests into isolated supervised tasks (such as a separate localization task followed by an editing task)—a common shortcut in prior work—daVinci-Dev bundles each pull request into a single end-to-end training sample.
- Contents: Each bundled sample includes the initial issue description, the context files an agent needs to read, and the exact patch that resolved the problem.
- Mechanism: Preserving the issue, context, and patch together maintains the complete information flow and problem-solving status, yielding an information-dense training signal that sits much closer to the deployment distribution. This component accounted for 686 billion tokens across diverse repositories and languages.
2. Environmentally Native Trajectories (Type Two)
While contextual data provides the "what to do," environmental trajectories supply the "how it feels to act"—capturing live dynamics that static reconstruction cannot provide.
- Execution Engine: Strong agents are executed inside real, executable Docker environments derived from real-world issues.
- Authenticity & Loss Masking: The system records complete, authentic runs and error traces. Crucially, unlike standard pipelines that apply loss masks to tool outputs or environment responses, daVinci-Dev does not mask any tokens in the trajectory. The model is trained token-by-token directly on the full environmental response, including raw Docker errors and feedback, utilizing 31 billion tokens of environmental data.
Experimental Setup & Results
▶ Watch: Open sourcing and audience Q&A on Docker environments (10:00)
The evaluation of daVinci-Dev was rigorously designed to test its generalization capabilities and ensure data purity:
- Base Models: Qwen-2.5-Base (32B and 72B parameter variants, deliberately chosen as non-coder base models).
- Decontamination: Strict data decontamination was enforced; every repository present in the evaluation benchmarks was completely removed from the training set.
- Baselines: Compared against leading open architectures, including Kimi-Dev, under identical base model and scaffolding conditions.
- Headline Metrics: Evaluated primarily on SWE-bench Verified, alongside general coding and reasoning suites.
Headline Results
| Model / Size | Base Initialization | Mid-Training Tokens | SWE-bench Verified Score |
| :--- | :--- | :--- | :--- |
| daVinci-Dev (32B) | Qwen-2.5-Base (32B) | 73 Billion | 56.1 |
| daVinci-Dev (72B) | Qwen-2.5-Base (72B) | 73 Billion | 58.5 |
| Kimi-Dev (Comparison) | Same Base | 150 Billion | Outperformed using <50% tokens |
Ablation Insights
An ablation study on the 72B model (without SFT) revealed the critical interdependence of the two data types:
- Training exclusively on environmental data yielded a score of 47 points.
- Adding contextually native data to the mid-training pipeline surged performance to 77 points.
This demonstrates that dynamic trajectories without structural code knowledge underperform; the contextual pull request data provides the necessary knowledge base that allows environmental feedback to be effectively leveraged.
Practical Implications
▶ Watch: Discussion on generalization settings and conclusion (12:00)
For infrastructure teams, model builders, and systems deployers, daVinci-Dev offers several actionable takeaways:
- Token Efficiency over Scale: Practitioners do not need to burn 150+ billion tokens on generic code corpora to achieve state-of-the-art agentic performance. By restructuring training data to mirror real operational workflows (bundled pull requests and unmasked environmental traces), teams can achieve superior results with less than half the compute.
- Base Model Readiness: Mid-training acts as an essential bridge. Relying purely on post-training (SFT/RL) on weak base models establishes a hard ceiling. Injecting agent-native mid-training raises both sample efficiency and the ultimate achievable performance ceiling.
- Open-Source Accessibility: The authors have open-sourced the model checkpoints, a large portion of the training data, and the data-building pipeline itself. This enables engineering teams to construct their own domain-specific agentic mid-training corpora at scale, leveraging an unbounded supply of public GitHub pull requests.
Key Takeaways
- Agent-Native Mid-Training is Essential: Preparing models for software engineering requires building agentic skills directly into mid-training rather than relying solely on post-training SFT and RL.
- Pull Request Bundling Preserves Information Flow: Keeping issues, context files, and resolution patches together in a single training sample creates high-information-density data that aligns with real deployment distributions.
- Unmasked Environment Dynamics: Training models end-to-end on full, unmasked Docker execution traces—including actual error outputs—teaches models how to interpret and react to interactive feedback loops.
- Unprecedented Token Efficiency: daVinci-Dev achieves state-of-the-art results on SWE-bench Verified (56.1 at 32B; 58.5 at 72B) using fewer than half the mid-training tokens of prior open recipes (73B vs. 150B tokens).
- Robust Generalization: The training recipe yields consistent performance improvements not only in software engineering benchmarks but also in general coding (HumanEval) and scientific reasoning (GPQA).
- Open-Source Availability: Checkpoints, datasets, and construction pipelines are fully open-sourced, offering an extensible foundation for the ML systems community.
About the Speaker(s)
Authors: Ji Zeng, Dayuan Fu, Tiantian Mi, Zhuang Yumin, Yaxing Huang, Xuefeng Li, Lyumanshan Ye, Muhang Xie, Qishuo Hua, Zhen Huang, Mohan Jiang, Hanning Wang, Shijie Xia, Yang Xiao, Jie Sun, Yunze Wu, Pengfei Liu.
Reviews
→ Top-rated talks at International Conference on Machine Learning 2026
All talks from International Conference on Machine Learning 2026