Skip to content
HN On Hacker News ↗

SWE-1.7: Frontier Intelligence at a Fraction of the Cost

▲ 272 points 139 comments by mekpro 2mo ago HN discussion ↗

Pangram verdict · v3.3

We believe that this document is fully human-written

1 %

AI likelihood · overall

Human
100% human-written 0% AI-generated
SEGMENTS · HUMAN 5 of 5
SEGMENTS · AI 0 of 5
WORD COUNT 1,420
PEAK AI % 1% · §1
Analyzed
Jul 8
backend: pangram/v3.3
Segments scanned
5 windows
avg 284 words each
Distribution
100 / 0%
human / AI fraction
Verdict
Human
Pangram v3.3

Article text · 1,420 words · 5 segments analyzed

Human AI-generated
§1 Human · 1%

Ben Pan*, Carlo Baronio*, Rohan Choudhury, Eric Lu, Ryan Kim, Deniz Birlikci, TC Qin, Sam Lee, Fermi Ma, Allen Liu, Yang Liu, Sampriti Panda, Jacob Teo, Ray Wang, Gary Chang, Steven Cao, Silas Alberti*equal contribution07.08.26Today, we’re launching SWE-1.7, the most capable model we’ve trained so far. It reaches frontier-level intelligence at a much lower cost, advancing the cost-performance Pareto curve.SWE-1.7 is the result of broad improvements across our RL pipeline: better infrastructure, more stable training, higher-quality data, and new techniques for long-horizon tasks. Since SWE-1.7 was trained from a Kimi K2.7 base, which had already undergone extensive RL post-training, the large additional gains from our own training challenge the idea of a ‘post-training ceiling’ and suggest that RL can push capabilities much further than previously believed.At Cognition, we have been formulating and refining principles for good agentic software engineering both in evaluation, with FrontierCode1,2, and now in training, with SWE-1.7. Our model is particularly optimized for longer-horizon asynchronous tasks, an important component of high-quality software engineering.SWE-1.7 is available today in Devin (Web, Desktop, and CLI) via Cerebras at 1000 TPS. We encourage you to try it for yourself!Coding benchmark resultsPass rate (%) on agentic coding benchmarks.BenchmarkSWE-1.7Kimi K2.7 CodeGPT-5.5Opus 4.8Opus 4.7GLM-5.2Composer 2.5SWE-1.6FrontierCode 1.1 Main42.3%30.1%43.0%46.5%38.5%24.5%25.6%9.4%Terminal-Bench 2.181.5%72.7%84.2%86.9%83.0%81.0%76.0%39.7%SWE-Bench

§2 Human · 0%

Multilingual77.8%73.5%76.8%84.4%80.5%74.5%71.6%58.3%The rest of this post covers how we trained SWE-1.7: the infrastructure, algorithms, and data work behind our model. We cover four important components that stand out.Preserving entropy and stabilizing training: Long RL runs face two challenging problems: entropy collapse, and instability due to numerical drift between training and inference. We hunted down and addressed causes of each, which enabled training to keep improving well past where earlier runs stalled.Multi-cluster training and fault tolerance: RL doesn’t need all of its inference compute in one cluster. We trained on clusters across three continents, shipped weight updates through object storage, and built fault tolerance so that hardware failures never stalled the run.Curating high-quality data: We built an extensive data-quality pipeline that runs each task through automated execution tests, filters out tasks with low learning signal, and hardens tasks to prevent reward-hacking.Self-compaction for long-horizon tasks: The model learns to summarize its working state and resume from the summary, extending task horizons past the raw context window. We use an alternating length penalty to incentivize concise output without sacrificing correctness.Finally, we conclude by sharing some observations on interesting behavioral tendencies, such as careful exploration and concise reasoning, that the model acquired as a result of our training setup.Preserving Entropy and Stabilizing TrainingWe found training stability to be a key contributor to predictable improvement at scale.When training with asynchronous RL3, one of the most problematic issues we encountered was the KL divergence mismatch between inference and training4, since the trainer policy is usually different from the sampling policy. In the past, to correct for this (albeit at smaller scale), we used importance-sampling5 and quantization-aware training for low-precision rollouts in NVFP4 + experts routing replay6,7.Here we present additional interventions that become more important at larger scale.We find that top-p sampling8 contributes significantly to staving off entropy collapse9,10, where a strong model stops exploring and reward plateaus within a few hundred steps.Very low probability tokens are often part of trajectories that have gone off track or out of distribution.

§3 Human · 0%

