Cognition's New SWE-2 Coding Model Matches Premium AI at a Fraction of the Cost
Cognition has released SWE-2, its most advanced coding model yet, which achieves near-parity with premium competitors while cutting costs by nearly two-thirds. The model is built by post-training Moonshot AI's Kimi K3, a 2.8-trillion-parameter open model, using reinforcement learning (RL), a technique that trains AI systems through reward signals rather than direct supervision. SWE-2 scores 50.0% on FrontierCode 1.1 Main, placing it within 1 point of Fable 5.1 while costing 64% less to run.
What Makes SWE-2 Different From Cognition's Previous Models?
SWE-2 represents a significant leap from SWE-1.7, Cognition's prior coding model. The new version scales reinforcement learning to work with much larger base models, jumping from Kimi K2.7 to Kimi K3, which has nearly three times as many parameters. This scaling unlocked substantial performance gains, with Cognition reporting improvements of 5 to 6 points on most benchmarks. The model also introduces a new capability: selectable reasoning-effort levels, all trained in a single reinforcement learning run, giving users control over the speed-versus-accuracy tradeoff.
On practical efficiency metrics, SWE-2 medium outperforms its predecessor dramatically. When solving coding tasks on FrontierCode, it completes problems in 58% fewer turns while costing 81% less than SWE-1.7. The model also makes its first meaningful code edit much faster, reaching that milestone after a median of 18 steps compared to 48 steps for SWE-1.7. This efficiency gain matters for developers and enterprises paying per inference, as it reduces both time and computational expense.
How Does SWE-2 Achieve Better Performance at Lower Cost?
Cognition's engineering team implemented several technical innovations to optimize the model's cost-to-performance ratio. The core innovation involves what the company calls "Pareto-informed cost penalties," a mathematical approach that ensures the reinforcement learning objective aligns with real-world cost and success rates. By setting each effort level's penalty to match the slope of the base model's performance curve, the team ensures that training improvements translate directly to better cost-performance tradeoffs.
Beyond the reward structure, Cognition made infrastructure improvements that reduce computational overhead:
- Prefill Delaying: A batching technique that increases throughput per GPU by 10 to 20%, allowing the system to process more requests simultaneously without sacrificing individual response speed.
- Speculative Decoding: Uses a smaller draft model to predict tokens, then verifies them with the full model, reducing the number of full model calls needed and achieving 15% longer accept lengths.
- Quantization: Applies NVFP4 and FP8 kernels with quantization-aware training to reduce memory usage and keep the gap between training and inference behavior minimal.
The team also expanded the training data significantly, tripling the number of reinforcement learning environments and adding instruction-following overlays to improve the model's ability to follow complex directives.
Where Can You Actually Use SWE-2?
An important caveat: SWE-2 is not available as an open-source model or through a standalone API. Instead, it runs exclusively within Devin, Cognition's AI coding agent. Currently, the model is available in Devin Desktop and the command-line interface (CLI), with Devin Web and Fusion rolling out in the coming weeks. For users with paid Devin subscriptions, SWE-2 is available free through October 10, 2026.
This closed deployment strategy differs from how many AI labs release models, but it allows Cognition to maintain tight control over how SWE-2 is used and to gather feedback from real-world coding tasks to improve future versions.
How Does SWE-2 Compare to Other Leading Coding Models?
Cognition published benchmark results comparing SWE-2 against several competitors, including Kimi K3, Grok 4.6, Fable 5.1, GPT-5.6 Sol, and GPT-6 Astra. On FrontierCode 1.1 Main, SWE-2 scores 50.0%, placing it within 1 point of Fable 5.1 and ahead of most other models tested. On Terminal-Bench 2.1, SWE-2 leads the field outright. The model comes within a few points of GPT-6 Astra, OpenAI's most advanced model, at roughly a quarter of the cost.
The one area where SWE-2 lags is Terminal-Bench 4, a more challenging benchmark where it trails Fable 5.1 and GPT-6 Astra by approximately 30 points. This suggests that while SWE-2 excels at typical coding tasks, it may struggle with the most complex or novel problems.
What Behavioral Improvements Does SWE-2 Show?
Beyond raw benchmark scores, Cognition observed three key behavioral improvements in SWE-2. First, the model demonstrates stronger end-to-end test coverage, meaning it writes tests that more thoroughly validate the code it produces. Second, it shows greater resourcefulness when a tool or API is unavailable, finding alternative approaches rather than giving up. Third, it exhibits what Cognition calls "verification discipline," re-deriving conclusions when challenged rather than simply reasserting them. This last behavior is particularly valuable for debugging, as it forces the model to think through its reasoning rather than relying on cached responses.
Cognition
Does SWE-2 Raise Any Safety or Bias Concerns?
Cognition reran two evaluations from its open-source trustworthiness study to assess SWE-2's behavior on sensitive topics. On 145 politically sensitive questions about China, SWE-2 passed 98.0% of tests overall, with 99.8% accuracy in English, 95.2% in Simplified Chinese, and 99.1% in Traditional Chinese. In a separate context-dependent vulnerability test, no particular framing of a question produced a statistically significant change in the model's behavior across any model tested, suggesting the model resists manipulation attempts.
These results suggest that SWE-2 maintains reasonable safeguards against bias and adversarial prompting, though like all AI systems, it is not immune to such issues.
Steps to Get Started With SWE-2
- Check Your Devin Subscription: Verify that you have a paid Devin subscription, as SWE-2 is available free for paid tiers through October 10, 2026, after which pricing may change.
- Access Through Devin Desktop or CLI: Launch Devin Desktop or use the command-line interface to access SWE-2; web and Fusion versions are rolling out and will be available soon.
- Select Your Reasoning Effort Level: Choose between low, medium, and high effort levels depending on your task complexity and time constraints; medium offers the best balance of speed and cost.
The release of SWE-2 signals a broader trend in AI development: as models grow larger and training techniques improve, the cost-to-performance ratio continues to improve, making advanced AI capabilities accessible to more developers and organizations. Cognition's focus on efficiency and real-world deployment through Devin suggests that the future of AI coding tools may prioritize practical usability over raw benchmark dominance.