CWM: An Open-Weights LLM for Research on Code Generation with World Models
FAIR CodeGen team
Jade CopetQuentin CarbonneauxGal CohenJonas Gehring
Jacob Kahn
Jannik Kossen
Felix Kreuk
Emily McMilinMichel Meyer
Yuxiang WeiDavid Zhang +39 FAIR CodeGen team

Jade Copet
Quentin Carbonneaux
Gal Cohen
Jonas Gehring

Jacob Kahn

Jannik Kossen

Felix Kreuk

Emily McMilin
Michel Meyer

Yuxiang Wei
David Zhang
+51
Code World Model (CWM) is a 32B-parameter open-weights LLM designed to advance code generation research with world models. It is mid-trained on Python interpreter and agentic Docker trajectories, then fine-tuned via multi-task reinforcement learning on verifiable coding, math, and multi-turn software engineering tasks. CWM enables step-by-step simulation of Python execution and shows early evidence that world modeling can improve reasoning in agentic coding. It achieves strong results: pass@1 65.8% on SWE-bench Verified, 68.6% on LiveCodeBench, 96.6% on Math-500, and 76.0% on AIME 2024.

arXiv ·
· September 30, 2025