QuantMLA: Function-Aligned Dual-Path Quantization for Low-Bit MLA KV Caching
Su, Zunhai, Sun, Yuxuan, Tan, Jianchao, Zhang, Tao, Hu, Ruihan, Xie, Yuchen, Cai, Xunliang, Wong, Ngai
–arXiv.org Artificial Intelligence
ABSTRACT Multi-Head Latent Attention (MLA) enables expressive multi-head attention with compact caches for its content and decoupled RoPE paths, yet cache memory still scales linearly with context length and batch size. Low-bit RoPE quantization remains poorly understood, leaving joint low-bit compression of the content and RoPE caches largely unexplored. In this work, we establish a systematic model of MLA's dual-path quantization errors, characterizing their distinct effects on attention-output distortion and explaining the pronounced amplification of RoPE-path errors. Guided by this analysis, we introduce QuantMLA, a function-aligned framework for low-bit dual-path quantization. We derive path-specific transformation spaces that preserve full-precision computation while remaining fully fusible into model parameters offline, eliminating online transformation overhead. Within these spaces, QuantMLA learns path-specific transformations with function-aligned objectives: attention-output reconstruction captures the content path's coupled matching and aggregation errors, while positional QK reconstruction preserves the RoPE-induced component of the attention logits and admits a theoretical bound on output distortion. Across four MLA model families, QuantMLA enables, to our knowledge, the first reported joint INT4 caching of the content and RoPE caches with minimal accuracy degradation. Further compressing the content cache to INT2 while retaining the RoPE key cache at INT4 maintains competitive performance on challenging reasoning and code benchmarks. We develop a native low-bit MLA attention kernel that integrates unpacking and dequantization directly into attention computation. The physical cache layout provides 3.59 compression at 128K context, while a cache-pressure serving workload achieves 5.168 higher whole-job output throughput than BF16. The code will be released upon acceptance. 1 INTRODUCTION Attention enables Transformer-based large language models (LLMs) to integrate information across long contexts, but autoregressive decoding relies on a key-value (KV) cache whose storage and access incur substantial memory and bandwidth costs. This bottleneck has motivated efficient attention mechanisms and architectures, including linear attention (Katharopoulos et al., 2020), sparse attention (Yuan et al., 2025), and hybrid architectures (Wang et al., 2025; Kimi Team et al., 2025b). Multi-Head Latent Attention (MLA) reconciles expressive multi-head attention with compact KV storage through two cached paths: a shared low-rank content latent from which keys and values are derived, and a decoupled RoPE key cache (DeepSeek-AI, 2024). This design has been adopted by leading models including DeepSeek-V3, Kimi K3, LongCat-Flash, LongCat-2.0, Zunhai Su and Yuxuan Sun contributed equally to this work.
arXiv.org Artificial Intelligence
Oct-1-2026