```SWE-1.7 达到接近 GPT 5.5 和 Opus 的智能水平```
SWE-1.7 Reach Near GPT 5.5 and Opus Intelligence

原始链接: https://cognition.com/blog/swe-1-7

Cognition 发布了 **SWE-1.7**,这是一款专为代理式软件工程设计的高性能、高性价比模型。SWE-1.7 基于 Kimi K2.7 构建,证明了强化学习(RL)能够显著提升模型能力,突破所谓的“训练后瓶颈”。 该模型擅长长跨度、异步的编码任务,在 FrontierCode 和 Terminal-Bench 等基准测试中达到了前沿水平。主要技术创新包括: * **训练稳定性:** 通过实施“采样分布回放”(sampling distribution replay)和 top-p 过滤,防止了熵崩溃,并最大限度地减少了训练与推理之间的差异。 * **可扩展基础设施:** 采用了一种创新的架构,利用跨越三大洲的全球多集群训练,将强化学习的规模扩展至远超单个数据中心的限制。 * **自我压缩:** 模型学会了总结其工作状态,使其能够管理长达六小时的任务,并通过交替长度惩罚保持推理过程的简洁。 * **数据质量:** 广泛的验证和防作弊措施确保了模型性能的高保真度和可信度。 在行为表现上,SWE-1.7 的特点是能够彻底探索代码库、深入调查根本原因,并具备精炼高效的思维链过程。SWE-1.7 现已通过 Cerebras 在 Devin 平台上线。

针对 Cognition 发布“SWE-1.7”一事,Hacker News 上的讨论持高度怀疑态度。尽管该公司声称其性能与 GPT-5.5 和 Opus 持平,但社区成员对自测基准测试的可靠性表示担忧。 讨论帖中的关键点包括: * **对基准测试的质疑:** 用户认为,像 Cognition 和 Cursor 这样的公司经常针对自身数据“过拟合”基准测试,从而导致性能声明虚高。 * **可信度担忧:** 许多评论者提到了 Cognition 此前充满争议的营销行为和以往“欺诈性”的演示,认为该公司优先考虑风投融资,而非透明的产品开发。 * **可用性问题:** 用户指出,该模型目前尚未在 Devin CLI 中提供,且尚不清楚它究竟是开源的,还是仅仅构建在开源权重模型 Kimi 之上。 * **效用参差不齐:** 虽然一些开发者认为将 Devin/Cognition 工具与其他模型结合使用来处理“繁重工作”有一定价值,但另一些人则认为,OpenAI 和 Anthropic 的闭源前沿模型在实际应用中仍优于这些专门的编程工具。 总体而言,社区态度谨慎,呼吁在接受该公司关于性能的声明之前,必须进行第三方验证并提高透明度。
相关文章

原文

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 contribution

07.08.26

Today, 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.6
FrontierCode 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 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.

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.

We 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. 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>x2x3x_1>x_2\gg x_3

