Back to paper library
Paper notesarXiv 2025

Kimi Linear

Forgetting, Channel by Channel

Original paper

Kimi Linear: An Expressive, Efficient Attention Architecture

Paper authors

Kimi Team · Yu Zhang · Zongyu Lin …

Show all 60 authors

Kimi Team · Yu Zhang · Zongyu Lin · Xingcheng Yao · Jiaxi Hu · Fanqing Meng · Chengyin Liu · Xin Men · Songlin Yang · Zhiyuan Li · Wentao Li · Enzhe Lu · Weizhou Liu · Yanru Chen · Weixin Xu · Longhui Yu · Yejie Wang · Yu Fan · Longguang Zhong · Enming Yuan · Dehao Zhang · Yizhi Zhang · T. Y. Liu · Haiming Wang · Shengjun Fang · Weiran He · Shaowei Liu · Yiwei Li · Jianlin Su · Jiezhong Qiu · Bo Pang · Junjie Yan · Zhejun Jiang · Weixiao Huang · Bohong Yin · Jiacheng You · Chu Wei · Zhengtao Wang · Chao Hong · Yutian Chen · Guanduo Chen · Yucheng Wang · Huabin Zheng · Feng Wang · Yibo Liu · Mengnan Dong · Zheng Zhang · Siyuan Pan · Wenhao Wu · Yuhao Wu · Longyu Guan · Jiawen Tao · Guohong Fu · Xinran Xu · Yuzhi Wang · Guokun Lai · Yuxin Wu · Xinyu Zhou · Zhilin Yang · Yulun Du

Publication
Publication venue not yet verified
First submitted to arXiv
arXiv:2510.26692
Cite this paper · BibTeX

The citation identifies the linked source version. It cites the original paper and its authors.

@misc{mambakimilinear2025,
  title = {{Kimi Linear: An Expressive, Efficient Attention Architecture}},
  author = {Kimi Team and Yu Zhang and Zongyu Lin and Xingcheng Yao and Jiaxi Hu and Fanqing Meng and Chengyin Liu and Xin Men and Songlin Yang and Zhiyuan Li and Wentao Li and Enzhe Lu and Weizhou Liu and Yanru Chen and Weixin Xu and Longhui Yu and Yejie Wang and Yu Fan and Longguang Zhong and Enming Yuan and Dehao Zhang and Yizhi Zhang and T. Y. Liu and Haiming Wang and Shengjun Fang and Weiran He and Shaowei Liu and Yiwei Li and Jianlin Su and Jiezhong Qiu and Bo Pang and Junjie Yan and Zhejun Jiang and Weixiao Huang and Bohong Yin and Jiacheng You and Chu Wei and Zhengtao Wang and Chao Hong and Yutian Chen and Guanduo Chen and Yucheng Wang and Huabin Zheng and Feng Wang and Yibo Liu and Mengnan Dong and Zheng Zhang and Siyuan Pan and Wenhao Wu and Yuhao Wu and Longyu Guan and Jiawen Tao and Guohong Fu and Xinran Xu and Yuzhi Wang and Guokun Lai and Yuxin Wu and Xinyu Zhou and Zhilin Yang and Yulun Du},
  year = {2025},
  eprint = {2510.26692},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.26692}
}
On this page

On October 29, 2025, MiniMax's head of pretraining published a post explaining why the company's new model, M2, went back to full attention. Models that mixed in linear attention looked just as good on small-scale evaluations, but once they were scaled up, multi-hop reasoning exposed their weaknesses. MiniMax, 2025-10-29

The next day, Moonshot AI uploaded this technical report. The first sentence of its abstract reads, “We introduce Kimi Linear, a hybrid linear attention architecture that, for the first time, outperforms full attention under fair comparisons across various scenarios—including short-context, long-context, and reinforcement learning (RL) scaling regimes.”

In the same week, two Chinese teams made opposite choices, each under the conditions of its own models and products.

Moonshot AI makes the Kimi chat assistant. Kimi K2, which it released in July of that year, is a 1T-parameter MoE model whose attention is MLA, proposed by DeepSeek. This report instead trains a model with 48B total parameters and 3B active per token to test a new attention design. The author list includes Songlin Yang, the first author of Gated DeltaNet.

Defining the Problem

The authors start from agents and reinforcement learning. At inference time, models have to handle very long trajectories, including logs of tool calls and repeated rounds of thinking and revision, and their outputs keep getting longer. Work like this is dominated by decoding, where the size of the KV cache and the time to generate each token directly determine the cost.

Switch to linear layers and the KV cache problem goes away, but new problems arrive. As tool logs stretch on and on, the fixed-size state has to compress more and more history, and by the time some detail needs to be recovered, it has often blurred. Mamba-2's gating and DeltaNet's delta rule both aim to improve this compression, but linear layers alone still aren't enough, so the industry began keeping a few full-attention layers among them.

This paper takes two angles, first making the linear layers' memory update finer-grained, and second checking, at a large enough scale and with thorough enough evaluations, whether such a hybrid can match or even exceed full attention in quality while genuinely saving inference cost.

Solving the Problem

KDA: Splitting the Decay Across Channels

