@Potatoloogs: Cursor trains Composer 2: Pre-training lets the model "learn knowledge", RL lets the model know "who it is" a) Why Cursor trains its own models Think of a model like a hard drive—it can only store a limited amount of information. Cursor cares about only one thing: software engineering, and only inside Cursor...
Summary
Detailed walkthrough of Cursor's approach to training Composer 2: using Kimi 2.5 as the base, learning code knowledge through large-scale intermediate training, then large-scale RL to teach the model to write correct code in real environments, and using self-summarization to handle long contexts.
View Cached Full Text
Cached at: 06/05/26, 11:13 AM
Cursor Training Composer 2: Pre-training lets the model “learn knowledge”, RL lets the model know “who it is”
a) Why Cursor trains its own model
Think of a model as a storage hard drive — it has limited capacity for information.
Cursor only cares about one thing: software engineering, and only within Cursor. By dedicating all weights to this single task, the result is: better performance and orders of magnitude lower inference cost (Composer is an order of magnitude cheaper than Opus and similar models).
Another ceiling: prompt engineering has a limit. To truly influence model behavior, you need fine-tuning to bake the behavior directly into the weights.
b) Composer 2 training approach: two axes in parallel
Base: Kimi 2.5 (1 trillion parameter MoE, 30B activated parameters).
Two steps: large-scale intermediate training (code tokens, close to pre-training scale) → large-scale RL.
Essential difference between intermediate training vs RL:
Intermediate training teaches the model “what code looks like” (next token prediction);
RL teaches the model “to write correct code”: the model takes direct actions within the Cursor harness, learning to use tools, navigate the environment, and distinguishing between “writing code” and “writing correct code”.
c) The essence of RL: telling the model “who you are”
After pre-training, the model has absorbed the full scope of human knowledge. When faced with a math problem, it doesn’t know “what kind of person” it is: an expert, or a student still learning?
RL’s role is to turn this dial: You are an expert, you must get things right.
SFT = knowledge transfer; RL = sharpening behavior.
Therefore, RL’s applicability goes far beyond “tasks with verifiable rewards”: even for summarization or style, you can use LLM as judge with clear rubrics to guide RL.
d) Core challenge of RL infrastructure: the environment must be as close to real production as possible
The most powerful RL environment is your own product, because that’s where the model will actually work.
A counterintuitive finding: the model can sense it’s in a fake environment and will adopt different behavior during RL training (it will “cheat”, learning tricks to get high scores in the simulated environment).
To solve this, Cursor built a complete virtual machine stack that can be quickly provisioned at scale (with the burst capacity to “give me 100,000 VMs right now”).
e) Key breakthrough for long-horizon Agents: training “self-summarization” into the RL loop
Two difficulties in long-horizon RL: i. Credit assignment becomes increasingly hard (the longer the trajectory, the harder to determine which steps were right/wrong); ii. Limited context window.
Cursor’s solution: train “self-summarization” directly into the RL loop.
The model jointly learns: to generate good summaries + to continue the task by following those summaries.
Result: the model nominally has a 200K context window, but in practice can handle millions of tokens — because it learns to summarize and restart the context when nearing capacity, while still continuing to complete the task.
Similar Articles
@srush_nlp: Talk: Training Composer https://youtube.com/watch?v=uTgqYeVxy2c… Overview of the methods that we use at Cursor to build…
Cursor shared the training methods for its self-developed programming model Composer 2, including large-scale continuous pre-training, long-range reinforcement learning, and an internal benchmark CursorBench, which brings the model's programming performance to a top level.
@FeitengLi: Asynchronous, Sparse, and the Fifth Decimal Place: Engineering Details of Cursor Training Composer 2 https://lattifai.com/zh/podcasts/SequoiaCapital/UDTr9yUnLUI…
This article delves into the technical details such as asynchronous and sparse methods used in Cursor training Composer 2 model, and provides a comprehensive analysis of the RL infrastructure.
How Cursor Router chooses the right model for the task (6 minute read)
Cursor explains how its Router uses a data-driven approach with the Compass complexity predictor to route developer tasks to the most appropriate AI model, achieving significant cost reductions while maintaining or improving user satisfaction.
Cursor Introduces Composer 2.5
Cursor released Composer 2.5, a major update to its AI coding assistant featuring improved intelligence, behavior, and training via targeted reinforcement learning and increased compute, built on Moonshot's Kimi K2.5.
@cursor_ai: Introducing Cursor Router, our intelligent model router that selects the right model for the task at hand. Router deliv…
Cursor AI introduced Cursor Router, an intelligent model router that selects the best model for each task, delivering frontier-quality results at 60% lower cost.