logp3=log[ex3ex1+ex2+ex3]=[p1p2p1+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 ΔxiA^ logp3\Delta x_i \propto \hat{A}\ \nabla \log p_3

Δx1A^p1,Δx2A^p2,Δx3A^(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

Policy entropy across trainingLine chart of policy entropy across training: the SWE-1.7 recipe holds entropy roughly constant while the baseline decays steadily.

This 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 trainingLine chart of training-inference divergence across training steps: with sampling distribution replay the divergence stays bounded, while the naive top-p implementation diverges.

Another interesting result of using top-p sampling replay is a targeting of only tokens with p<top_p_thresholdp < \text{top\_p\_threshold}

We also find benefits from using the Muon optimizer12 and eliminating non-deterministic operations in the trainer.

Cognition 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.

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 routerInferenceSERVEGPUGPUInferenceSERVEGPUGPU
SWE-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.

At large scale, hardware failures occur continuously, and globally restarting on each failure makes long runs infeasible. Our architecture handles this differently depending on where the failure occurs — the inference engines or the trainer.

Failures on the inference side are cheap by construction. Engines are self-contained and hold no state beyond the current weights, so a dead engine costs only its in-flight sessions. We use NVIDIA Dynamo to manage the engine lifecycles and route inference: each agent sandbox has its own proxy that records tokens in and out, so if a replica goes down, we don’t lose the full trajectory, and Dynamo reroutes it to a different worker. When Dynamo reschedules the replica on healthy nodes, our weight controller loads the most recent checkpoint from object storage and replays a series of deltas from the checkpointed version.

The trainer is the one place where a failure is expensive: it’s the single tightly-coupled component, where one dead node stalls the whole cluster. To make recovery fast, each node checkpoints asynchronously to local disk every step and replicates its shards to peers, so a dead node’s state is rebuilt from replicas in seconds. If capacity is still missing, the run shrinks by whole data-parallel replicas and regrows once nodes return. Throughout this process, the rollout pipeline remains warm. After the trainer restarts, a buffer policy selects which accumulated rollouts to use and prevents bias from any imbalance in training-inference throughput during the interruption.

From the start, we built Devin for completing asynchronous, long-running tasks. SWE-1.7 is trained directly in the Devin harness, so naturally we want to train our own model on longer horizon tasks. This introduces two challenges. First, rollouts can extend far beyond the raw context window. Second, as shown by DeepSeek R114, RL on reasoning tasks tends to produce progressively longer responses, but we want the model to be efficient in its reasoning and only elaborate on difficult tasks.

We address these issues with training for self-compaction and an alternating length penalty.

Response length under the alternating length penaltyLine chart of mean response length across training under the two-phase length penalty. Length grows in unconstrained phases as the model thinks longer on harder tasks and compresses in budget phases on solved tasks.

Data is the core determining factor in what capabilities and skills our model learns. As such, we ensured that the data we trained on was calibrated and sufficiently difficult, and disincentivized undesirable behaviors to keep the model well-aligned. We focused most on the following aspects:

Due to extensive RL, SWE-1.7 exhibits noticeably different behavior from Kimi K2.7 Code, its base model. Firstly, it is significantly more aligned and trustworthy than K2.7 or other frontier open-source models. We expand on this extensively in our companion blog post, Measuring the Trustworthiness of Open-Source-Derived Models.

One behavioral difference we noticed in SWE-1.7 is condensed chain-of-thought. Compared to Kimi-K2.7-Code, SWE-1.7’s first chain-of-thought has a much lower function-word ratio (fraction of words that serve as grammatical “glue”) and nearly half the average number of words per sentence. We think this was influenced directly by the budget phases in our alternating length penalty. We’ve included a couple of examples of condensed chain-of-thought in the dropdown below.

The other major behavioral difference we observed is that SWE-1.7 explores the codebase much more thoroughly before acting, as you can see in the number of tool calls, file reads, and searches the model executes.

Behavioral tendencies on FrontierCode 1.1 MainBox plots of behavioral tendencies on FrontierCode 1.1 Main: SWE-1.7 makes substantially more tool calls, file reads, and greps/searches per run than Kimi-K2.7-Code, Opus 4.8, and GPT 5.5.

This shows up most clearly in bug-fixes. A bug report typically describes one primary symptom, but the underlying issue often affects a larger surface area. SWE-1.7 is much more likely to investigate the root cause of the bug and consider edge cases, hypotheticals, adversarial inputs, and beyond-the-ask requirements than Kimi-K2.7-Code. Through its enhanced codebase exploration, SWE-1.7 also does a much better job understanding the exact design decisions that need to be made. In addition, we’ve observed that SWE-1.7 tends to settle ambiguous semantics by experimenting and probing, for example by writing small Python scripts, rather than guessing.

How often the chain-of-thought probes edge cases and hidden requirementsBar chart on a log scale of how often the chain-of-thought probes edge cases, hypotheticals, adversarial inputs, and beyond-the-ask requirements on FrontierCode 1.1 Main. SWE-1.7 probes more than Kimi-K2.7-Code in every category except hypotheticals.

We believe these behaviors arise directly from the extensive quality-assurance measures we took to strip out false positives and false negatives in our data, forcing our model to come up with more complete, end-to-end solutions. We think that SWE-1.7’s increased due-diligence directly translates to higher performance on various benchmarks. We’ve attached a couple of example trajectories in the dropdown below.

The extra thinking comes at a small cost in increased change scope. As described in FrontierCode1, a good solution modifies only the minimal set of files needed, without touching unrelated code or introducing unnecessary refactors. Since SWE-1.7 reasons more, it also does more: writing additional test cases and touching more files than the task naively requires. We’ve noticed this trend consistently in models across the industry: as reasoning increases, the scope of files that the model touches also expands. This is an axis we’re excited to improve on.

  1. [1]E. Lu, B. Pan, D. Birlikci, S. Lee, R. Wang, R. Choudhury, F. Ma, TC Qin, C. Baronio, and S. Alberti, "Introducing FrontierCode," June 2026. cognition.com/blog/frontier-code
  2. [2]E. Lu, B. Pan, F. Ma, A. Lombardi, D. Birlikci, S. Lee, R. Wang, R. Choudhury, TC Qin, C. Baronio, J. Teo, J. H. Lee, and S. Alberti, "FrontierCode 1.1," July 7, 2026. cognition.com/blog/frontier-code-1.1
  3. [3]A. Piché et al., "PipelineRL: Faster On-policy Reinforcement Learning for Long Sequence Generation," arXiv:2509.19128, 2025.
  4. [4]F. Yao et al., "Your Efficient RL Framework Secretly Brings You Off-Policy RL Training," 2025. fengyao.notion.site/off-policy-rl
  5. [5]B. Pan, C. Baronio, A. Tam, P. Marsella, M. Jain, D. Chiu, Swyx, and S. Alberti, "Introducing SWE-grep and SWE-grep-mini: RL for Multi-Turn, Fast Context Retrieval," 2025. cognition.com/blog/swe-grep
  6. [6]"Stabilizing MoE Reinforcement Learning by Aligning Training and Inference Routers" (Rollout Routing Replay, R3), arXiv:2510.11370, 2025.
  7. [7]C. Baronio, B. Pan, S. Lee, E. Lu, S. Cao, R. Choudhury, A. Zweiger, R. Wang, G. Chang, and S. Alberti, "An Early Preview of SWE-1.6 and Research Update," March 2026. cognition.com/blog/swe-1-6-preview
  8. [8]A. Holtzman et al., "The Curious Case of Neural Text Degeneration," arXiv:1904.09751, 2019.
  9. [9]G. Cui et al., "The Entropy Mechanism of Reinforcement Learning for Reasoning Language Models," arXiv:2505.22617, 2025. arxiv.org/abs/2505.22617
  10. [10]S. Yu et al., "DAPO: An Open-Source LLM Reinforcement Learning System at Scale," arXiv:2503.14476, 2025. arxiv.org/abs/2503.14476
  11. [11]DeepSeek-AI, "DeepSeek-V3.2: Pushing the Frontier of Open Large Language Models," arXiv:2512.02556, 2025. arxiv.org/abs/2512.02556
  12. [12]K. Jordan et al., "Muon: An optimizer for hidden layers in neural networks," 2024. kellerjordan.github.io/posts/muon — see also J. Liu et al., "Muon is Scalable for LLM Training," arXiv:2502.16982, 2025.
  13. [13]Fireworks AI, "Frontier RL Is Cheaper Than You Think," 2026. fireworks.ai/blog/frontier-rl-is-cheaper-than-you-think
  14. [14]DeepSeek-AI, "DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning," arXiv:2501.12948, 2025. arxiv.org/abs/2501.12948
  15. [15]C. Baronio, P. Marsella, B. Pan, and S. Alberti, "Kevin-32B: Multi-Turn RL for Writing CUDA Kernels," 2025. cognition.com/blog/kevin-32b
  16. [16]Kimi Team, "Kimi K2.5: Visual agentic intelligence," arXiv:2602.02276, Feb. 2026. arxiv.org/abs/2602.02276
  17. [17]The Terminal-Bench Team, "Terminal-Bench: A Benchmark for AI Agents in Terminal Environments," 2025. tbench.ai
  18. [18]J. Yang et al., "SWE-smith: Scaling Data for Software Engineering Agents," arXiv:2504.21798, 2025. arxiv.org/abs/2504.21798 (SWE-bench Multilingual: swebench.com/multilingual)
联系我们 contact @ memedata.com