🤖 AI Hot

Kimi K2.5: How Agent Swarm Replaces Adam and Attention

A
Alex Chen

At GTC 2026, Moonshot AI CEO Yang Zhilin walked through the architecture of Kimi K2.5 and did something most AI CEOs do not do: he showed the actual component swaps. Not just benchmark numbers. Not a vague “we improved the training recipe.” Specific, named replacements for the foundations that every Transformer model has used for years.

Kimi K2.5 replaces three things. The Adam optimizer becomes MuonClip. Standard attention becomes Kimi Linear, a form of linear attention. Residual connections — the backbone of deep networks since ResNet — become something Moonshot calls Attention Residuals. And on top of all this sits Agent Swarm: up to 300 sub-agents running in parallel, coordinated to solve a single task.

This is not an incremental improvement. It is three architectural bets that each challenge a different piece of conventional wisdom about how to build large language models. And all of it is open source.

The three component swaps

MuonClip: replacing Adam

Adam has been the default optimizer for training large language models since the original GPT papers. It works reliably, converges well, and everyone uses it. Moonshot decided to replace it with MuonClip, an optimizer that builds on the Muon algorithm originally proposed by Keller Jordan.

The core idea behind Muon is that you can achieve faster convergence by operating on the gradient in a transformed space — specifically, by applying a Newton-Schulz iteration to approximate the matrix sign of the gradient before applying the update. MuonClip adds gradient clipping to this process, stabilizing training at large scales.

The practical result: models train faster and reach lower loss with the same compute budget. Yang presented training curves showing MuonClip outperforming Adam across multiple model scales. The improvement is not 2-3%; it is more like 15-20% better training efficiency, which at large scale translates to millions of dollars in compute savings.

The catch: MuonClip is more complex to implement than Adam. It requires the Newton-Schulz iteration, which adds non-trivial compute overhead per step. Moonshot clearly decided the convergence speed-up outweighs the per-step cost, but this is not a drop-in replacement — you need to tune it for your specific model and hardware setup.

Kimi Linear: replacing attention

Standard self-attention scales quadratically with sequence length. A 128K-token context means 16 billion pairwise interactions to compute. The industry has developed workarounds — flash attention, ring attention, sparse attention — but the quadratic wall is fundamental to the architecture.

Kimi Linear replaces standard attention with a linear-time alternative. The details are not fully public, but the pattern follows the broad family of linear attention mechanisms that approximate the softmax attention matrix as a product of lower-dimensional projections. Instead of computing all pairwise token interactions, you project keys and values into a fixed-size state space and update it incrementally.

What this enables: genuinely long context without the quadratic cost. Kimi K2.5 supports context windows that would be prohibitively expensive with standard attention. The 4.5x faster coding benchmark is partly a function of this — the model can process large codebases without the attention cost exploding.

The trade-off: linear attention is less expressive than full attention. It is a low-rank approximation, and some relationships that full attention would capture are lost. For most practical tasks, especially coding and document processing, the difference is negligible. For tasks that require fine-grained token-to-token reasoning across very long distances, standard attention still has an edge.

Attention Residuals: replacing residual connections

This is the most subtle change. Residual connections — where you add the input of a layer to its output — have been standard since ResNet in 2015. They solve the vanishing gradient problem and make deep networks trainable.

Moonshot’s Attention Residuals modify this pattern specifically for attention layers. Instead of a simple additive residual, they introduce a learned gating mechanism that controls how much of the original input passes through versus how much of the attended representation is used. It is a small architectural change with a specific motivation: in standard Transformers, residual connections can cause attention layers to “wash out” important information by adding it back indiscriminately. Attention Residuals let the model decide per-token and per-head how much residual to keep.

Yang’s presentation showed improved training stability and slightly better final performance, particularly on long-context tasks where residual noise accumulates over many layers. The improvement is smaller than MuonClip’s training efficiency gain, but it compounds: better residuals mean the other two innovations work better too.

Agent Swarm: 300 agents, one task

The live demo at GTC 2026 showed 300 sub-agents working on the same problem simultaneously. This is not a gimmick. It is a specific architecture choice that changes how the model approaches complex tasks.

Here is how it works. When you give Kimi K2.5 a task — say, “build a full-stack web application with user authentication, a database, and a REST API” — the model does not tackle it sequentially. It decomposes the task into subtasks, spawns sub-agents for each one, and coordinates their outputs. One agent handles the database schema. Another handles the authentication middleware. A third handles the frontend components. They work in parallel, and a coordinator agent merges the results.

The 4.5x speedup on coding tasks comes from this parallelism. Sequential execution means you wait for the database code before starting the API code before starting the frontend code. Parallel execution means they all run at once, and the coordinator resolves conflicts at the merge step.

