Manuscript Offprint

arXiv:2610.20686

RoLaQ: Joint Rotation and Range Calibration for 2-Bit KV Caches in Multi-Head Latent Attention

Shiyu Ji, Peng Ling, Chen Lin, Shupeng Li, Yixuan Wang, Qingfu Zhu, Wanxiang Che

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Multi-head latent attention (MLA) compresses the content of a key-value cache into a shared latent per token, making low-bit storage attractive for long-context inference. At two bits, errors in this representation perturb both attention matching and value readout, with effects that depend on error direction and reconstruction scale. We introduce ROLAQ (Rotation-calibrated Latent Quantization), an offline method for joint rotation and range calibration. ROLAQ refines a shared rotation within subspaces defined by the frozen key and value projections, and jointly learns quantization ranges whose thresholds and reconstruction gains are coupled to control the shared signal's response. Prediction matching and attention-output supervision guide calibration with model weights frozen. Across three MLA models and six benchmarks, ROLAQ achieves the highest average accuracy among the compared 2-bit methods both without and with token protection. On DeepSeek-V2-Lite, an SGLang implementation provides 3.96×3.96 \times the BF16 KV capacity under the same memory budget and 2.51×2.51 \times its decode throughput with 256K input tokens.

1 Introduction

Long contexts and concurrent requests increase the memory and bandwidth costs of the key-value (KV) cache during autoregressive decoding (Vaswani et al., 2017; Liu et al., 2024c). Multi-head latent attention (MLA), introduced in DeepSeek-V2, reduces these costs by caching a compact content latent shared across heads (Liu et al., 2024a). MLA and its variants now underpin models including DeepSeek-V3, GLM-5.3, and Hy4 (Liu et al.,

(a) One latent, two roles

Figure

(b) KV capacity Same memory budget

Figure

(c) Throughput 256K input

Figure

Relative to BF16

Figure

Figure 1: (a) MLA shares a content cache between keys and values. (b,c) On one A100 80GB, ROLAQ gives DeepSeek-V2-Lite 3.96×3.96\times the BF16 capacity at equal memory budgets and 2.51×2.51\times its decode throughput with four concurrent requests and 256K inputs.

2024b; GLM-5-Team et al., 2026; Tencent, 2026). Even with this architectural compression, the cache continues to grow with context length and serving concurrency. KV cache quantization offers further savings by lowering the storage precision of cached states (Liu et al., 2024c; Hooper et al., 2024; Kang et al., 2024). We focus on quantizing MLA's content latent to two bits while preserving its two roles in attention matching and value readout.

KIVI exploits distinct K/V statistics with per-channel key and per-token value quantization (Liu et al., 2024c). KVQuant and GEAR further control distortion through outlier handling and residual error compensation (Hooper et al., 2024; Kang et al., 2024). Rotations make low-bit representations easier to quantize by redistributing outliers (Ashkboos et al., 2024; Liu et al., 2025b; Su et al., 2025). Attention-aware calibration further adapts

†^{\dagger}Corresponding author.

these transformations to the computations that consume the cache, as in OptR’s attention-output reconstruction objective (Yun et al., 2026). These methods primarily target multi-head or grouped-query attention with separate key and value caches.

In MLA, every head derives both content keys and values from the same quantized latent through distinct projections (Figure 1a). A single perturbation can therefore change both the matching scores that select information and the values aggregated under those scores. OSCAR provides covariance-aware rotations for this shared cache (Zhou et al., 2026). These projection paths guide our joint calibration of the latent basis and quantization range.

Two observations guide our design ( §2§2). Joint K/V projection energy is unevenly distributed across latent directions, so equal-magnitude errors can produce different distortions. Reconstruction gain also affects prediction fidelity even when the rotation is fixed. Because rotation changes the quantizer’s input distribution, we learn its boundaries alongside the latent basis. Together, these observations motivate joint rotation and range learning with a controlled reconstruction response.

We introduce RoLAQ, which jointly learns a shared rotation within K/V-defined subspaces and a quantization threshold per layer, with model weights frozen. Each threshold determines its reconstruction gain, allowing the quantization assignments to adapt while controlling the shared signal's reconstruction response. A BF16 teacher supplies next-token distributions and attention outputs: prediction KL aligns the complete model, while attention-output supervision directly guides the individual layers. Calibration takes roughly 30 minutes on one A100 GPU. At inference, RoLAQ uses a packed 2-bit content cache and absorbs read-side rotations into MLA's projections, eliminating standalone rotation multiplications when attending to the cached history.

We evaluate RoLAQ on DeepSeek-V2-Lite, Moonlight-16B-A3B, and MiniCPM3-4B across six benchmarks. It achieves the highest average accuracy among the compared 2-bit methods both with and without token protection. Without protection, it improves on the strongest baseline by 1.1 to 3.8 points (Table 1). Retaining selected tokens in BF16 further improves accuracy. RULER retrieval at 8K and 16K shows that calibration gains extend beyond the 4K training context. Figure 1b,c shows the SGLang gains for DeepSeek-V2-Lite: 3.96×3.96 \times the BF16 cache capacity at equal memory budgets and 2.51×2.51 \times its decode throughput with 256K input on one A100 80GB.

Our contributions are as follows:

• We develop joint rotation and range calibration for MLA, using a compact K/V search space and coupled thresholds and gains to control the shared latent’s response.

• We demonstrate accuracy gains across three MLA models alongside long-context retrieval improvements, with ablations explaining the roles of rotation geometry, quantizer response, and calibration objectives.

• We implement packed INT2 serving in SGLang with fused cache writes and optimized attention paths, delivering greater KV capacity, higher long-context throughput, and lower first-token tail latency.

References (27)