paper-with-me

홈 › Papers

TransMLA: Multi-Head Latent Attention Is All You Need

2025-02-11 · Fanxu Meng, Zengwei Yao, Muhan Zhang

Modern large language models (LLMs) often encounter communication bottlenecks on current hardware, rather than purely computational constraints. Multi-head Latent Attention (MLA) tackles this challenge by using low-rank matrices in the key-value (KV) layers, thereby allowing compressed latent KV states to be cached. This approach significantly reduces the KV cache size relative to traditional multi-head attention, leading to faster inference. Moreover, MLA employs an up-projection matrix to increase expressiveness, trading additional computation for reduced communication overhead. Although MLA has demonstrated efficiency and effectiveness in Deepseek V2/V3/R1, many major model providers still rely on Group Query Attention (GQA) and have not announced any plans to adopt MLA. In this paper, we show that GQA can always be represented by MLA while maintaining the same KV cache overhead, but the converse does not hold. To encourage broader use of MLA, we introduce TransMLA, a post-training method that converts widely used GQA-based pre-trained models (e.g., LLaMA, Qwen, Mixtral) into MLA-based models. After conversion, the model can undergo additional training to boost expressiveness without increasing the KV cache size. Furthermore, we plan to develop MLA-specific inference acceleration techniques to preserve low latency in transformed models, thus enabling more efficient distillation of Deepseek R1.

📄 PDF Abstract BibTeX arXiv:2502.07864

Code (1)

fxmeng/transmla 공식 구현 pytorch

Tasks

All

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음
LLaMA LLaMA is a collection of foundation language models ranging from 7B to 65B parameters. It is based on the transformer architecture with various improvements that were…
ADOPT Please enter a description about the method here

Similar Papers 제목 키워드 기반

GQLA: Group-Query Latent Attention for Hardware-Adaptive Large Language Model Decoding

2026-05-14 · Fanxu Meng arxiv

Multi-head Latent Attention (MLA), the attention used in DeepSeek-V2/V3, jointly compresses keys and values into a low-rank latent and matches the H100 roofline almost perfectly. Its trained weights, however, expose only…

GTA: Grouped-head latenT Attention

2025-06-15 · Luoyang Sun, Jiwen Jiang, Cheng Deng, Xinjian Wu 외

Attention mechanisms underpin the success of large language models (LLMs), yet their substantial computational and memory overhead poses challenges for optimizing efficiency and performance. A critical bottleneck arises …

Learning the Koopman Operator using Attention Free Transformers

2026-06-22 · Mohammed Nagdi, Evangelos-Marios Nikolados, Alexey Yermakov, Mars Gao 외 arxiv

Learning Koopman operators with autoencoders enables linear prediction in a latent space, but long-horizon rollouts often drift off the learned manifold, leading to phase and amplitude errors on systems with switching, c…

TPLA: Tensor Parallel Latent Attention for Efficient Disaggregated Prefill and Decode Inference

2025-08-21 · Xiaojuan Tang, Fanxu Meng, Pingzhi Tang, Yuxuan Wang 외 arxiv

Multi-Head Latent Attention (MLA), introduced in DeepSeek-V2, compresses key-value states into a low-rank latent vector, caching only this vector to reduce memory. In tensor parallelism (TP), however, attention heads are…

Multi-head Temporal Latent Attention

2025-05-19 · Keqi Deng, Philip C. Woodland

While Transformer self-attention offers strong parallelism, the Key-Value (KV) cache grows linearly with sequence length and becomes a bottleneck for inference efficiency. Multi-head latent attention was recently develop…

GPUspeech-recognitionSpeech RecognitionTranslation