메뉴
HN
Hacker News • 15일 전

코그니션, SWE-2 코딩 모델 공개

IMP
8/10
핵심 요약

코그니션이 최신 코딩 모델 SWE-2를 공개했습니다. FrontierCode 1.1 Main에서 50.0%를 기록하며 Fable 5.1에 1점 차로 근접하면서도 64% 저렴합니다. 2.8조 파라미터 모델 Kimi K3를 기반으로 멀티트릴리언급 강화학습(RL)을 적용했으며, 단 한 번의 학습으로 모든 추론 노력 수준을 훈련하는 새 RL 알고리즘이 핵심입니다.

번역된 본문

오늘 우리는 지금까지 개발한 가장 진보된 코딩 모델인 SWE-2를 소개합니다. 이 모델은 능력과 비용의 파레토 프론티어를 확장하여, FrontierCode 1.1 Main에서 50.0%를 달성했으며 Fable 5.1과 1점 차이인 동시에 64% 더 저렴합니다. SWE-2에서 우리는 처음으로 RL(강화학습)을 수조 파라미터 수준으로 확장했으며, SWE-1.7 학습 인프라와 레시피를 기반으로 구축했습니다. 핵심 추가 사항은 단 한 번의 실행으로 모든 추론 노력(reasoning-effort) 수준을 학습하는 RL 알고리즘으로, 비용-성능 프론티어 전체를 발전시킵니다. 그 결과 프론티어에 가장 근접한 모델이 탄생했습니다.

FrontierCode 1.1 Main과 DeepSWE 1.1에서 SWE-2는 점수와 비용 모두에서 SWE-1.7과 Grok 4.6을 능가하며, GPT-5.6 Sol 및 Fable 5/5.1과 동등한 성능을 훨씬 낮은 가격에 제공하고, GPT-6 Astra에는 4분의 1 비용으로 몇 점 차이에 근접합니다. FrontierCode 리더보드에서 모델 순위를 확인해 보세요.

SWE-2는 에이전트 코딩을 위해 이미 광범위한 RL을 거친 2.8조 파라미터 모델인 Kimi K3를 사후 학습(post-training)한 것입니다. SWE-1.7과 마찬가지로 우리의 RL은 여전히 상당한 개선 여지를 찾아내어 많은 벤치마크에서 5-6점을 추가하고 K3의 비용-성능 프론티어 전체를 이동시켰습니다. 이 글의 나머지 부분에서는 SWE-2가 무엇을 다르게 하는지, 어떻게 학습했는지를 다룹니다. 먼저 SWE-2의 행동 특성, 특히 이전 모델보다 더 효율적이고 지능적으로 만드는 특징에 초점을 맞춥니다. 그다음 SWE-2 뒤의 사후 학습 발전 사항을 상세히 설명합니다.

비용 페널티. 단일 RL 실행에서 노력 수준별로 선형 비용 페널티를 적용하며, 각 페널티는 기반 모델의 파레토 프론티어 국부 기울기에 맞게 조정됩니다. 이 접근법은 모델의 전체 파레토 프론티어를 형태를 유지하며 발전시키고, 실제 사용자 비용을 학습에 최대한 직접 반영하도록 제1원리에서 도출되었습니다.

보상 베이스라인. SWE-1.6부터 사용해 온 길이 가중 보상 베이스라인을 유도하고, 이것이 학습을 크게 안정화하는 방식을 보여줍니다.

RL 롤아웃 서빙. 스케줄링을 개선하고 디코딩 처리량을 높이기 위해 온라인 드래프트 모델을 학습시켰습니다. NVFP4/FP8 커널과 양자화 인지 학습으로 전체 메모리 사용량을 줄였고, 파라미터가 거의 3배인 기반 모델을 사용하면서도 유사한 처리량에서 SWE-1.7보다 낮은 학습-추론 불일치를 달성했습니다.

학습 데이터. RL 환경 수를 3배로 늘리고, 지시 따르기(instruction-following) 오버레이를 추가했으며, SWE-2의 이전 체크포인트로 구동되는 플라이휠을 구축해 검증기(verifier)를 반복적으로 강화했습니다.

SWE-2는 오늘부터 Devin Desktop과 CLI에서 이용할 수 있습니다. Devin Web과 Fusion에도 순차적으로 배포 중입니다.

