AI State of the Art
SOTA/Post-Transformer Architectures/18 min
Section 73

Kimi Linear and Kimi K3: KDA, Linear Attention at Scale

Listen as a podcast →

From research paper to frontier model in nine months

In late October 2025, Moonshot AI (Beijing, maker of the Kimi chatbot) published a research paper: Kimi Linear. In mid-July 2026, the same team released Kimi K3: the first open model to reach 2.8 trillion parameters, with native vision and a one-million-token context window, built on the paper's mechanism. It is the most complete public demonstration that linear attention holds up at frontier scale.

Kimi Linear: An Expressive, Efficient Attention Architecture

KDA: Kimi Delta Attention

The heart of the matter is KDA (Kimi Delta Attention), a linear attention built on the delta rule (see the Gated DeltaNet lesson), with one distinctive feature: the diagonal gate.

Recap from the previous lesson: Gated DeltaNet erases-then-writes (delta rule) and decays its memory with a scalar gate, a single forgetting coefficient per token, uniform across the whole memory. KDA replaces that single coefficient with one coefficient per channel: each dimension of the memory forgets at its own pace. Some channels hold information for a long time (a proper name, an instruction), others empty quickly (passing details). Mathematically, this is a multiplication by a diagonal matrix, hence "diagonal gate", or fine-grained gating in the paper.

Why it matters

A linear layer's memory is small and precious. Uniform forgetting is wasteful: either you forget too fast (and lose durable information), or too slowly (and the memory saturates). Per-channel forgetting lets the model itself learn which dimensions serve as long-term memory and which serve as scratch space.

The 3:1 hybrid with MLA

A linear layer alone remains approximate at exact recall. Kimi Linear and Kimi K3 are therefore hybrid: roughly 3 KDA layers for every 1 full-attention layer of the MLA type (Multi-head Latent Attention, the compressed attention popularized by DeepSeek, see the MLA lesson). The KDA layers stream through the text at constant cost; the MLA layers, placed at regular intervals, give the model back exact access to any token in the context.

Architecture diagram in four boxes. On the left, two stacked blocks representing the model stack: at the bottom a block marked N times, containing in order a Norm, a KDA layer, a residual addition, a Norm, an MoE block and a second addition; above it a block marked 1 time, identical in structure but whose attention layer is marked MLA instead of KDA. On the right, two zoom-ins. At the top, the detail of the MoE block: a Router receives the input, produces a histogram of scores that selects some routed experts numbered 1, 2, 3 up to N r, whose weighted outputs are summed with those of shared experts numbered 1 to N s; a legend distinguishes Shared Expert in green from Routed Expert in blue. At the bottom, the detail of the KDA layer: Linear layers and convolutions produce the inputs, one of which passes through an L2 normalisation and several others through sigmoids, all feeding a Kimi Delta Attention box followed by a Norm, a multiplication by a gate and an output Linear layer.
The full architecture as it appears in the paper. On the left, the layer stack: the bottom block repeats N times with a KDA layer, the top one appears only once every four layers with an MLA layer, that is the 3-to-1 ratio described above. Top right, the detail of the MoE block present in every layer: a router picks a handful of routed experts, alongside shared experts that are always on. In K3 this is the block that holds 896 experts, only 16 of which work on any given token.Source : Kimi Linear paper, An Expressive, Efficient Attention Architecture (Moonshot AI), via Deep Paper

