320亿参数开源模型CWM,用环境交互提升代码生成的推理与规划能力。
CWM: An Open-Weights LLM for Research on Code Generation with World Models
- 在解释器与代理环境中用轨迹数据微调,构建可执行代码的世界模型
- 在SWE-bench上达65.8%通过率,数学和编程任务表现优异
- 适合研究智能体编程、代码推理与环境模拟的开发者与学者
我们发布代码世界模型(CWM),一个320亿参数的开源大语言模型,旨在推动基于世界模型的代码生成研究。为超越仅从静态代码中学习的能力,我们在大量来自Python解释器和代理式Docker环境的观察-动作轨迹上对CWM进行中段训练,并在可验证的编码、数学及多轮软件工程环境中开展广泛多任务强化学习。借助CWM,研究人员可探索世界模型如何通过推理与规划提升代码生成效果。我们展示了世界模型在智能体编程中的初步进展,包括逐步模拟Python代码执行,并揭示推理能力可从中获益。CWM是上下文长度达131,000标记的密集解码器模型。独立于世界建模能力,其在通用编码与数学任务上表现强劲:在SWE-bench Verified上达到65.8%的pass@1(含测试时缩放),在LiveCodeBench上为68.6%,在Math-500上为96.6%,在AIME 2024上为76.0%。为支持后续研究,我们公开了中段训练、监督微调和强化学习后的模型检查点。
原文摘要 · Abstract (English)
We release Code World Model (CWM), a 32-billion-parameter open-weights LLM, to advance research on code generation with world models. To improve code understanding beyond what can be learned from training on static code alone, we mid-train CWM on a large amount of observation-action trajectories from Python interpreter and agentic Docker environments, and perform extensive multi-task reasoning RL in verifiable coding, math, and multi-turn software engineering environments. With CWM, we provide a strong testbed for researchers to explore the opportunities world modeling affords for improving code generation with reasoning and planning in computational environments. We present first steps of how world models can benefit agentic coding, enable step-by-step simulation of Python code execution, and show early results of how reasoning can benefit from the latter. CWM is a dense, decoder-only LLM trained with a context size of up to 131k tokens. Independent of its world modeling capabilities, CWM offers strong performance on general coding and math tasks: it reaches pass@1 scores of 65.8% on SWE-bench Verified (with test-time scaling), 68.6% on LiveCodeBench, 96.6% on Math-500, and 76.0% on AIME 2024. To support further research on code world modeling, we release model checkpoints after mid-training, SFT, and RL.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。