arXiv:2510.26692cs.CLcs.LG2025-10被引 138

Kimi Linear用线性注意力超越全注意力,大幅降低显存与计算开销。

Kimi Linear: An Expressive, Efficient Attention Architecture

  • 提出KDA模块,通过细粒度门控机制提升有限状态记忆利用效率。
  • 在100万上下文长度下,推理吞吐量提升6倍,KV缓存减少75%。
  • 适合长序列生成、高并发推理场景,开源代码与模型供研究使用。

我们提出Kimi Linear,一种混合线性注意力架构,首次在各类场景(短上下文、长上下文、强化学习扩展)中公平对比下超越全注意力。其核心为Kimi Delta Attention(KDA),一种基于门控增量网络的表达性强线性注意力模块,采用更细粒度的门控机制,有效利用有限状态RNN记忆。专属分块算法通过特殊设计的对角加低秩(DPLR)转移矩阵实现高硬件效率,显著降低计算量,同时保持与经典增量规则的一致性。我们基于层级混合KDA与多头潜在注意力(MLA)预训练了3B激活参数、48B总参数的Kimi Linear模型。实验表明,在相同训练方案下,Kimi Linear在所有任务中均显著优于全注意力的MLA,KV缓存使用减少高达75%,100万上下文长度下解码吞吐量最高提升6倍。结果证明Kimi Linear可作为全注意力的即插即用替代方案,具备更优性能与效率,尤其适用于更长输入输出的任务。为支持后续研究,我们开源KDA核函数与vLLM实现,并发布预训练及指令微调模型检查点。

原文摘要 · Abstract (English)

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.

线性注意力高效推理长序列生成Kimi

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。