Numbers reported in the Kimi Linear paper, with an identical training recipe against a full-MLA model: better performance on all evaluated tasks, KV cache reduced by about 75%, and decoding up to 6× faster at a one-million-token context (6.3× in the paper's figure).

Two-panel figure. Panel (a): a scatter plot with decoding acceleration on the horizontal axis, graduated from 1x to 4x, and performance on the vertical axis. Six points are plotted, blue circles for the RULER benchmark at 128k and red stars for MMLU-Pro at 4k. On the left, at 1x acceleration, MLA scores 81.3 on RULER and 47.2 on MMLU-Pro. On the right, at roughly 4x acceleration, Kimi Linear scores 84.3 on RULER and GDN-H 80.5; on MMLU-Pro, Kimi Linear reaches 51.0 and GDN-H 47.9. Panel (b): curves of time per output token in milliseconds against decoding length from 4K to 1M. The green dashed MLA curve rises steeply to over 11 milliseconds at 1M, while the purple Kimi Linear curve and the GDN-H curve stay below 2 milliseconds. Red arrows mark gaps of 4.8x at 256K, 5.7x at 512K and 6.3x at 1M.
The numbers from the paragraph above, as the paper presents them. On the left, each model is placed by quality (higher is better) and decoding speed (further right is better): Kimi Linear is the only one that is both faster and better than the full-MLA baseline. On the right, the time taken to emit each token as context grows: the MLA curve takes off while the Kimi Linear curve stays almost flat, which is where the claimed 6.3x gap at one million tokens comes from.Source : Kimi Linear paper, An Expressive, Efficient Attention Architecture (figure 1, Moonshot AI), via alphaXiv

Kimi K3: scaling it up

K3 adds a series of efficiency building blocks on top of KDA:

  • Very sparse MoE: 2.8 T total parameters, but only 16 of 896 experts activated per token, via a recipe called Stable LatentMoE.
  • Attention Residuals (AttnRes): cross-layer shortcuts that selectively retrieve representations across depth instead of accumulating them uniformly, the technical report claims about 25% higher training efficiency for under 2% extra cost.
  • MXFP4 quantization: weights stored in 4 bits, which is what makes a model this size deployable.
Three panels aligned left to right, under a horizontal arrow running from Fixed, uniform to Learned, selective with Increasing expressiveness in the middle. Grey panel on the left, Standard Residuals: the formula h L equals the sum of 1 times v i, a histogram of six grey bars all the same height, and the caption fixed weight of 1.0 for all layers, no selectivity. Blue panel in the middle, Linear Attention (constant): the formula h L equals the sum of w i times v i with w i equal to 1, the same histogram of six equal bars, and a caption stating that standard residuals are equivalent to constant linear attention over depth. Green panel on the right, AttnRes (full softmax): the formula h L equals the sum of alpha i times v i, where alpha is a softmax, a histogram of six green bars of very unequal heights, and the caption input-dependent, learned weights, full selectivity. At the bottom, a yellow box notes that the residual stream has always been doing a form of attention over depth, just a very limited one, and that AttnRes simply upgrades it.
What AttnRes changes. In a standard Transformer, every layer adds its output to the residual stream with the same weight of 1: all earlier layers count equally, which is the flat histogram on the left. AttnRes replaces that uniform sum with learned, input-dependent weights, the uneven histogram on the right: a deep layer can go and fetch specifically what one earlier layer produced, instead of receiving a blend of all of them.Source : Vizuara AI Newsletter, Attention Residuals: Teaching transformers to choose which layers matter

Moonshot reports roughly 2.5× better overall scaling efficiency than Kimi K2: for the same compute budget, the model converts compute into capability more effectively. The weights are released as open source.

The full lineage

Linear attention (2020) → DeltaNet: parallelized delta rule (2024) → Gated DeltaNet: + scalar gate (NVIDIA, 2024, adopted by Qwen3-Next) → KDA: + diagonal gate (Kimi Linear, 2025) → Kimi K3: KDA at 2.8 T parameters (2026). Every link in the chain is public and documented.

Why it matters

Until 2025, linear attention was confined to research papers and mid-size models; doubt persisted about whether it would hold at very large scale. Kimi K3 largely settles that debate: a frontier, open, multimodal model with a million-token context, in which three quarters of the attention layers are linear. The trio "delta rule + diagonal gate + 3:1 hybrid" is becoming an industry standard, and the basic vocabulary for reading any recent technical document about hybrid architectures.

Key takeaways

  1. KDA = delta rule + per-channel forgetting (diagonal matrix), one notch finer than Gated DeltaNet's scalar gate.
  2. Kimi Linear/K3 = ~3:1 hybrid: KDA layers for speed, MLA layers for exact recall.
  3. Results: KV cache −75%, decoding up to ~6× faster at 1 M tokens, quality at or above full attention.
  4. Kimi K3 (July 2026, open source, 2.8 T parameters) proves the recipe holds at frontier scale.
Check your understanding0 / 4

1. What sets KDA apart from the Gated DeltaNet mechanism it derives from?

2. Why do Kimi Linear and Kimi K3 keep one full MLA attention layer for every three KDA layers, instead of going fully linear?

3. The paper reports decoding 4.8 times faster at 256,000 tokens, and 6.3 times faster at one million. Why does the gap grow with context length?

4. Kimi K3 boasts 2.8 trillion parameters, yet only 16 of 896 experts work on each token. What does this illustrate?