The core module is called KDA (Kimi Delta Attention), and it takes Gated DeltaNet one step further. First, the Gated DeltaNet update:

St=αt(I−βtktkt⊤)St−1+βtktvt⊤S_t=\alpha_t\big(I-\beta_t k_t k_t^\top\big)S_{t-1}+\beta_t k_t v_t^\top

(Here we follow the notation of the Kimi Linear report: the state is dk×dvd_k\times d_v, so the matrices multiply from the left.)

αt\alpha_t is a scalar, so the memory of the whole head gets discounted together. KDA replaces it with a diagonal matrix:

St=(I−βtktkt⊤) Diag(αt) St−1+βtktvt⊤,αt∈[0,1]dkS_t=\big(I-\beta_t k_t k_t^\top\big)\,\text{Diag}(\alpha_t)\,S_{t-1}+\beta_t k_t v_t^\top,\qquad \alpha_t\in[0,1]^{d_k}

Each row of the state corresponds to one direction in key space, and now each direction has its own rate of forgetting. Some channels can remember for a long time, while others can be cleared quickly.

Let's get a feel for it with a tiny two-channel state:

Table: Illustration for this note. Only the forget-gate step Diag(αt)St−1\text{Diag}(\alpha_t)S_{t-1} is computed, before the delta-rule correction and the write.
State before updateScalar decay α=0.5\alpha=0.5Per-channel decay α=(1.0, 0.1)\alpha=(1.0,\ 0.1)
Channel 1: 848
Channel 2: 630.6

Suppose channel 1 holds information that will still be needed much later, and channel 2 holds content that has already gone stale. Scalar decay can only take 50% off both; the per-channel version can keep channel 1 and almost empty channel 2.

This kind of per-channel gate already appeared in GLA (Gated Linear Attention). KDA's work is to join it to the delta rule while keeping it efficient to train in parallel.

The authors write the transition matrix in a special “diagonal-plus-low-rank” (DPLR) form and design a dedicated chunkwise algorithm for it. Compared with the general DPLR formulation, it needs considerably less computation and stays closer to the original delta rule.

Other Components

Each head's inputs are produced as follows:

  • qq, kk: linear projection, short convolution, Swish, then L2 normalization to keep the eigenvalues stable.
  • vv: linear projection, short convolution, Swish.
  • α\alpha: first a low-rank projection (with rank equal to the head dimension), then a decay function similar to those of GDN and Mamba.
  • β\beta: linear projection plus sigmoid.

The output first goes through per-head RMSNorm, is then multiplied by a data-dependent sigmoid gate, and is finally projected back. The authors say this output gate also helps mitigate attention sinks.

A 3:1 Mix, and MLA Without Positional Encoding

