CWM: An Open-Weights LLM for Research on Code Generation with World
  Models
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.
68e57263975ac4c405ef1f60
FAIR CodeGen team
68e57263975ac4c405ef1f61
Quentin Carbonneaux
68e57263975ac4c405ef1f62
Gal Cohen
68e57263975ac4c405ef1f63
Jonas Gehring
68e57263975ac4c405ef1f64
Jacob Kahn
claimed_verified
2025-10-15T15:25:42.681Z
65f1eac292b7b4b9d59cb886
/avatars/e7adb8a06860663c828501460cc092ae.svg
Jacob Kahn
user
jacobkahn
68e57263975ac4c405ef1f65
Jannik Kossen
68e57263975ac4c405ef1f66
Felix Kreuk
68e57263975ac4c405ef1f67
Emily McMilin
68e57263975ac4c405ef1f68
Michel Meyer
68e57263975ac4c405ef1f69
Yuxiang Wei
68e57263975ac4c405ef1f6a
David Zhang
68e57263975ac4c405ef1f6b
Kunhao Zheng
68e57263975ac4c405ef1f6c
Jordi Armengol-Estapé
68e57263975ac4c405ef1f6d
Pedram Bashiri
68e57263975ac4c405ef1f6e
Maximilian Beck
68e57263975ac4c405ef1f6f
Pierre Chambon
68e57263975ac4c405ef1f70
Abhishek Charnalia
68e57263975ac4c405ef1f71
Chris Cummins
68e57263975ac4c405ef1f72
Juliette Decugis
68e57263975ac4c405ef1f73
Zacharias V. Fisches
68e57263975ac4c405ef1f74
François Fleuret
68e57263975ac4c405ef1f75
Fabian Gloeckle
68e57263975ac4c405ef1f76
Alex Gu
68e57263975ac4c405ef1f77
Michael Hassid
68e57263975ac4c405ef1f78
Daniel Haziza
68e57263975ac4c405ef1f79
Badr Youbi Idrissi
68e57263975ac4c405ef1f7a
Christian Keller
68e57263975ac4c405ef1f7b
Rahul Kindi
68e57263975ac4c405ef1f7c
Hugh Leather
68e57263975ac4c405ef1f7d
Gallil Maimon
68e57263975ac4c405ef1f7e
Aram Markosyan
68e57263975ac4c405ef1f7f
Francisco Massa
68e57263975ac4c405ef1f80
Pierre-Emmanuel Mazaré
68e57263975ac4c405ef1f81
Vegard Mella
68e57263975ac4c405ef1f82
Naila Murray
68e57263975ac4c405ef1f83
Keyur Muzumdar
68e57263975ac4c405ef1f84
Peter O'Hearn
68e57263975ac4c405ef1f85
Matteo Pagliardini
68e57263975ac4c405ef1f86
Dmitrii Pedchenko
68e57263975ac4c405ef1f87
Tal Remez
68e57263975ac4c405ef1f88
Volker Seeker
68e57263975ac4c405ef1f89
Marco Selvi
68e57263975ac4c405ef1f8a
Oren Sultan
68e57263975ac4c405ef1f8b
Sida Wang
68e57263975ac4c405ef1f8c
Luca Wehrstedt
68e57263975ac4c405ef1f8d
Ori Yoran
68e57263975ac4c405ef1f8e
Lingming Zhang
68e57263975ac4c405ef1f8f
Taco Cohen
68e57263975ac4c405ef1f90
Yossi Adi
68e57263975ac4c405ef1f91
Gabriel Synnaeve
CWM: An Open-Weights LLM for Research on Code Generation with World
  Models
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.
Code World Model, a 32-billion-parameter LLM, enhances code generation through world modeling with observation-action trajectories and multi-task reasoning RL, offering strong performance on coding and math tasks.
Code World Model LLM observation-action trajectories Python interpreter agentic Docker environments multi-task reasoning RL world modeling step-by-step simulation SWE-bench Verified LiveCodeBench Math-500 AIME 2024 decoder-only LLM context size pass@1 scores