AI 模型與程式代理
Cognition Launches SWE-2: Training Multiple Reasoning-Cost Levels in a Single Reinforcement Learning Run
Built on the 2.8T-parameter Kimi K3 base model, SWE-2 improves coding-agent efficiency through cost penalties, low-precision rollouts, and a draft model updated in sync with training. Official benchmarks show performance approaching that of frontier closed-source models, but the results were largely produced by Cognition itself, and neither a standalone API nor model weights are currently available.

Cognition released the SWE-2 coding-agent model on September 10, initially integrating it into Devin Desktop and the CLI, with staged rollouts for Web and Fusion. Rather than being a newly pretrained base model, SWE-2 is the result of continued post-training on Moonshot AI’s Kimi K3, a mixture-of-experts (MoE) model with 2.8T total parameters and 104B active parameters per token, a 1-million-token context window, and native vision capabilities.
The reinforcement learning objective is the most notable aspect of this release. Instead of training separate models for different reasoning intensities, Cognition uses `R = S − λₑC` within a single RL run: `S` indicates whether the task was completed successfully, `C` incorporates both inference cost and execution time, and `λₑ` is set for each effort level according to the local slope of the cost–solve-rate Pareto curve. The team also uses a reward baseline weighted by rollout length to reduce gradient variance and the KL divergence between the training and inference policies.
At the systems level, the scheduler briefly delays prefill to batch nearby requests. Cognition reports a 10% to 20% increase in per-GPU TPM and per-request TPS, at the cost of higher time to first token. Rollouts use DSpark speculative decoding, while the draft model continuously tracks the evolving policy during training to prevent acceptance lengths from gradually declining. MoE rollouts combine NVFP4, FP8, and quantization-aware training, while the MLA Q, K, V, and score computations all use FP8.
Cognition reports that SWE-2 scores 50.0% on FrontierCode 1.1 Main and 73.0% on DeepSWE 1.1. Compared with SWE-1.7, medium mode uses 58% fewer steps and costs 81% less on average. However, when public results are unavailable, the comparison table substitutes results from Cognition’s internal harness and selects the best reasoning intensity for each model, so it is not yet a fully standardized third-party evaluation. Engineering teams should next examine latency, cost, and regression rates under real-world Devin workloads, as well as whether Cognition releases an API, reproducible evaluations, or more comprehensive safety data.