AI练长项目,先造训练场
训练 AI 写代码,难点不在模型,在场地。这篇把真实代码仓库自动改造成「可验证的训练环境」:给 AI 一份语言规格,让它从零搭出整个项目,搭得对不对机器能自己判。关键在于它不满足于「能用就行」——环境本身会被一轮轮迭代优化,用及时、便宜的代理信号去挑出更有训练价值的场地,而不是等模型训完再回头评估。用这套场地训出的模型,在长程编码和真实生产任务上比不优化场地多涨了一截。它不是你明天能用上的东西,但指向一个变化:以后拼的不是模型多大,是谁能批量造出好训练场。
📄 原文摘要(英文)
Training coding agents for long-horizon tasks requires environments with verifiable feedback. Existing pipelines often follow a linear process that ends with validation, establishing usability but providing little guidance on improving training value. Recursive self-improvement (RSI) often requires model rollouts or model training followed by downstream evaluation, with costs and feedback delays amplified on long-horizon tasks. How can we use timely, reliable proxy signals to improve training value and synthesize environments at scale? We present RepoFactory, an automated pipeline that converts real repositories into verifiable environments where agents build complete projects from scratch given a language specification. Its Environment Evolution Loop optimizes a multiplicative objective combining validity, structural coupling, and implementation scope through proxy feedback. RepoFactory produces 10,159 environments across 17 software domains. Training Qwen3.5-35B-A3B on these environments yields RepoHorizen-35B-A3B, which achieves gains of 22.6 percentage points on NL2Repo-Bench and 8.5 points on average across five benchmarks covering long-horizon coding and agentic tasks in real-world production settings, compared with 17.5 and 6.4 points without environment evolution. These results highlight the training value of RepoFactory environments and the additional gains from the Environment Evolution Loop.