모델 행동. SWE-2의 지능과 효율성 향상은 긴밀히 연결되어 있습니다. 더 강한 엔지니어링 판단력으로 에이전트가 우회와 중복 읽기를 줄이면서 더 완전한 솔루션을 작성할 수 있습니다. FrontierCode 1.1 Main에서 SWE-2 medium은 SWE-1.7보다 높은 점수를 받으면서 턴 수는 58% 적고 평균 비용은 81% 낮습니다. 이전 글에서 우리는 SWE-1.7이 편집 전에 코드베이스를 철저히 탐색하는 매우 신중한 모습을 보인다고 언급했습니다. 성능은 높였지만, 이로 인해 SWE-1.7이 간단한 작업에서 과도하게 탐색하고 과도하게 생각한다는 사용자 피드백이 있었습니다. 이 면에서 고무적으로, SWE-2의 가장 큰 효율성 향상은 집중된 탐색에서 나옵니다. 더 높은 지능으로 모델이 작업에 실제로 중요한 코드베이스 부분을 판단할 수 있습니다. 이 덕분에 SWE-2는 더 빨리 구현을 시작합니다. FrontierCode 1.1 Main에서 SWE-2 medium은 중앙값 기준 18단계 만에 첫 실제 편집을 수행한 반면, SWE-1.7은 48단계가 필요했습니다.

SWE-2를 내부 테스트하면서 더 높은 모델 능력이 다음 행동 패턴으로도 나타나는 것을 관찰했습니다. 테스트 커버리지: SWE-2는 구현을 엔드투엔드로 검증하는 테스트를 더 잘 작성하여 회귀와 엣지 케이스를 더 확실하게 잡아냅니다. 사용자 경계 내에서의 자원 활용: 명백한 경로가 막혔을 때 SWE-2는 같은 답에 도달하는 다른 경로를 찾는 데 더 적극적입니다. 한 사례에서는 MCP 통...