These trajectories are likely to produce low reward, and properties of the softmax function lead to these tokens sharpening the token probability distribution. Indeed, suppose we have three tokens with logits x1>x2≫x3x_1>x_2\gg x_3 and probabilities pi=exiex1+ex2+ex3p_i = \frac{e^{x_i}}{e^{x_1} + e^{x_2} + e^{x_3}}, where token 3 is a low probability token that leads to low reward. If we sample token 3, the gradient of its logprob with respect to the logits x1,x2,x3x_1, x_2, x_3 is:∇logp3=∇log[ex3ex1+ex2+ex3]=[−p1−p2p1+p2]\nabla \log p_3=\nabla\log \left[\frac{e^{x_3}}{e^{x_1}+e^{x_2}+e^{x_3}}\right]= \begin{bmatrix} -p_1 \\ -p_2 \\ p_1+p_2 \end{bmatrix}and the policy gradient update to the logits is Δxi∝A^ ∇logp3\Delta x_i \propto \hat{A}\ \nabla \log p_3, where A^\hat{A} is the advantage of the sampled token. Since this trajectory earns low reward, A^<0\hat{A} < 0 and the updates areΔx1∝∣A^∣ p1,Δx2∝∣A^∣ p2,Δx3∝−∣A^∣ (p1+p2).\Delta x_1 \propto |\hat{A}| \, p_1, \qquad \Delta x_2 \propto |\hat{A}| \, p_2, \qquad \Delta x_3 \propto -|\hat{A}| \, (p_1+p_2).In these updates, x3x_3 is penalized, and x1x_1 grows more than x2x_2. Sampling x3x_3 therefore widens the lead of the already-dominant token, sharpening the distribution and decreasing entropy.

§4 Human · 0%

Top-pp sampling prevents these low probability tokens from being sampled and used as optimization targets in the first place!Policy entropy across trainingThis entropy-preservation effect makes top-pp sampling desirable in our rollouts. But naively implementing top-pp clearly increases the training-inference mismatch — the trainer computes probabilities as a selection from all tokens, while rollouts sample from the top-pp subset, so the distributions have higher divergence, leading to collapse after a small number of steps. Thus, we implement sampling distribution replay11, where we record a kept-set of tokens available for sampling at rollout time, and renormalize probabilities with those masks in the trainer. With this fix, our run’s entropy stays roughly constant over the course of training and inference-training divergence stays bounded.Training-inference mismatch across trainingAnother interesting result of using top-p sampling replay is a targeting of only tokens with p<top_p_thresholdp < \text{top\_p\_threshold}. Tokens with probability above the threshold have a keepset of size 1, so their renormalized probability distribution is a constant 1, and gradients are zeroed out. We found empirically that a large fraction of the tokens sampled by the model are above standard top-p thresholds, so they are excluded from the overall gradient computation. This reduces gradient noise and lets the optimization algorithm focus on the high-learning signal tokens in the trajectory.We also find benefits from using the Muon optimizer12 and eliminating non-deterministic operations in the trainer.Multi-cluster TrainingCognition is a fast-growing research lab entering an established landscape that is heavily compute-constrained. We aim to train trillion-parameter models, but today, large clusters with 10-100k chips on a single network fabric are a scarce resource. In contrast, smaller clusters around the world are abundant, if used together correctly.In this setting, the structure of RL works in our favor. RL decomposes naturally across multiple clusters. Only the trainer must live on a single high-bandwidth cluster. The inference engines that generate rollouts are self-contained. They can run anywhere and need nothing but the current weights.We invested in infrastructure that makes use of this property. Our RL training spans four datacenters across three continents, combining our own GPUs across multiple clusters with additional compute from inference providers like Fireworks. The result is that we can scale RL training far beyond what any single cluster would allow.

§5 Human · 0%

TRAINER CLUSTER · USROLLOUT CLUSTERS · 3 CONTINENTSData bufferSTATEprompts in · scored data outRollout ManagerCONTROLcustom rollout generationsend init promptrecv scored datageneration requestssend train dataTrainerOPTIMIZEGPUGPUGPUGPUwrite Δ weightsXOR diff + zstdCloud storageSYNCpull Δ, apply in-placeDynamo routerInferenceSERVEGPUGPUInferenceSERVEGPUGPUSWE-1.7 RL training architecture. A single US trainer cluster streams compressed weight deltas through cloud storage to inference rollout clusters spread across three continents.The central challenge in this setup is keeping all inference engines up to date with the trainer weights after each optimizer step. We want these weight updates to be fast to reduce staleness of trajectories so we can train with more aggressive learning rates.Naively broadcasting the full model from one cluster to another would be slow and inefficient. Instead, every K gradient steps, we compute and send a compressed weight delta between the current and previous weights, reducing the size of each transfer by over 99%13.Rather than streaming the weights directly from the trainer to every inference cluster, we use cloud object storage to maintain a single source of truth for weight versions. After the trainer uploads a new weight delta, the inference engines can be updated with almost no inference downtime. Each training run has a weight controller in each involved cluster that manages the run’s weight version lifecycle. The weight controller polls object storage for new manifests, which the trainer writes after each update. When it finds a new delta, it instructs workers to download their shards, which are then replicated across local disks using a tree broadcast. The same object storage also carries routing matrices and top-p masks from the inference engines back to the trainer.Each inference engine prefetches the delta into CPU memory while continuing to serve trajectories. Only once the delta is fully staged does the engine briefly pause to apply it in-place. Trajectories that are in-flight can simply continue on the new weights with their KV cache intact.With this approach, cross-continental weight updates for a 1T parameter model complete in 1–2 minutes end-to-end. This happens asynchronously and blocks neither training nor inference beyond 3–4 seconds of inference pause at update.