Cognition Unveils SWE-2 — a Cheap Coding Model on Par With the Leaders

Translated by a model; the original is in Russian.

· Artificial intelligence
Cognition's new model scores 50% on the FrontierCode 1.1 benchmark — almost matching Fable 5.1, but at 64% lower cost. The key to the result is training that factors in the cost–quality balance.

cover.svg

Cognition, the company known for the AI coding agent Devin, has released SWE-2 — its most advanced model for writing code. According to the developers, it shifts the frontier of the optimal price-to-quality ratio (the Pareto front): on the FrontierCode 1.1 Main benchmark, SWE-2 scores 50.0% — one point below Fable 5.1 (50.9%) — but costs 64% less. The model trails the leader, GPT-6 Astra (53.3%), by a few points while costing four times less.

SWE-2 was fine-tuned on top of the open model Kimi K3, which has 2.8 trillion parameters and has already undergone large-scale reinforcement learning for agentic programming. Even on top of such a base, the additional training added 5–6 points on many tests, according to Cognition.

Saving on Steps

The main efficiency gain comes not from brute force but from sounder engineering judgment. The previous version, SWE-1.7, was remembered by users for exploring code too meticulously before making edits and for “overdoing it” even on simple tasks. SWE-2 acts more selectively: it more quickly grasps which parts of a repository actually matter and gets down to business sooner. In medium mode, the model makes its first substantive edit on step 18 on average, versus step 48 for its predecessor, while spending 58% fewer steps and 81% less money.

Internal tests revealed other traits as well: the model writes better end-to-end tests, finds workarounds when the direct path is blocked (in one case it recovered inaccessible data from a Slack channel's history), and, when challenged, double-checks its conclusions rather than digging in.

One Run Instead of a Zoo of Variants

The main methodological innovation is “Pareto-oriented cost penalties” in reinforcement learning. Instead of training separate variants for each level of “effort,” Cognition trains all modes (medium, high, max) in a single run, adding to the reward a linear cost penalty tuned to the slope of the base model's Pareto curve. The authors derive this approach from first principles and prove mathematically that only a linear penalty yields the desired property.

Separate sections are devoted to a “length-weighted” baseline reward that stabilizes training, to speeding up generation through speculative decoding and low-precision computation (NVFP4/FP8), and to tripling the number of training environments. Cognition also tested the model for resilience to propaganda and censorship: on questions about politically sensitive topics, SWE-2 gave substantive answers 98% of the time.

SWE-2 is already available in Devin Desktop and the CLI, and the web-version rollout is ongoing.


Source: Hacker News

Comments

Sign in, to comment.

  • No comments yet.