원문 보기
원문 보기 (영어)
Today we’re introducing SWE-2, our most advanced coding model yet. It pushes the Pareto frontier of capability and cost, achieving 50.0% on FrontierCode 1.1 Main 1 , within one point of Fable 5.1 while being 64% cheaper. With SWE-2, we scaled RL to the multi-trillion-parameter regime for the first time, building on the SWE-1.7 2 training infrastructure and recipe. The key addition is an RL algorithm that trains all reasoning-effort levels in a single run, advancing the whole cost–performance frontier. The result is our closest model yet to the frontier. On FrontierCode 1.1 Main and DeepSWE 1.1, SWE-2 beats SWE-1.7 and Grok 4.6 on both score and cost, matches GPT-5.6 Sol and Fable 5/5.1 at a fraction of their price, and comes within a few points of GPT-6 Astra at a quarter of the cost. See how models rank on the FrontierCode leaderboard → SWE-2 is post-trained from Kimi K3 3 , a 2.8T-parameter model that had already undergone extensive RL for agentic coding. As with SWE-1.7, our RL still finds substantial headroom, adding 5–6 points on many benchmarks and shifting K3’s entire cost–performance frontier. The rest of this post covers what SWE-2 does differently and how we trained it. We begin with SWE-2’s behavior, focusing on the characteristics that make it more efficient and intelligent compared to our previous models. Then, we detail the post-training advances behind SWE-2: Cost penalties. We apply a linear cost penalty per effort level in a single RL run, with each penalty tuned to the local slope of the base model’s Pareto frontier. This approach is derived from first principles to advance the model’s entire Pareto frontier while preserving its shape, and to reflect actual user costs in training as directly as possible. Reward baselines. We derive the length-weighted reward baseline we have used since SWE-1.6 and show how it significantly stabilizes training. RL rollout serving. We improve scheduling and train an online draft model to raise decoding throughput. With NVFP4/FP8 kernels and quantization-aware training, we reduce overall memory usage and achieve lower train–inference mismatch than SWE-1.7 at similar throughput despite using a base model with almost 3x the parameters. Training data. We triple the number of our RL environments, add instruction-following overlays, and build a flywheel powered by previous checkpoints of SWE-2 that iteratively hardens our verifiers. SWE-2 is available starting today in Devin Desktop and CLI . We’re also rolling it out on Devin Web and Fusion . Model Behavior # SWE-2’s improvements in intelligence and efficiency are closely connected. Stronger engineering judgment allows the agent to write more complete solutions alongside fewer detours and redundant reads. On FrontierCode 1.1 Main, we see that SWE-2 medium scores higher than SWE-1.7 while taking 58% fewer turns and costing 81% less on average. In our previous post 2 , we observed SWE-1.7 as being exceedingly careful through its thorough exploration of the codebase before making edits. While boosting performance, this led to user feedback that SWE-1.7 tended to over-explore and overthink on simple tasks. Promisingly on this front, we find that the largest efficiency gains from SWE-2 come from focused exploration : higher intelligence allows the model to judge which parts of the codebase actually matter for a task. This allows SWE-2 to begin implementation sooner: on FrontierCode 1.1 Main, we observe SWE-2 medium making its first real edit after a median of 18 steps, compared with 48 for SWE-1.7. From testing SWE-2 internally, we observed that the higher model capabilities also manifested in the following behavioral patterns: Test coverage: SWE-2 is better at writing tests that check an implementation end-to-end, catching regressions and edge cases more reliably. Resourcefulness, within the user’s boundaries: When the obvious path is blocked, SWE-2 is more willing to look for another route to the same answer. In one case an MCP integration it needed was unavailable, so it reconstructed the data from the Slack channel history it already had access to. Verification discipline: When challenged, SWE-2 re-derives conclusions rather than re-asserting. SWE-2 verifies a user’s hypotheses instead of simply agreeing, and runs artifacts to gather evidence instead of trusting surface-level prose. The result is a model whose conclusions you can trust. We observe real behavioral differences between effort levels as well. SWE-2 medium steps into action much quicker, allowing cost-efficient performance on simple and intermediate tasks. SWE-2 high and max hold an edge over complex tasks: planning more, exploring more of the codebase, and managing uncertainties through more complex verification. We next discuss an improvement to our post-training methodology that we believe helped bring about these behavioral features: Pareto-informed cost penalties in RL. Pushing the Pareto Frontier with RL # As models become more intelligent and expensive, cost–performance tradeoffs grow increasingly important in the coding agent landscape. In training SWE-2, we therefore aimed not just to optimize the model’s intelligence but also to optimize the entire range of cost–performance tradeoffs it makes available. Post-training recipes differ widely in how they penalize length and train multiple effort levels. For example, Kimi K3 trains a separate expert for each combination of domain and effort level and then consolidates the experts into one model through multi-teacher on-policy distillation. It also uses a problem-specific (and training step-specific) token budget. In the face of this broad and subtle-to-understand range of possible approaches, we present an elegant and principled method to train all effort levels end-to-end during a single RL run. We accomplish this by using a cost-penalized reward function of the form R = S − λ e C , R=S-\lambda_e C, R = S − λ e ​ C , where S ∈ { 0 , 1 } S \in \{0,1\} S ∈ { 0 , 1 } denotes whether a rollout was successful, C C C denotes the cost of a rollout (a mix of inference cost in USD and rollout time), e e e denotes the effort level, and λ e \lambda_e λ e ​ is a parameter tuned to match the slope of the Pareto curve of the base model at effort level e e e . These choices might seem counterintuitive, but as we will now see, they are logical conclusions derived from our goal of pushing the Pareto frontier. Deriving the Cost Penalty # We next explain how we chose an RL objective R R R that directly optimizes the model’s cost–performance Pareto frontier. Here, “cost” refers to average cost and “performance” refers to solve rate, both averaged over a distribution D \mathcal D D of training tasks. Recall that points on the cost–performance plane depend on the task distribution’s average cost and average solve rate but otherwise do not depend on D \mathcal D D . Therefore, to align the RL objective with a model’s position in the plane, we want the expectation of R R R over D \mathcal D D to depend only on this average cost and solve rate. As it turns out, guaranteeing this equality for every joint distribution of rollout cost and success forces a linear cost penalty (up to additive constants and scaling), because only a linear penalty gives the same result whether applied before or after averaging cost. For the interested reader, we prove this claim rigorously in Appendix B . Now that we have our reward function R = S − λ e C R=S-\lambda_e C R = S − λ e ​ C , the final task is selecting λ e \lambda_e λ e ​ for each effort level. While setting λ e \lambda_e λ e ​ might at first feel like a hyperparameter optimization problem, it turns out that our goal of pushing the Pareto frontier upwards again dictates how we should make this choice. Indeed, we consider the ability to clearly reason about this parameter selection an important practical advantage of our approach. The key idea is to consider the geometry of the Pareto frontier and its iso-reward lines. To