Cognition launched SWE-2, a code-generation model post-trained from Kimi K3, a 2.8-trillion-parameter base, achieving 50.0% on FrontierCode 1.1 Main while costing 64% less than Fable 5.1 at the same score. The model introduces a reinforcement-learning approach that trains multiple effort levels in a single run, advancing the entire cost-performance frontier rather than optimizing for a single point.

SWE-2 is built on Kimi K3, which had already undergone extensive RL for agentic coding. Cognition's post-training adds 5–6 points on many benchmarks by applying a cost-penalized reward function that treats each effort level independently. The reward formula R=S−λeC penalizes cost linearly per effort level, with each penalty tuned to match the local slope of the base model's Pareto frontier. This approach is derived from first principles: only a linear penalty produces the same result whether applied before or after averaging cost, ensuring the RL objective aligns directly with the model's position in the cost-performance plane.

On FrontierCode 1.1 Main, SWE-2 medium scores 50.0% while taking 58% fewer turns and costing 81% less on average than SWE-1.7. The efficiency gains come from focused exploration: higher intelligence allows the model to judge which parts of the codebase matter for a task, enabling it to make its first real edit after a median of 18 steps compared with 48 for SWE-1.7. On DeepSWE 1.1, SWE-2 scores 73.0%, matching GPT-5.6 Sol at 72.7% while beating SWE-1.7's 37.7%. On Terminal-Bench 2.1, SWE-2 reaches 92.8% versus SWE-1.7's 81.5%.

The serving layer uses DSpark speculative decoding with a draft model trained using SpecForge during RL to track policy changes. Cognition uses NVFP4 and FP8 kernels with quantization-aware training to reduce memory usage and keep inference numerically close to training. A prefill delayer batches nearby requests, improving throughput per GPU by 10–20%, though at the cost of increased time to first token.

Training data scaled significantly: Cognition tripled the number of RL environments, added instruction-following overlays, and built a flywheel powered by previous SWE-2 checkpoints to iteratively harden verifiers and prevent reward hacking. The model also introduces a length-weighted reward baseline derived from first principles, which reduces gradient variance without extra cost and significantly stabilizes training by keeping inference-training KL divergence low.

The hard part is that SWE-2's cost advantage depends entirely on which effort level an architect chooses. SWE-2 medium is 81% cheaper than SWE-1.7 on FrontierCode 1.1 Main, but SWE-2 high and max require more planning and exploration on complex tasks, narrowing the cost gap. The model is available in Devin Desktop and CLI with rollout on Devin Web and Fusion, but the post carries no inference latency numbers, token limits, or pricing per token—only cost per task on specific benchmarks. Teams comparing SWE-2 to Fable 5.1 or GPT-Astra need to measure their own workload distribution across effort levels to know whether the Pareto gains translate to their use case.

For teams choosing between closed and open-weight code models, the takeaway is that scaling RL to the multi-trillion-parameter regime with principled cost penalties can match frontier performance at a fraction of the price, but only if your task distribution aligns with the effort level where that advantage holds.