跳到正文
北京时间
原文
Cursor Blog· Sasha Rush·· 2026-03-27精选AI 评分72

Composer 2技术报告:面向智能体软件工程的代码模型训练

A technical report on Composer 2

AI 导读

本报告介绍了代码模型Composer 2的训练过程。该模型基于开源基础模型Kimi K2.5,通过两阶段训练:首先进行侧重代码的持续预训练以深化编码知识,随后在高度模拟真实Cursor环境的大规模强化学习中提升端到端智能体性能。在自建的真实任务评估集CursorBench上,Composer 2得分为61.3,较前代提升37%,与前沿模型性能相当。在公开基准SWE-bench Multilingual和Terminal-Bench上分别获得73.7和61.7分,并在保持高精度的同时实现了显著更低的推理成本。训练依托为Blackwell GPU定制的高效MoE训练内核、跨区域异步强化学习管道等大规模基础设施完成。

推荐理由

Cursor 把 Composer 2 的训练全流程摊开讲了,从 Kimi K2.5 继续预训练到大规模 RL,关键是 RL 在真实 Cursor 会话里跑,不是玩具环境。做 coding agent 的团队,这份报告值得逐段拆。

正文

We posted to the arXiv a technical report on the training of Composer 2, our coding model for agentic software engineering. The report covers the full training process, from continued pretraining on an open base model, Kimi K2.5, through large-scale reinforcement learning, with a focus on closely emulating the real Cursor environment.

Continued pretraining and RL

Composer 2 is trained in two phases: continued pretraining on a data mix that emphasizes code to deepen the base model's coding knowledge, followed by large-scale reinforcement learning to improve end-to-end agent performance. We find that reducing pretraining loss improves downstream RL performance, with better base knowledge reliably translating into a better agent.

Composer 2 RL training occurs in realistic Cursor sessions with the same tools and harness the deployed model uses, applied to a problem distribution that reflects the full range of what developers ask Composer to do. We find that RL training improves both average and best-of-K performance, suggesting the model is learning new solution paths rather than just concentrating on known ones.

Real-world evaluation with CursorBench

A core challenge in building coding models is that public benchmarks often don't reflect the work developers actually do. Tasks are over-specified, solutions are narrow, and the codebases are small.

We built CursorBench from real coding sessions by our engineering team. It includes tasks where the prompt is terse and ambiguous, and solutions require hundreds of lines of changes across many files. We use CursorBench throughout training and evaluation to keep the model aligned with real problems.

Performance

On CursorBench, Composer 2 scores 61.3, a 37% improvement over Composer 1.5 and competitive with the strongest frontier models. On public benchmarks, Composer 2 scores 73.7 on SWE-bench Multilingual and 61.7 on Terminal-Bench. It achieves this at significantly lower inference cost than comparable models, giving it a Pareto-optimal tradeoff between accuracy and cost for interactive developer workflows.

Composer 2 efficiency and quality on CursorBenchComposer 2 efficiency and quality on CursorBench

Composer 2 fast variant speed and cost compared to other modelsComposer 2 fast variant speed and cost compared to other models

Infrastructure

Training Composer 2 required substantial infrastructure development with custom low-precision kernels for efficient MoE training on Blackwell GPUs, a fully asynchronous RL pipeline spanning multiple regions, and Anyrun, our internal compute platform for running hundreds of thousands of sandboxed coding environments. The report covers the full stack, including our approach to weight synchronization, fault tolerance, and environment fidelity.

The report has much more detail on all of this, including ablations on the training recipe, our approach to agent behavior shaping, and the design of our evaluation suite.

Thank you to the teams behind Kimi K2.5, Ray, ThunderKittens, PyTorch, and the broader open-source community. We'd also like to thank Fireworks and Colfax for their collaboration and partnership.

Read the full technical report here.

来源:Cursor Blog · cursor.com