The model follows the skeleton of Moonlight (Moonshot AI's earlier MoE model): each block is a token-mixing layer plus a feed-forward layer, and all of the feed-forward layers are MoE except the first, which is an ordinary dense one. Among the token-mixing layers, every 3 KDA layers are followed by 1 MLA layer. The authors chose to alternate whole layers rather than mix different heads within one layer, because it keeps the infrastructure simpler and training more stable.

The MLA layers also use no positional encoding at all (NoPE). Positional information and the bias toward “nearer matters more” are left entirely to the KDA layers. The authors regard KDA's decay itself as a kind of data-dependent positional encoding.

Working Out the Cache by Hand

According to the configuration file of Kimi-Linear-48B-A3B on Hugging Face, the model has 27 layers: 20 KDA and 7 MLA (the last layer is also MLA). Each MLA layer caches, per token, a 512-dimensional compressed vector plus a 64-dimensional positional part. With all 27 layers as MLA, each token would need 30.4 KiB, or 30.4 GiB for 1M tokens; Kimi Linear, with only 7 MLA layers, needs 7.9 KiB per token, a 74% saving. The 20 KDA layers' state is about 20 MiB, independent of length.

The share saved depends only on how many layers still keep a KV cache: 7/27 comes close to a quarter, which is where the paper's “up to 75%” comes from. This assumes that every MLA layer in both models caches the same 576 values, and it compares only the part that grows with length. Whether the 64-dimensional positional part in the config is actually cached under NoPE, and what precision the KDA state is really stored in, both depend on the inference engine's implementation; if neither side stores those 64 dimensions, the share saved stays the same.

Since MLA already compresses KV to a very small size, the absolute numbers here are much smaller than for earlier generations of models. KDA's 20 MiB of state is independent of context length.

Discussion

Choosing the Ratio

The authors first swept several KDA-to-MLA ratios using the smallest model tier from their scaling-law experiments (16 layers, 16 heads), with the same training compute for every version. The validation set was deliberately chosen to be high-quality text far from the pretraining distribution, to see how the models generalize under distribution shift.

Figure: Redrawn for this note from the validation perplexities in Table 1 of the paper. The paper is licensed under CC BY-NC-ND 4.0, so the original figure is not reproduced here.

The full numbers, including two additional component ablations:

Table: Excerpted from Table 1 of the paper.
SettingTraining perplexityValidation perplexity
3:19.235.65
0:1 (pure MLA)9.455.77
1:19.295.66
7:19.235.70
15:19.345.82
3:1, without output gate9.255.67
3:1, without convolution9.295.70

7:1 has the same training perplexity as 3:1, but its validation perplexity is noticeably worse; 1:1 is almost as good but costs more at inference. Pure MLA also clearly lags behind. In a 16-layer model, 15:1 leaves just one MLA layer, and its validation perplexity is the worst of the five ratios.

Compared with Jamba's 1:7 and the NVIDIA study's roughly 8% attention, the optimum here leans toward keeping more full attention. With different linear layers and different ways of evaluating, the answers differ.

Same Recipe, 1.4T Tokens

The main comparison uses three models: pure MLA, GDN-H (a hybrid in which KDA is replaced by Gated DeltaNet), and Kimi Linear. All three use the same data and training recipe and are trained on 1.4T tokens. A few results:

Table: Excerpted from Table 3 of the paper.
Base modelMLAGDN-HKimi Linear
MMLU71.672.273.8
MMLU-Pro47.247.951.0
BBH71.670.672.9
GSM8K83.781.783.9
EvalPlus59.563.160.2

Kimi Linear is highest on most items, with a few exceptions, losing to GDN-H on EvalPlus and tying MLA on MATH. After instruction tuning (Table 4), the picture is broadly the same; it doesn't win on LiveBench, MATH500, or EvalPlus.

Long-context evaluations at a 128K context, after each model's 1.4T-token pretraining (Table 5):

Table: Excerpted from Table 5 of the paper.
ModelRULERMRCRLongBench V2FramesEight-task average
MLA81.322.636.160.552.2
GDN-H80.523.932.658.751.2
Kimi Linear (RoPE)78.822.035.459.951.8
Kimi Linear84.329.635.058.854.5

Kimi Linear has the highest average, with clear leads on RULER and MRCR; on LongBench V2 and Frames, pure MLA does better. Another interesting comparison is Kimi Linear (RoPE), the same model with positional encoding added back to MLA: its long-context average actually drops to 51.8, which supports the design choice of “leaving position to KDA.”

Speed

All efficiency comparisons use the 48B setting, with the same number of layers and heads in all three models:

  • Prefill: on par with MLA from 4K to 16K; clearly faster from 128K on, 2.3 times faster at 512K and 2.9 times faster at 1M. KDA is almost exactly as fast as GDN-H, so per-channel decay adds no noticeable extra cost.
  • Decoding: with the batch size fixed at 1 (Figure 7b), Kimi Linear is about 2.3 times faster at a 1M context. Factoring in the larger batches that the smaller KV cache allows, the authors estimate a theoretical maximum of about 6.3 times (Figure 1b: 1.84 ms vs. 11.48 ms per output token).

The scaling-law experiments show that, under compute-optimal training, Kimi Linear's compute efficiency is about 1.16 times that of MLA. The authors also mention that the KDA side wasn't given hyperparameter tuning as careful as MLA's.

How to Read These Results

The conditions of this report's comparison are more rigorous than in many earlier hybrid-architecture papers: same data, same recipe, same scale, plus ablations. Still, a few things are worth keeping in mind when reading it:

  1. The baselines are self-trained. MLA and GDN-H are both baselines the authors trained with the same recipe, not external public models. In a commentary the day after the report came out, Benjamin Marie pointed out that a well-tuned full-attention baseline is missing, and that many of the scores also fall below Qwen3-8B, or even Qwen3-4B; he believes that “better than full attention” here means better than the particular setups the authors tried. The Kaitchup, 2025-10-31
  2. The scale is 48B total parameters, 3B active, and 1.4T tokens. The problem MiniMax described surfaced at larger scales and in more complex multi-hop reasoning; this report doesn't answer questions at that scale.
  3. The margins vary. Short-context gaps are mostly 1 to 4 points, and long-context results are a mix of wins and losses.

On Hacker News, someone asked what a “hybrid linear attention architecture” is, and a succinct reply said, “1/4 of their layers are conventional quadratic attention.” Hacker News, 2025-10-31

Conclusion

Kimi Linear contributes on three levels:

  1. KDA: it splits Gated DeltaNet's scalar decay down to each channel and comes with a matching chunkwise algorithm, running at about the same speed as GDN.
  2. A 3:1 layerwise hybrid with NoPE MLA: positional information is left entirely to KDA, and the KV cache shrinks by about three quarters.
  3. In fair comparisons controlled by the authors themselves, the 48B model beats pure MLA on most short-context, long-context, and reinforcement learning evaluations; decoding at a 1M context is about 2.3 times faster at batch size 1, with a theoretical maximum of about 6.3 times once larger batches are factored in.

When the report came out, whether “linear attention can replace most full-attention layers in large models” was still an open question; in the same week, MiniMax chose full attention for its M2. Nine months later, Moonshot AI's flagship Kimi K3 kept the hybrid of KDA and MLA, with 2.8T parameters and 69 KDA layers out of 93. Kimi K3 model card This shows that Moonshot AI scaled KDA up to a larger model; how it compares with full attention at that scale still awaits corresponding evaluations.