用开源程序自动生成训练环境,让小模型学会从零造软件。
MindForge: Teaching Small Language Models Whole-Life-Cycle Software Engineering via Source-Free Program Synthesis

- 将开源命令行程序转为只暴露可执行文件的训练环境,模拟真实开发全流程。
- 微调后模型在ProgramBench上通过率从37.98%提升至49.51%,超越多数大模型。
- 适用于想低成本提升代码生成、修复、跨语言等全周期能力的研究者与开发者。
编码代理在修改已有代码库的任务中已取得显著进展,如修复漏洞和实现功能。然而,从零构建完整程序仍是重大挑战:即使在ProgramBench上表现最前沿的模型也仅能解决不足1%的任务。一个关键障碍是缺乏覆盖整个软件工程生命周期的可扩展训练环境,现有环境构建框架仅聚焦于开发某一阶段。为此,我们提出MindForge,一种自动化流水线,将开源命令行程序转化为仅暴露编译后参考可执行文件及其文档的源码无感环境。利用MindForge,我们从与ProgramBench无关的仓库构建训练环境,并整理出以GLM-5.2为教师代理生成的高质量程序合成轨迹数据集。对Qwen3.6-27B进行微调后,其在ProgramBench上的平均测试通过率从37.98%提升至49.51%,达到远超自身规模的前沿模型水平。此外,该微调模型在全部七个未见过的软件工程基准上均优于基线模型,涵盖长时程仓库生成与转换、漏洞修复、功能实现及跨语言问题解决,绝对提升分别为:RepoZero-C2Rust 31.00点,DeepSWE 14.16点,NL2Repo-Bench(有/无测试)10.70/4.56点,SWE-bench Verified 5.04点,SWE-bench Pro 5.93点,SWE-bench Multilingual 5.22点,FeatBench 4.94点。
原文摘要 · Abstract (English)
Coding agents have made substantial progress on software engineering tasks that modify existing codebases, including bug fixing and feature implementation. However, constructing a complete program from scratch remains a major challenge: even the frontier models evaluated on ProgramBench fully resolve fewer than 1% of tasks. One obstacle is the lack of scalable training environments for this from-scratch setting, spanning the whole software engineering life cycle, as existing environment-construction frameworks focus only on a single phase in software development. To address this gap, we introduce MindForge, an automated pipeline that converts open-source command-line programs into source-free environments that expose only a compiled reference executable and its documentation. Using MindForge, we construct training environments from repositories disjoint from those in ProgramBench, and curate a high-quality data recipe consisting of program synthesis trajectories using GLM-5.2 as the teacher agent. Fine-tuning Qwen3.6-27B on these trajectories increases its ProgramBench average test pass rate from 37.98% to 49.51%, achieving performance comparable to substantially larger frontier models. Moreover, the fine-tuned model consistently improves over the base model across all seven unseen software engineering benchmarks, spanning long-horizon repository generation and translation, bug fixing, feature implementation, and cross-language issue resolution, with absolute gains of 31.00 points on RepoZero-C2Rust, 14.16 on DeepSWE, 10.70/4.56 on NL2Repo-Bench (with/without tests), 5.04 on SWE-bench Verified, 5.93 on SWE-bench Pro, 5.22 on SWE-bench Multilingual, and 4.94 on FeatBench.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。