arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2509.16686cs.CL
收藏

EG-MLA:面向可扩展高效大语言模型的嵌入门控多头潜在注意力

EG-MLA: Embedding-Gated Multi-head Latent Attention for Scalable and Efficient LLMs

Zhengge Cai, Haowen Hou

AI总结:

本文提出EG-MLA,通过在潜在空间引入token级嵌入门控机制进一步压缩KV缓存并增强表示能力,相较MHA减少超91.6%缓存,相较MLA最高额外节省59.9%内存且提升推理准确率,并成功扩展至超10亿参数规模。

摘要:

减少键值(KV)缓存大小是在大语言模型(LLMs)中实现高效推理的关键步骤,尤其是在延迟和内存受限的情况下。虽然多头注意力(MHA)具有强大的表示能力,但它会带来显著的内存开销。最近关于多头潜在注意力(MLA)的研究通过将KV表示压缩到共享潜在空间来缓解这一问题,从而在性能和缓存效率之间取得更好的权衡。虽然MLA已经实现了显著的KV缓存减少,但在不损失性能的情况下进一步压缩的空间仍然有限。在本文中,我们提出了嵌入门控多头潜在注意力(Embedding-Gated Multi-head Latent Attention,EG-MLA),这是MLA的一种新型扩展,在增强表示表达能力的同时进一步减少了KV缓存大小。EG-MLA在潜在空间中引入了一种针对特定token的嵌入门控机制,能够以极少的额外计算对压缩后的KV向量进行细粒度调制。与MHA相比,EG-MLA实现了超过91.6%的KV缓存大小减少,且性能下降可忽略不计。相对于MLA,EG-MLA在多种推理基准上持续提高了任务准确率,同时实现了高达59.9%的额外内存节省。我们的理论分析揭示了嵌入门控如何诱导隐式高阶交互,实证评估则证明了其在模型规模和压缩机制下的稳健泛化能力。值得注意的是,我们成功将EG-MLA扩展到超过10亿参数规模,展示了其在大规模LLM部署中的实际可行性。这些结果确立了EG-MLA作为一种内存和计算高效的注意力机制,能够在现代LLM中实现可扩展的高性能推理。

英文摘要:

Reducing the key-value (KV) cache size is a crucial step toward enabling efficient inference in large language models (LLMs), especially under latency and memory constraints. While Multi-Head Attention (MHA) offers strong representational power, it incurs significant memory overhead. Recent work on Multi-head Latent Attention (MLA) mitigates this by compressing KV representations into a shared latent space, achieving a better trade-off between performance and cache efficiency. While MLA already achieves significant KV cache reduction, the scope for further compression remains limited without performance loss. In this paper, we propose \textbf{Embedding-Gated Multi-head Latent Attention (EG-MLA)}, a novel extension of MLA that further reduces KV cache size while enhancing representational expressiveness. EG-MLA introduces a token-specific embedding gating mechanism applied in the latent space, enabling fine-grained modulation of compressed KV vectors with minimal additional computation. Compared to MHA, EG-MLA achieves over 91.6\% reduction in KV cache size with negligible performance degradation. Relative to MLA, EG-MLA consistently improves task accuracy across diverse reasoning benchmarks while achieving up to 59.9\% additional memory savings. Our theoretical analysis highlights how embedding gating induces implicit high-order interactions, and empirical evaluations demonstrate robust generalization across model scales and compression regimes. Notably, we successfully scale EG-MLA to over 1 billion parameters, demonstrating its practical viability for large-scale LLM deployment. These results establish EG-MLA as a memory- and compute-efficient attention mechanism that enables scalable, high-performance inference in modern LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