Manuscript Offprint

arXiv:2610.17202

MLAfication: Efficiently Enabling High-Fidelity MLA for Modern LLMs

Zile Wang, Zhide Xie, Tao Ji

Abstract

Multi-Head Latent Attention (MLA) compresses the KV cache into a latent representation, reducing inference memory and bandwidth. Existing MHA2MLA/TransMLA methods do not support QKNorm and require costly recovery on modern LLMs, especially MoE. We present MLAfication, a QKNorm-compatible, parameter-efficient extension of MHA2MLA. It combines calibrated KNorm, parameter-efficient distillation, contribution-aware Partial-RoPE, and activation-aware joint KV initialization. Across MHA and GQA models, including QKNorm- and MoE-equipped variants, MLAfication preserves performance under substantial KV-cache compression, surpasses the current SOTA on commonsense and long-context benchmarks, and extends MLA conversion to modern architectures. On Qwen3-30B-A3B, MLAfication delivers up to 5.35×5.35\times the serving throughput of BF16 GQA and, combined with 4-bit KV quantization, reduces the KV-cache footprint by 94.73%. Our code is available at https://github.com/JT-Ushio/MLAfication.

1 Introduction

The rapid scaling of LLMs has led to increasing challenges in inference efficiency, particularly due to the substantial memory and bandwidth costs of Key-Value (KV) caches. To address this bottleneck, DeepSeek introduced Multi-Head Latent Attention (MLA, 2024), which compresses KV representations into a compact latent space while preserving expressive attention capabilities. MLA has since been adopted by several large-scale foundation models, including DeepSeek-V2/V3/R1/V3.2 (DeepSeek-AI 2025), Kimi K2/K3 (Kimi Team et al. 2026), and the GLM-5 series (Zeng et al. 2026), highlighting its potential as an efficient attention architecture for modern LLMs.

MHA2MLA (Ji et al. 2025) first demonstrated that LLMs originally optimized for MHA (2017) or GQA (2023) can be efficiently adapted to MLA inference without retraining from scratch. By introducing ①Partial-RoPE and ②KV-joint low-rank approximation, MHA2MLA enables data-efficient conversion and effectively recovers performance. TransMLA (Meng et al. 2025) further improved Partial-RoPE variants (RoRoPE and FreqFold) and KV balancing, delivering stronger zero-shot performance and more efficient fine-tuning. Beyond text-only LLMs, the paradigm has recently been extended to other model families, including vision-LMs (Fan et al. 2026), ASR models (Zhang et al. 2026), and autoregressive video diffusion models (Yesiltepe et al. 2026), demonstrating its broader applicability.

However, extending MHA2MLA to modern LLMs remains challenging due to incompatibilities with widely adopted architectural components, particularly QKNorm (2020) and Mixture-of-Experts (MoE, 2017). While QKNorm stabilizes attention computation by mitigating logit explosion, its normalization conflicts with MLA's latent projection mechanism (Team et al. 2025; Anson and Aitchison 2025). Similarly, MoE improves model scalability but makes full-parameter MHA2MLA vulnerable to disrupting the expert load balancing learned during pre-training.

We introduce MLAfication, extending MHA2MLA (Ji et al. 2025) to QKNorm and MoE architectures. It resolves QKNorm's incompatibility with efficient MLA decoding through calibrated KNorm and recovers performance through parameter-efficient distillation. We further refine MHA2MLA's Partial-RoPE and low-rank approximation stages using MHA2MLA-VLM (Fan et al. 2026) and SVD-LLM V2 (Wang et al. 2025), respectively.

References (29)