The coordination is the hard part. Sub-agents can produce conflicting code — different variable names, incompatible function signatures, overlapping responsibilities. Moonshot’s solution involves a structured communication protocol between agents: each sub-agent declares its interfaces before writing implementation, and the coordinator resolves conflicts before the merge. It is not perfect — Yang acknowledged that complex multi-file refactors still sometimes produce merge conflicts — but the success rate on standard coding benchmarks is high enough to be practically useful.

This is different from the “voting” pattern where you run the same prompt through multiple models and pick the best answer. Agent Swarm splits the work into genuinely independent subtasks that would be wasteful to do sequentially. It is closer to how a human engineering team works: different people on different parts, with a tech lead integrating.

Why these three changes together

There is a logic to combining MuonClip, Kimi Linear, and Attention Residuals. They address three different bottlenecks:

  • MuonClip makes training cheaper and faster, which means Moonshot can train larger models or run more experiments with the same budget.
  • Kimi Linear makes inference cheaper at long context, which means the model can handle the large codebases and long documents that Agent Swarm generates.
  • Attention Residuals make deep networks more stable, which matters because Kimi K2.5 is a deep model — you need residuals to work reliably when you have dozens of layers.

Without Kimi Linear, Agent Swarm would be too expensive to run at scale — 300 agents each processing long contexts would blow up the attention cost. Without MuonClip, training a model capable of orchestrating 300 agents would be more expensive. The three changes are mutually reinforcing.

What it means for the open-source ecosystem

Kimi K2.5 is open source. The weights, the architecture, and the training methodology are publicly available. This matters because most of the architectural innovation in LLMs has come from closed labs — OpenAI, Anthropic, Google. Open models have largely been catching up on performance using variations of the same Transformer recipe.

Moonshot is betting that architectural innovation, not just scale, is a competitive advantage worth open-sourcing. The reasoning is probably strategic: if Kimi Linear and MuonClip become standard, Moonshot benefits from the ecosystem building on their stack. They get integration support, community improvements, and a talent pipeline of engineers who know their architecture.

The risk: a well-funded competitor takes MuonClip, scales it up with more compute, and beats Kimi at its own game. But that risk exists whether the architecture is open or not — competitors can read the paper either way. Open-sourcing the weights lets Moonshot build an ecosystem faster.

Who should care

ML engineers building training pipelines. MuonClip is the most immediately actionable piece. If you are training models at any scale, testing MuonClip against your current optimizer could save 15-20% on training costs. The implementation is non-trivial but well-documented.

Agent framework developers. Agent Swarm is the most interesting design pattern. If you are building multi-agent systems, the structured communication protocol — declare interfaces before implementing — is worth copying regardless of whether you use Kimi as the underlying model.

AI infrastructure teams. Kimi Linear matters if you handle long-context workloads. The quadratic attention wall is real, and linear attention is the most promising escape hatch. Even if you do not adopt Kimi Linear specifically, the direction is worth tracking.

Everyone else. You can try Kimi K2.5 for free at kimi.com. The open weights are on HuggingFace. It is a capable model that happens to use some genuinely novel architecture choices. Worth playing with even if you do not deploy it.

What I think

I find the architectural ambition more interesting than the benchmark scores. Most model releases are “we trained it bigger, here are the numbers.” Kimi K2.5 is “we built it differently, here is why.” That is rarer and more valuable for the field.

The open question is whether these three innovations generalize beyond Moonshot’s training setup. MuonClip works for them — does it work for every model scale and architecture? Kimi Linear is fast — does it lose important information that matters for tasks beyond coding? Attention Residuals help stability — do they help enough to justify the added complexity?

I suspect the answer to all three is “yes, with caveats.” MuonClip probably works for most large-scale training runs but needs per-setup tuning. Kimi Linear probably works for most practical tasks but has edge cases where full attention matters. Attention Residuals probably help marginally and are worth including if you are already touching the architecture.

The bigger story is that architectural innovation in LLMs is not dead. The Transformer was not the final form. There is room to replace its components with better alternatives, and those replacements compound. Kimi K2.5 is evidence that you can beat the standard recipe, not just with more GPUs, but with better ideas.

Sources: Yang Zhilin’s GTC 2026 keynote presentation; Kimi K2.5 official page at kimi.com; Y Build analysis of Kimi K2.5 architecture; LinkedIn analysis by Zack Tickman; timewell.jp breakdown of Moonshot’s scaling strategy; 345tool.com report on the three component swaps.

Disclosure: CarCare Guide is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you. Learn more.
A
Alex Chen