我们推出 Kimi Linear,这是一种混合线性注意力架构,首次在公平对比下,于多种场景——包括短上下文、长上下文以及强化学习(RL)扩展机制——中全面超越全注意力机制。其核心在于 Kimi Delta Attention(KDA),这是一个富有表现力的线性注意力模块,通过更细粒度的门控机制扩展了 Gated DeltaNet,从而更有效地利用有限的有限状态 RNN 记忆。
我们定制的分块算法通过对角加低秩(DPLR)转移矩阵的一种专门变体实现了高硬件效率,与通用的 DPLR 公式相比大幅减少了计算量,同时与经典的 delta 规则保持更高的一致性。我们基于 KDA 与多头潜在注意力(MLA)的逐层混合方式,预训练了一个具有 30 亿激活参数和 480 亿总参数的 Kimi Linear 模型。
实验表明,在相同的训练方案下,Kimi Linear 在所有评估任务上均以显著优势超越纯 MLA,同时将 KV 缓存使用量降低高达 75%,并在 100 万上下文中实现高达 6 倍的解码吞吐量。这些结果证明,Kimi Linear 可以作为全注意力架构的直接替代方案,在包括更长输入和输出长度的任务中,兼具更优的性能与效率。
为支持进一步研究,我们开源了 KDA 内核和 vLLM 实现,并发布了预训练和指令微调的模型检查点。
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. At its core lies Kimi Delta Attention (KDA), an expressive linear attention module that extends Gated DeltaNet with a finer-grained gating mechanism, enabling more effective use of limited finite-state RNN memory. Our bespoke chunkwise algorithm achieves high hardware efficiency through a specialized variant of the Diagonal-Plus-Low-Rank (DPLR) transition matrices, which substantially reduces computation compared to the general DPLR formulation while remaining more consistent with the classical delta rule.
We pretrain a Kimi Linear model with 3B activated parameters and 48B total parameters, based on a layerwise hybrid of KDA and Multi-Head Latent Attention (MLA). Our experiments show that with an identical training recipe, Kimi Linear outperforms full MLA with a sizeable margin across all evaluated tasks, while reducing KV cache usage by up to 75% and achieving up to 6 times decoding throughput for a 1M context. These results demonstrate that Kimi Linear can be a drop-in replacement for full attention architectures with superior performance and efficiency, including tasks with longer input and output lengths.
To support further research, we open-source the KDA kernel and vLLM implementations, and release the pre-trained and instruction-tuned model checkpoints.