Manuscript Offprint
arXiv:2610.20686RoLaQ: Joint Rotation and Range Calibration for 2-Bit KV Caches in Multi-Head Latent Attention
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 the BF16 KV capacity under the same memory budget and 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

(b) KV capacity Same memory budget

(c) Throughput 256K input

Relative to BF16

Figure 1: (a) MLA shares a content cache between keys and values. (b,c) On one A100 80GB, ROLAQ gives DeepSeek-V2-Lite the BF16 capacity at equal memory budgets and 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
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 ( ). 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: the BF16 cache capacity at equal memory budgets and 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.
2.1 One Cache, Two Roles
For each token , MLA caches a content latent and a decoupled RoPE key (Liu et al., 2024a). Each head obtains its content key and value through frozen up-projections, and . Using row vectors, a query with content part and positional part produces
(1)
where is the attention scale, softmax runs over causally visible positions, and is head 's output-projection block. The shared latent therefore determines both where attention looks through the keys and what it reads through the values. Its quantization error propagates through both roles.
We quantize to two bits and retain the lower-dimensional RoPE key in BF16 because of its quantization sensitivity (Zhang et al., 2026). An orthogonal rotation spreads outliers before quantization (Ashkboos et al., 2024; Liu et al., 2025b). Writing for quantization and DQ for dequantization, every head uses for matching and readout.
(a) Projection energy

(b) Gain sensitivity

Figure 2: Two observations on shared-latent quantization. (a) K/V energy in the leading half of the joint spectrum (mean ± layer std.; dashed: 50%). (b) Prediction KL at 8K with OSCAR’s rotation and threshold fixed, normalized by its value at (vertical dashed line). DS, ML, and CPM denote DeepSeek-V2-Lite, Moonlight, and MiniCPM3.
2.2 Projection-Dependent Distortion
Let be the reconstruction error. Its effects on the attention logit and value are
Errors of equal magnitude can affect the two projections differently depending on their direction. Let and stack the corresponding up-projections across heads. For , the squared projection error is . We define
Trace normalization gives both projections equal total weight. The quadratic form sums normalized squared K/V errors. Each eigenvalue of H measures this error along its unit eigenvector.
Figure 2a shows that the leading half of s eigenvectors captures 62–75% of each projection's energy across the three models, averaged over layers. This common basis separates directions by their influence on both projections, guiding the shared rotation search.
2.3 Sensitivity to Reconstruction Scale
Beyond error direction, reconstruction scale affects both matching and readout. The threshold controls four-level assignments, while the gain scales the reconstructed signal shared by both paths.
Figure 2b isolates this effect by fixing OSCAR’s rotation and threshold and varying only its gain. Values below one indicate lower KL than the baseline with fixed . On 8K-token documents, adjusting the gain alone reduces DeepSeek-V2-Lite’s next-token KL to BF16 by 52% within the sweep. Together, these observations motivate joint calibration of the shared rotation and quantization range. Appendix B.1 details both experiments and the full spectra.
3 Method
ROLAQ jointly calibrates the shared representation and its quantizer to preserve attention matching and value readout (Figure 3). The K/V-aware shared rotation uses the joint projection geometry to organize its search space ( ). The learnable quantization range adapts the decision boundary to this basis while preserving the centered signal's linear response ( ). Joint calibration uses prediction matching and attention-output supervision to learn both components in the frozen model (Figure 3(d); ).
3.1 K/V-Aware Shared Rotation
We use H from Eq. 3 to divide rotation refinement between directions with high and low joint projection energy. Refining within these subspaces preserves this distinction while allowing the quantization basis to adapt to calibration data. Both subspaces contribute to the key and value paths.
Starting from OSCAR’s covariance-aware rotation (Zhou et al., 2026), we express the geometry in the initial rotated coordinates as . We sort the eigenvalues in descending order and split into two equal-dimensional subspaces. Within each, a learnable skew-symmetric generator defines the refinement:
(4)
This parameterization keeps orthogonal throughout calibration; zero-initializing , recovers . The two generators use trainable parameters, half the number in a full generator. The calibration objective selects the rotation within this structured space. Section 5.2 evaluates this choice of rotation search space.
3.2 Response-Preserving Range Calibration
The range controls both the quantization assignments and the strength of the reconstructed signal. We adapt the assignments to the learned rotation while anchoring the linear response of the shared signal to its full-precision reference. We
(a) Shared-cache attention

(b) K/V-aware rotation
(c) Learnable range
(d) Joint calibration
Update R, T
Figure 3: Overview of RoLAQ. (a) A shared 2-bit content cache supplies both K/V paths. The dashed box groups the read-side rotation with the projections that absorb it. (b) defines two spectral subspaces for learning the shared rotation. (c) The learned threshold determines the four-level assignments and gain . (d) A frozen BF16 teacher guides joint calibration through prediction KL and attention-output loss.
standardize each group of G rotated coordinates using its mean and standard deviation (Zhou et al., 2026). For a coordinate z, reconstruction takes the form
Here assigns to four ordered levels using boundaries , with . The threshold controls assignment to the inner or outer levels, while the gain scales reconstruction around the group mean.
To separate systematic scale change from residual distortion, we use as a reference distribution. The quantized signal decomposes as , where (Bussgang et al., 1952; Demir and Bjornson, 2020) and
The coefficient measures the linear response to the input. In the original group scale, . Changing and therefore changes the response of the centered signal reused by both attention paths. Appendix B.3 derives .
To enforce unit response under the Gaussian reference, we set the gain from the threshold:
Each layer learns (Appendix C.3), and its gain follows from this constraint. The assignments can therefore adapt while preserving unit response. Section 5.3 tests this response after calibration across context lengths, complementing the initial gain sweep in Figure 2b.
3.3 Joint Calibration and Inference
The rotation changes the distribution seen by the quantizer, so we learn the rotation generators and thresholds together across all L layers. The backbone remains frozen. For the same input text, the BF16 model supplies target next-token distributions and attention outputs. We optimize
(8)
Here I contains the scored token positions, is the next-token distribution, and collects attention outputs after at those positions. Prediction KL aligns the complete quantized model with its BF16 teacher. The auxiliary output loss, weighted by , supplies a direct signal to each layer through both attention matching and value readout, following output-aware calibration (Yun et al., 2026). Normalizing by teacher output energy balances layers with different scales.
| Method | Knowledge & QA | Math | Code | Avg. | |||
|---|---|---|---|---|---|---|---|
| MMLU | CMMLU | TriviaQA | GSM8K | HumanEval | MBPP | ||
| DeepSeek-V2-Lite | |||||||
| BF16 | 58.0 | 64.1 | 65.2 | 37.4 | 28.0 | 43.4 | 49.4 |
| RTN | 40.5 / 44.9 | 45.8 / 51.8 | 41.5 / 59.6 | 7.0 / 15.1 | 12.2 / 18.9 | 17.6 / 28.0 | 27.4 / 36.4 |
| QuaRot | 53.2 / 53.8 | 58.6 / 60.6 | 60.4 / 63.4 | 25.5 / 30.5 | 25.6 / 25.0 | 33.8 / 38.6 | 42.9 / 45.3 |
| KVarN | 49.9 / 53.7 | 56.0 / 59.1 | 57.8 / 63.4 | 23.6 / 27.9 | 20.1 / 26.2 | 32.6 / 37.0 | 40.0 / 44.6 |
| OSCAR | 50.8 / 50.3 | 57.8 / 57.6 | 60.9 / 62.2 | 18.3 / 18.9 | 22.6 / 23.8 | 36.6 / 38.6 | 41.1 / 41.9 |
| RoLAQ | 55.1 / 55.7 | 61.5 / 62.1 | 64.1 / 64.9 | 32.1 / 34.2 | 25.4 / 27.0 | 41.8 / 42.5 | 46.7 / 47.7 |
| Moonlight-16B-A3B | |||||||
| BF16 | 70.0 | 78.2 | 66.4 | 73.5 | 47.0 | 53.4 | 64.7 |
| RTN | 61.2 / 65.6 | 65.1 / 72.8 | 46.7 / 64.8 | 44.1 / 61.6 | 23.8 / 41.5 | 37.4 / 46.2 | 46.4 / 58.8 |
| QuaRot | 63.1 / 65.8 | 68.9 / 73.4 | 48.1 / 64.4 | 49.7 / 67.5 | 32.3 / 41.5 | 39.0 / 50.8 | 50.2 / 60.6 |
| KVarN | 45.6 / 63.0 | 45.0 / 67.9 | 17.6 / 58.5 | 21.2 / 64.1 | 12.2 / 47.0 | 16.6 / 45.6 | 26.4 / 57.7 |
| OSCAR | 66.9 / 67.9 | 73.9 / 75.4 | 58.6 / 63.7 | 64.3 / 69.4 | 34.8 / 43.3 | 45.4 / 48.4 | 57.3 / 61.3 |
| RoLAQ | 67.4 / 67.9 | 74.9 / 76.1 | 63.2 / 65.3 | 66.5 / 70.5 | 40.4 / 44.3 | 47.9 / 50.1 | 60.1 / 62.3 |
| MiniCPM3-4B | |||||||
| BF16 | 64.4 | 72.9 | 36.2 | 75.7 | 74.4 | 51.8 | 62.6 |
| RTN | 54.3 / 59.3 | 59.2 / 67.8 | 28.5 / 33.5 | 35.4 / 65.0 | 22.6 / 68.3 | 31.6 / 45.6 | 38.6 / 56.6 |
| QuaRot | 61.7 / 62.5 | 69.6 / 70.1 | 33.9 / 34.9 | 68.5 / 71.4 | 70.1 / 70.1 | 45.0 / 48.4 | 58.1 / 59.6 |
| KVarN | 59.3 / 62.8 | 66.7 / 71.5 | 27.1 / 34.9 | 52.4 / 72.5 | 47.6 / 70.7 | 39.4 / 51.4 | 48.7 / 60.6 |
| OSCAR | 62.9 / 63.0 | 69.9 / 71.6 | 31.9 / 34.9 | 71.2 / 74.2 | 67.1 / 70.1 | 47.0 / 49.2 | 58.3 / 60.5 |
| RoLAQ | 62.9 / 63.5 | 71.0 / 71.2 | 34.7 / 35.3 | 70.5 / 74.6 | 67.1 / 73.8 | 50.3 / 49.7 | 59.4 / 61.4 |
Table 1: Downstream accuracy (%) with 2-bit content caches. Each pair reports w.o. / w. token protection (without / with 4 sink and 16 recent tokens retained in BF16). BF16 is a shared reference; bold marks the best 2-bit scores at the displayed precision within each setting.
We initialize the rotation and threshold from OS-CAR and set the gain using Eq. 7. The forward pass uses the hard quantizer in Eq. 5. A straight-through estimator passes gradients to its inputs (Bengio et al., 2013), while a smooth threshold surrogate supplies gradients for bin assignment. The threshold also receives gradients through . Calibration settings are in §4; quantizer constants and checkpoint selection are in Appendix A.3.
At inference, the learned rotation is exported as one dense matrix per layer, and each new latent is rotated once and stored as 2-bit codes with its group statistics. For , the read-side rotation in Figure 3(a)'s dashed box folds into MLA's absorbed projections:
The content logit is , so both matching and readout operate in the rotated basis. The calibrated rotation, thresholds, and gains remain fixed throughout serving. Only the group statistics are computed from incoming tokens.
4 Experiments
4.1 Setup
Models and benchmarks. We evaluate DeepSeek-V2-Lite (Liu et al., 2024a), Moonlight-16B-A3B (Liu et al., 2025a), and MiniCPM3-4B (Hu et al., 2024) on six benchmarks: MMLU and CMMLU for knowledge (Hendrycks et al., 2020; Li et al., 2024), TriviaQA for question answering (Joshi et al., 2017), GSM8K for mathematics (Cobbe et al., 2021), and HumanEval and MBPP for code generation (Chen et al., 2021; Austin et al., 2021). We also evaluate long-context retrieval on the eight RULER retrieval tasks (Hsieh et al., 2024).
Baselines and cache settings. We compare with round-to-nearest quantization (RTN), QuaRot (Ashkboos et al., 2024), KVarN (Muller et al., 2026), and OSCAR (Zhou et al., 2026). QuaRot and KVarN are applied to the shared MLA latent; OSCAR uses its official MLA recipe. All comparisons use 2-bit content caches and BF16 RoPE keys. We evaluate every method both without token protection and with the first 4 sink tokens and most recent 16 tokens retained in BF16 (Xiao et al., 2024; Liu et al., 2024c; Zhou et al., 2026). Accuracy is evaluated with simulated quantization in
Hugging Face Transformers, giving all baselines a common evaluation framework.
Calibration. We calibrate ROLAQ on 1.43M Pile tokens (Gao et al., 2020) with the model frozen and select checkpoints by held-out prediction KL. Main results average three seeds; component, objective, and random-subspace ablations use one. Calibration takes about 22 minutes for the 16B models and 34 minutes for MiniCPM3 on one A100 GPU. Appendix A provides model configurations, evaluation protocols, baseline implementations, and calibration hyperparameters.
4.2 Main Results
ROLAQ achieves the highest six-task average on all three models under both protection settings (Table 1). We first examine the setting in which every content token is quantized, which directly tests how well each method preserves accuracy under 2-bit storage. ROLAQ reaches 46.7, 60.1, and 59.4 on DeepSeek-V2-Lite, Moonlight, and MiniCPM3, exceeding the strongest baseline by 3.8, 2.8, and 1.1 points. The larger margins without protection highlight the benefit of calibrating the shared representation and its quantization range when the entire content history passes through the quantizer.
On DeepSeek-V2-Lite, GSM8K accuracy without protection improves from OSCAR's 18.3 to 32.1. Moreover, ROLAQ without protection reaches a higher average than the strongest baseline with 20 protected tokens (46.7 vs. 45.3).
Retaining 4 sink and 16 recent tokens in BF16 further improves ROLAQ, which maintains the highest average accuracy on all three models. The calibrated cache thus benefits from mixed-precision token protection while retaining its advantage over the baselines. Section 5.4 examines protection budgets; Appendix C.1 reports all seeds and windows.
Appendix C.4 illustrates these differences with arithmetic and retrieval examples, comparing the answers generated by BF16 and 2-bit models.
4.3 Long-Context Retrieval
We evaluate eight RULER retrieval tasks at 16K on DeepSeek-V2-Lite and 8K on Moonlight (Table 2), their longest evaluated contexts in this study. Both exceed the maximum calibration length of 4K. ROLAQ leads the 2-bit methods on both models, reaching 73.7% on DeepSeek-V2-Lite, 6.3 points above the strongest baseline. On Moonlight, it reaches 94.8%, compared with BF16's 96.2%. DeepSeek- V2-Lite's MK2 accuracy also improves over OSCAR from 7.0 to 55.0. These results demonstrate transfer beyond the calibration length; Section 5.3 examines response sensitivity up to 32K.
| Method | S1 | S2 | S3 | MK1 | MK2 | MK3 | MV | MQ | Avg. |
|---|---|---|---|---|---|---|---|---|---|
| DeepSeek-V2-Lite | |||||||||
| BF16 | 100.0 | 100.0 | 96.0 | 94.0 | 88.0 | 47.0 | 63.5 | 89.0 | 84.7 |
| RTN | 86.0 | 55.0 | 21.0 | 23.0 | 0.0 | 0.0 | 33.0 | 25.2 | 30.4 |
| QuaRot | 100.0 | 98.0 | 80.0 | 54.0 | 35.0 | 5.0 | 64.2 | 72.0 | 63.5 |
| KVarN | 100.0 | 97.0 | 77.0 | 75.0 | 58.0 | 7.0 | 50.5 | 74.5 | 67.4 |
| OSCAR | 100.0 | 89.0 | 70.0 | 52.0 | 7.0 | 1.0 | 55.8 | 62.5 | 54.7 |
| RoLAQ | 100.0 | 100.0 | 93.7 | 82.0 | 55.0 | 14.3 | 59.2 | 85.3 | 73.7 |
| Moonlight-16B-A3B | |||||||||
| BF16 | 100.0 | 100.0 | 99.0 | 97.0 | 100.0 | 98.0 | 99.5 | 76.5 | 96.2 |
| RTN | 100.0 | 99.0 | 93.0 | 80.0 | 73.0 | 49.0 | 85.8 | 81.2 | 82.6 |
| QuaRot | 100.0 | 100.0 | 85.0 | 79.0 | 88.0 | 61.0 | 91.0 | 84.8 | 86.1 |
| KVarN | 100.0 | 98.0 | 83.0 | 69.0 | 77.0 | 73.0 | 93.8 | 89.8 | 85.4 |
| OSCAR | 100.0 | 100.0 | 96.0 | 92.0 | 97.0 | 78.0 | 96.2 | 94.2 | 94.2 |
| RoLAQ | 100.0 | 100.0 | 94.3 | 93.3 | 93.0 | 86.7 | 98.0 | 93.3 | 94.8 |
Table 2: Retrieval accuracy (%) on the eight RULER retrieval tasks with 4 sink and 16 recent tokens retained in BF16. Avg. denotes the task mean; bold marks the best 2-bit scores at the displayed precision.
| DeepSeek | Moonlight | |||
|---|---|---|---|---|
| (a) Calibration components | ||||
| Configuration | MMLU | MBPP | MMLU | MBPP |
| Initialization | 52.0 | 39.4 | 67.0 | 48.4 |
| Rotation only | 54.5 | 41.6 | 67.2 | 48.8 |
| Range only | 52.3 | 40.0 | 67.4 | 48.4 |
| Rotation + Range | 55.9 | 44.0 | 67.9 | 49.2 |
| (b) Calibration objective | ||||
| Objective | Avg. | Avg. | ||
| KL only | 47.5 | 62.0 | ||
| Attention-output only | 47.7 | 62.2 | ||
| KL + attention-output | 48.1 | 62.6 | ||
Table 3: Ablations of calibration components and objectives. (a) MMLU and MBPP accuracy (%) for different component configurations. (b) Six-task average accuracy (%) for different calibration objectives.
5 Ablations and Analysis
We examine how rotation, range, and calibration choices affect accuracy and serving efficiency.
5.1 Calibration Ablations
Calibration components. Joint calibration achieves the highest accuracy on both models (Table 3a). Allowing the range to adapt increases the gains from rotation calibration. For example, rotation calibration improves DeepSeek-V2-Lite's MBPP accuracy by 2.2 points with a fixed range and by 4.0 points with a learned range. These
| Rotation | Params. | DeepSeek | Moonlight | ||
|---|---|---|---|---|---|
| S ↓ | Avg.↑ | S ↓ | Avg.↑ | ||
| Full (Exp.) | 0.664 | 47.5 | 0.559 | 62.0 | |
| Full (Cayley) | 0.661 | 47.5 | 0.592 | 62.3 | |
| Random subspaces | 0.628 | 47.4 | 0.550 | 61.9 | |
| 0.624 | 47.1 | 0.579 | 62.2 | ||
| 0.622 | 47.7 | 0.508 | 62.3 | ||
Table 4: Rotation search spaces. Params. counts trainable rotation parameters per layer; S is validation KL relative to OSCAR. Avg. is six-task mean accuracy (%).

Figure 4: Effect of quantizer response on DeepSeek-V2-Lite. Prediction KL to BF16 is normalized by its value at for each context length. Using a checkpoint calibrated with full rotation and unit response, we vary the gain at inference while keeping the rotation and thresholds fixed.
results support adapting the quantizer jointly with the latent representation.
Calibration objective. With both components enabled, the combined objective yields the highest six-task mean on both models (Table 3b). Attention-output supervision alone slightly outperforms KL alone, while combining them raises the means to 48.1 on DeepSeek-V2-Lite and 62.6 on Moonlight. These gains support supervising both final predictions and per-layer attention outputs. We use for the combined objective.
5.2 Rotation Search Space
The partition uses half the trainable rotation parameters of full exponential and Cayley rotations while matching or improving their six-task accuracy (Table 4). It also reduces validation KL by 6.3% and 9.1% relative to full exponential rotation on DeepSeek-V2-Lite and Moonlight. The random control preserves block sizes, initialization, and calibration budget but replaces the K/V eigenbasis with a random orthogonal basis. The K/V basis improves both KL and accuracy over this con- trol. These comparisons support a compact rotation search guided by MLA's two projection paths (Appendix B.2). The learned blocks export as a dense rotation, allowing the compact search space to use the same inference kernels as full rotations.

Figure 5: Effect of token protection on six-task mean accuracy (%). The horizontal axis gives the number of sink + recent content tokens retained in BF16.
5.3 Quantizer Response
Range calibration controls the shared signal used by both attention paths. Under the Gaussian reference, minimizing reconstruction error can favor attenuation (Appendix B.3). Coupling gain to threshold improves MiniCPM3's normalized validation KL from 0.606 with free gain to 0.527 within the same search space (Appendix C.2). The coupled setting also gives more consistent KL across the three calibration seeds.
We then examine response sensitivity by fixing a DeepSeek-V2-Lite checkpoint calibrated with and varying its gain at inference. Figure 4 shows the lowest prediction KL at across contexts from 2K to 32K. Amplification becomes more costly as context grows. Together, these results support adapting quantization boundaries while controlling the reconstructed signal shared by attention matching and value readout.
5.4 Token Protection
The advantage of ROLAQ is largest without token protection: it exceeds the strongest baseline by 1.1–3.8 points in six-task mean accuracy across the three models (Table 1). With every content token quantized, these gains highlight the accuracy preserved by the learned latent quantization itself. We reuse the same calibrated checkpoints across protection budgets. Retaining sink and recent tokens in BF16 further improves ROLAQ, which maintains the highest mean across all three protection budgets (Figure 5). Latent calibration improves the low-bit
--Δ-- BF16 -□- OSCAR RoLaQ
(a) KV capacity

(b) Long input

(c) Long output
(d) High concurrency
Figure 6: Serving performance of DeepSeek-V2-Lite on an A100 80GB GPU. (a) KV token capacity. (b,c) Decode throughput for long inputs and successive output intervals, with four concurrent requests. (d) P99 time to first token (TTFT) under increasing concurrency. OSCAR and ROLAQ share the INT2 kernels, so their overlapping curves use timings measured with ROLAQ under the same workloads.
representation, while token protection retains selected tokens at high precision; their benefits can therefore be combined. With only 4 sink and 8 recent tokens protected, ROLAQ already exceeds the strongest baseline using 4 sink and 16 recent tokens on each model (Tables 8 and 1).
5.5 Serving Efficiency
We integrate ROLAQ into SGLang (Zheng et al., 2024) with Triton kernels for packed INT2 cache writes and attention. We fold read-side rotations into projections and apply thresholds and gains during cache writes ( ). We benchmark DeepSeek-V2-Lite on one A100 80GB against SGLang's default BF16 implementation with identical workloads and memory budgets (Appendix D).
Under the same memory budget, ROLAQ and OSCAR each accommodate 4.56M KV tokens, compared with 1.15M for BF16, providing the capacity (Figure 6(a)). Decode throughput reaches BF16 with 256K input tokens and during the 128K–256K output interval (Figure 6(b,c)). At 256 concurrent requests, P99 TTFT falls by 37.8%, from 588.6 s to 366.0 s (Figure 6(d)). These measurements demonstrate greater KV capacity, faster decoding, and lower first-token tail latency in a practical serving system.
6 Related Work
KV cache quantization. KV cache quantization reduces the memory cost of long-context inference by storing cached states at lower precision. KIVI adapts quantization granularity to key and value statistics, while KVQuant combines non-uniform quantization with outlier handling (Liu et al., 2024c; Hooper et al., 2024). GEAR combines low-bit quantization with low-rank and sparse components to compensate errors (Kang et al., 2024), while ZipCache assigns higher precision to salient tokens (He et al., 2024). Retaining recent tokens or attention sinks in full precision provides another way to control error (Liu et al., 2024c; Su et al., 2025). SnapMLA combines FP8 MLA caches with hardware-aware decoding while retaining RoPE keys in high precision (Zhang et al., 2026).
Rotation and calibration. Beyond the quantizer itself, representation transforms help control outliers at low bitwidths while preserving full-precision computation. QuaRot uses Hadamard rotations, while SpinQuant learns rotations through calibration (Ashkboos et al., 2024; Liu et al., 2025b). RotateKV and KVarN adapt KV caches through outlier-aware rotations and variance normalization, respectively (Su et al., 2025; Muller et al., 2026). OmniQuant learns clipping and equivalent transformations with pretrained weights frozen, motivating joint calibration of representations and quantization ranges (Shao et al., 2024).
Recent methods further tailor calibration to how cache errors affect attention. OSCAR derives rotations from attention-aware covariance statistics and supports MLA (Zhou et al., 2026), while OptR learns per-head key and value rotations through attention-output reconstruction after the output projection (Yun et al., 2026). QuantMLA learns offline-fusible transformations for content and RoPE caches, using attention-output and positional-QK reconstruction objectives, respectively (Su et al., 2026). ROLAQ uses MLA's K/V projection structure to guide joint calibration of the shared latent rotation and quantization range.
7 Conclusion
We presented ROLAQ for joint calibration of MLA's latent rotation and quantization range at two bits. K/V projection geometry provides a compact rotation search space, while coupled thresholds and gains control reconstruction response. Experiments show higher average accuracy across three MLA models and better long-context retrieval, with further gains from token protection. Our SGLang implementation increases KV capacity and throughput while reducing latency at high concurrency.
Limitations
Further compression of MLA caches must account for both content and position. ROLAQ quantizes the shared content latent while retaining the RoPE key in BF16, leaving positional keys and group metadata as a substantial share of the remaining cache. Extending these savings calls for coordinated content and positional precision while preserving attention's ability to distinguish positions. The serving benefits of low-bit caches also depend on hardware and workload. Bandwidth savings are most valuable when reading a long history dominates decoding. At shorter contexts, quantization and unpacking overheads can offset them. Our serving measurements use DeepSeek-V2-Lite on an A100. Extending these benefits calls for kernels tailored to the target hardware and workload.
References
Saleh Ashkboos, Amirkeivan Mohtashami, Maximilian L Croci, Bo Li, Pashmina Cameron, Martin Jaggi, Dan Alistarh, Torsten Hoefler, and James Hensman. 2024. Quarot: Outlier-free 4-bit inference in rotated llms. Advances in Neural Information Processing Systems, 37:100213–100240.
Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. 2021. Program synthesis with large language models. arXiv preprint arXiv:2108.07732.
Yoshua Bengio, Nicholas Léonard, and Aaron Courville. 2013. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432.
Stella Biderman, Hailey Schoelkopf, Lintang Sutawika, Leo Gao, Jonathan Tow, Baber Abbasi, Alham Fikri Aji, Pawan Sasanka Ammanamanchi, Sidney Black, Jordan Clive, et al. 2024. Lessons from the trenches on reproducible evaluation of language models. arXiv preprint arXiv:2405.14782.
Julian Jakob Bussgang et al. 1952. Crosscorrelation functions of amplitude-distorted Gaussian signals. Technical report, Research Laboratory of Electronics, Massachusetts Institute of Technology.
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde De Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. 2021. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374.
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. 2021. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168.
Ozlem Tugfe Demir and Emil Bjornson. 2020. The Bussgang decomposition of nonlinear systems: Basic theory and MIMO extensions [lecture notes]. IEEE Signal Processing Magazine, 38(1):131–136.
Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe, Charles Foster, Jason Phang, Horace He, Anish Thite, Noa Nabeshima, et al. 2020. The pile: An 800gb dataset of diverse text for language modeling. arXiv preprint arXiv:2101.00027.
GLM-5-Team, :, Aohan Zeng, Xin Lv, Zhenyu Hou, Zhengxiao Du, Qinkai Zheng, Bin Chen, Da Yin, Chendi Ge, Chenghua Huang, Chengxing Xie, Chenzheng Zhu, Congfeng Yin, Cunxiang Wang, Gengzheng Pan, Hao Zeng, Haoke Zhang, Haoran Wang, and 168 others. 2026. GLM-5: from Vibe Coding to Agentic Engineering. Preprint, arXiv:2602.15763.
Yefei He, Luoming Zhang, Weijia Wu, Jing Liu, Hong Zhou, and Bohan Zhuang. 2024. Zipcache: Accurate and efficient kv cache quantization with salient token identification. Advances in Neural Information Processing Systems, 37:68287–68307.
Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. 2020. Measuring massive multitask language understanding. arXiv preprint arXiv:2009.03300.
Coleman Hooper, Sehoon Kim, Hiva Mohammadzadeh, Michael W Mahoney, Yakun S Shao, Kurt Keutzer, and Amir Gholami. 2024. Kvquant: Towards 10 million context length llm inference with kv cache quantization. Advances in Neural Information Processing Systems, 37:1270–1303.
Cheng-Ping Hsieh, Simeng Sun, Samuel Kriman, Shantanu Acharya, Dima Rekesh, Fei Jia, Yang Zhang, and Boris Ginsburg. 2024. RULER: What's the real context size of your long-context language models? arXiv preprint arXiv:2404.06654.
Shengding Hu, Yuge Tu, Xu Han, Chaoqun He, Ganqu Cui, Xiang Long, Zhi Zheng, Yewei Fang, Yuxiang Huang, Weilin Zhao, et al. 2024. MiniCPM: Unveiling the Potential of Small Language Models with Scalable Training Strategies. arXiv preprint arXiv:2404.06395.
Mandar Joshi, Eunsol Choi, Daniel S Weld, and Luke Zettlemoyer. 2017. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1601–1611.
Hao Kang, Qingru Zhang, Souvik Kundu, Geonhwa Jeong, Zaoxing Liu, Tushar Krishna, and Tuo Zhao. 2024. Gear: An efficient kv cache compression recipe for near-lossless generative inference of llm. arXiv preprint arXiv:2403.05527.
Haonan Li, Yixuan Zhang, Fajri Koto, Yifei Yang, Hai Zhao, Yeyun Gong, Nan Duan, and Timothy Baldwin. 2024. Cmmlu: Measuring massive multitask language understanding in chinese. In Findings of the Association for Computational Linguistics: ACL 2024, pages 11260–11285.
Aixin Liu, Bei Feng, Bin Wang, Bingxuan Wang, Bo Liu, Chenggang Zhao, Chengqi Deng, Chong Ruan, Damai Dai, Daya Guo, et al. 2024a. Deepseek-v2: A strong, economical, and efficient mixture-of-experts language model. arXiv preprint arXiv:2405.04434.
Aixin Liu, Bei Feng, Bing Xue, Bingxuan Wang, Bochao Wu, Chengda Lu, Chenggang Zhao, Chengqi Deng, Chenyu Zhang, Chong Ruan, et al. 2024b. Deepseek-v3 technical report. arXiv preprint arXiv:2412.19437.
Jingyuan Liu, Jianlin Su, Xingcheng Yao, Zhejun Jiang, Guokun Lai, Yulun Du, Yidao Qin, Weixin Xu, Enzhe Lu, Junjie Yan, et al. 2025a. Muon is scalable for llm training. arXiv preprint arXiv:2502.16982.
Zechun Liu, Changsheng Zhao, Igor Fedorov, Bilge Soran, Dhruv Choudhary, Raghuraman Krishnamoorthi, Vikas Chandra, Yuandong Tian, and Tijmen Blankevoort. 2025b. Spinquant: Llm quantization with learned rotations. In International Conference on Learning Representations, volume 2025, pages 92009–92032.
Zirui Liu, Jiayi Yuan, Hongye Jin, Shaochen Zhong, Zhaozhuo Xu, Vladimir Braverman, Beidi Chen, and Xia Hu. 2024c. Kivi: A tuning-free asymmetric 2bit quantization for kv cache. arXiv preprint arXiv:2402.02750.
Stuart Lloyd. 1982. Least squares quantization in PCM. IEEE transactions on information theory, 28(2):129–137.
Joel Max. 1960. Quantizing for minimum distortion. IRE Transactions on Information Theory, 6(1):7–12.
Lorenz K Muller, Philippe Bich, Chiara Boretti, Hyun-Min Chang, Jiawei Zhuang, and Lukas Cavigelli. 2026. KVarN: Variance-Normalized KV-Cache Quantization Mitigates Error Accumulation in Reasoning Tasks. arXiv preprint arXiv:2606.03458.
Wenqi Shao, Mengzhao Chen, Zhaoyang Zhang, Peng Xu, Lirui Zhao, Zhiqian Li, Kaipeng Zhang, Gao Peng, Yu Qiao, and Ping Luo. 2024. Omniquant: Omnidirectionally calibrated quantization for large language models. In International Conference on Learning Representations, volume 2024, pages 45472–45496.
Zunhai Su, Zhe Chen, Wang Shen, Hanyu Wei, Linge Li, Huangqi Yu, and Kehong Yuan. 2025. Rotatekv: Accurate and robust 2-bit kv cache quantization for llms via outlier-aware adaptive rotations. arXiv preprint arXiv:2501.16383.
Zunhai Su, Yuxuan Sun, Jianchao Tan, Tao Zhang, Ruihan Hu, Yuchen Xie, Xunliang Cai, and Ngai Wong. 2026. QuantMLA: Function-Aligned Dual-Path Quantization for Low-Bit MLA KV Caching. arXiv preprint arXiv:2609.36760.
tencent. 2026. Hy4-preview. Official model documentation.
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems, 30.
Guangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han, and Mike Lewis. 2024. Efficient streaming language models with attention sinks. In International Conference on Learning Representations, volume 2024, pages 21875–21895.
Vincent-Daniel Yun, Woosang Lim, Minsoo Cheong, Sunwoo Lee, Murali Annavaram, Sai Praneeth Karimireddy, and Sungjoo Yoo. 2026. Output-Aware Rotation for INT2 KV-Cache Quantization. Preprint, arXiv:2608.02691.
Yifan Zhang, Zunhai Su, Shuhao Hu, Rui Yang, Wei Wu, Yulei Qian, Yuchen Xie, and Xunliang Cai. 2026. SnapMLA: Efficient Long-Context MLA Decoding via Hardware-Aware FP8 Quantized Pipelining. arXiv preprint arXiv:2602.10718.
Lianmin Zheng, Liangsheng Yin, Zhiqiang Xie, Chuyue Sun, Jeff Huang, Cody H Yu, Shiyi Cao, Christos Kozyrakis, Ion Stoica, Joseph E Gonzalez, et al. 2024. Sglang: Efficient execution of structured language model programs. Advances in neural information processing systems, 37:62557–62583.
Zhongzhu Zhou, Donglin Zhuang, Jisen Li, Ziyan Chen, Shuaiwen Leon Song, Ben Athiwaratkun, and Xiaoxia Wu. 2026. OSCAR: Offline Spectral Covariance-Aware Rotation for 2-bit KV Cache Quantization. arXiv preprint arXiv:2605.17757.
A Implementation and Evaluation Details
A.1 Models and Evaluation
The three models let us examine shared-latent quantization across both mixture-of-experts and dense architectures (Table 5). DeepSeek-V2-Lite and Moonlight each have 16B total parameters; Moonlight follows the DeepSeek-V3 architecture. MiniCPM3 is a dense 4B model with a smaller latent and more layers. We use lm-evaluation-harness (Biderman et al., 2024) with the few-shot settings in Table 6 and greedy decoding for generation tasks.
| Model | Type | Layers | ||
|---|---|---|---|---|
| DeepSeek-V2-Lite | MoE | |||
| Moonlight-16B-A3B | MoE | |||
| MiniCPM3-4B | Dense |
Table 5: Model configurations; and are the content-latent and RoPE-key dimensions.
| Benchmark | Shots | Metric |
|---|---|---|
| MMLU | Accuracy | |
| CMMLU | Accuracy | |
| TriviaQA | Exact match | |
| GSM8K | Exact match | |
| HumanEval | pass@1 | |
| MBPP | pass@1 |
Table 6: Downstream evaluation settings.
The benchmarks cover both answer selection and free-form generation. MMLU and CMMLU report accuracy weighted by subject size; TriviaQA uses exact match, and GSM8K uses flexible answer extraction. HumanEval and MBPP report greedy pass@1. MiniCPM3 uses its chat template, with HumanEval code extracted from the generated response. For MBPP, we truncate code at the first new example or trailing assertion block and remove test calls before rescoring all methods with a common evaluator.
Our long-context evaluation focuses on RULER's eight retrieval tasks: three single-key, three multi-key, one multi-value, and one multi-query task. This set tests whether the cache preserves the information needed to recover a specified item as the surrounding context grows. Each task contains 100 examples scored with the official evaluation functions.
A.2 Baseline Implementations
We compare the methods at the same point in the MLA computation: the shared content latent before the K/V up-projections. The RoPE key remains in BF16 for every method. The group size is 128; RTN, QuaRot, and OSCAR group latent coordinates within each token, whereas KVarN groups tokens for channel-wise quantization. The formulas below describe the transformations used in our MLA evaluation. We write for quantization followed by reconstruction.
RTN. For a group , let and . With step size , the affine min-max quantizer is
Constant groups are reconstructed exactly. RTN applies directly to each content-latent group.
QuaRot. Following the cache rotation in QuaRot (Ashkboos et al., 2024), we use a block-diagonal matrix of normalized 128-dimensional Hadamard transforms:
The Hadamard transform mixes coordinates before rounding, providing a data-independent rotation reference with the backbone frozen.
KVarN. KVarN (Muller et al., 2026) combines a normalized Hadamard rotation with variance balancing across tokens and latent channels. For a tile of up to 128 tokens, let . Diagonal scales and balance its channel and token axes, respectively:
We use 16 alternating variance-normalization iterations and apply to each row of across tokens. Padding is excluded from the statistics. We also quantize partial tiles; single-token updates use Hadamard rotation followed by RTN over groups of latent coordinates.
OSCAR. We use the official MLA recipe of OSCAR (Zhou et al., 2026), with the per-layer rotation fitted on Pile text by its calibration code. Let denote its group-normalized four-level reconstruction in Eq. 5, with fixed threshold and gain :
We also use to initialize RoLAQ.
A.3 Calibration and Storage
Calibration adapts the cache representation while leaving the language model unchanged. All three models use the settings in Table 7. The Pile training text is disjoint from the text used to fit OSCAR's initial rotation. We update only the rotation and thresholds, with the teacher and backbone frozen. No tokens are protected during calibration, so the learned parameters are exposed to quantization throughout the sequence. We reuse these checkpoints across all protection budgets.
| Setting | Value |
|---|---|
| Calibration data | Pile, 1,430,800 tokens |
| Sequence length | 512–4,096 tokens |
| Optimizer / updates | Adam / 427 |
| Rotation learning rate | |
| Threshold learning rate | |
| Learning-rate schedule | Cosine |
| Gradient-norm clipping | 1.0 |
| Auxiliary weight λ | 0.1 |
| Response κ | 1 |
| Quantization group size | 128 |
| Protected training tokens | 0 |
| Random seeds | 42, 43, 44 |
Table 7: Calibration hyperparameters.
Selecting a checkpoint. We select checkpoints by prediction fidelity on held-out Pile text. For each context setting, denotes the teacher-forced KL to BF16 divided by OSCAR's KL on the same text. The selection score is a weighted average of the KL ratios for short, 2K, and 4K contexts:
We keep the checkpoint with the lowest . Thus, indicates lower prediction divergence than OSCAR, and selection reflects behavior across several context lengths.
Quantization grid. We use groups of coordinates and OSCAR's four-level affine grid, with and . The outer level and initial threshold follow its Gaussian Lloyd-Max construction; the inner levels give an equally spaced reconstruction grid. Each layer learns its threshold and derives the gain from , starting at for the initial threshold.
Storage accounting. The cache stores three kinds of information: packed content codes, group statistics, and the RoPE key. With two bits per content coordinate, two FP32 scalars per group, and a BF16 RoPE key, an unprotected token requires bytes per layer. This gives 288 bytes for DeepSeek-V2-Lite and Moonlight, and 144 bytes for MiniCPM3. Protected tokens additionally require BF16 content storage. The allocation measurements in Appendix D include the packed buffers, group metadata, and token-protection buffers.
B Supplementary Method Analysis
The method combines a choice of rotation space with control over quantizer response. We first describe the observations behind these choices, then make the rotation variants explicit and derive the response constraint.
B.1 Motivating Observations
The two observations separate direction from scale. Projection energy measures how strongly latent directions affect the K/V projections, while the gain intervention changes reconstruction strength without changing the rotation or the assignments.
Projection energy. For each layer, we extract the native, head-interleaved key and value blocks of the frozen up-projection and form as in Eq. 3. Let be the eigenvectors of , ordered by descending eigenvalue. For , the fraction of projection energy in the first directions is
Figure 2a reports , averaged equally over all 27 DeepSeek-V2-Lite layers, 27 Moonlight layers, and 62 MiniCPM3 layers. The error bars are sample standard deviations across layers. The same subspace is used for the key and value measurements within each layer. All matrix products and eigendecompositions use FP64 on the original stored weights. Figure 7 shows the full cumulative energy profiles for both projections.
Gain intervention. Figure 2b uses the OSCAR rotation before learned refinement and its threshold in every layer. We vary the gain uniformly across layers, holding both and fixed. The six evaluated gains are approximately ; the original gain is . All content tokens are quantized; RoPE keys remain in BF16. We use 12 natural documents, two each from PG-19,

Figure 7: Cumulative K/V projection energy in the common joint eigenbasis. Solid and dashed curves denote keys and values, respectively; shading shows one standard deviation across layers. The diagonal gives the isotropic reference. The vertical line marks the equal-dimensional split used in Figure 2a.
Wikipedia, EuroParl, HackerNews, arXiv, and PileCC, with 8,192 tokens of context. Each document contributes the mean over its final 1,024 next-token predictions. Each plotted value is the mean over documents divided by that model's mean at ; the curves connect the six measured settings.
B.2 Rotation Search Spaces
All variants start from the same covariance-aware rotation . They differ in which directions can mix during refinement and in how the orthogonal update is parameterized. Writing these choices explicitly separates the effect of the K/V geometry from the size of the trainable search space.
Full exponential rotation. A dense generator defines
Every latent direction can mix with every other direction. This provides the unrestricted exponential reference for the structured variants.
Cayley rotation. Using the same dense skew-symmetric generator, Cayley replaces the matrix exponential with
The trainable parameter count remains , so this comparison changes the orthogonal map while keeping the generator unrestricted.
Joint-energy blocks: . The structured variants use , where and . For the joint-energy basis,
(18)
We order eigenvalues from largest to smallest and split into two equal halves. These blocks separate high and low joint projection energy, while each still contributes to both keys and values.
K/V-contrast blocks: . Replacing the sum by the difference gives
(19)
Here the signed eigenvalues measure the relative strength of the key and value projections along each direction. The leading half is more key-dominant; the trailing half is more value-dominant.
Random subspaces. The random control uses the same block sizes but replaces the K/V basis with a fixed random orthogonal basis:
It therefore retains the trainable parameters of the spectral variants while removing their K/V-based grouping. All generators are initialized at zero, recovering , and all variants export a dense rotation for inference. The random control uses seed 42; the other variants use three seeds.
B.3 Response of the Four-Level Quantizer
Decision thresholds and reconstruction levels determine a scalar quantizer’s distortion (Lloyd, 1982; Max, 1960). To isolate the scale change introduced by quantization, we separate the part of the reconstruction aligned with the input from its residual. This gives the linear response used in §3.2. For , let denote the standard normal density. Symmetry of the code in Eq. 5 gives
(21)
which is , using . Since , the least-squares coefficient of on is , and the residual satisfies (Bussgang et al., 1952; Demir and Bjornson, 2020). Setting preserves the component aligned with the input, while captures the remaining quantization noise.
For a fixed threshold, the gain that minimizes the Gaussian reconstruction error is , which gives near . Thus, reducing reconstruction error can favor a weaker reconstructed signal. Coupling to through instead anchors the aligned component while allowing the decision boundary to adapt. Section 5.3 tests how this response affects prediction fidelity across context lengths.
We bound so that . The official setting gives , and at the official threshold corresponds to .
C Additional Results
These results expand the main comparisons along three dimensions: token-protection budget, calibration seed, and range calibration. We then examine the learned thresholds and concrete model responses to connect the aggregate scores with the behavior of the cache.
C.1 Token Protection and Calibration Seeds
The intermediate budget of 4 sink and 8 recent tokens fills the gap between the two settings in Table 1. Table 8 reports all six tasks at this budget, where ROLAQ again has the highest mean among the compared 2-bit methods on all three models. Together with the main table, it shows how latent calibration and token protection combine across protection budgets.
Tables 9, 10, and 11 expand the method averages into seeds 42, 43, and 44 for the three protection settings. Each seed corresponds to one calibrated checkpoint reused across protection budgets, so the tables show both calibration variation and the effect of protecting more tokens. Standard deviations are computed across seeds for each task; for Avg., they are computed from the three six-task means. DS, ML, and CPM denote DeepSeek-V2-Lite, Moonlight, and MiniCPM3.
C.2 Range Calibration on MiniCPM3
With the search space fixed, Table 12 compares freely learned gain with gain coupled to the threshold on MiniCPM3. Coupling gain to threshold reduces the mean validation KL ratio from 0.606 to 0.527 and its variation across calibration seeds. Thus, response control improves prediction fidelity within the same structured rotation space.
C.3 Learned Thresholds
The response constraint leaves each layer free to choose its quantization boundary. Figure 8 shows the resulting profiles across rotations and seeds. Most layers move below the initial Lloyd–Max threshold, with thresholds concentrated around , 0.89, and 0.85 for the three models. Lower thresholds narrow the central assignment region, while the coupled gain preserves unit response. The layerwise profiles therefore show how the quantizer adapts its assignments under a shared response constraint.
C.4 Case Study
Tables 13 and 14 present four selected examples from DeepSeek-V2-Lite. With the same token protection budget, ROLAQ preserves the correct BF16 answers while both QuaRot and OSCAR fail.
In Table 13(a), both baselines divide the chips in one bag among five people, overlooking the second bag. ROLAQ counts both bags and obtains 22 chips per person. In (b), both baselines return the total requirement of 600 feet; ROLAQ subtracts the 6 feet already available and answers 594. Across all 1319 GSM8K problems, ROLAQ solves 277 that OSCAR misses and misses 69 that OSCAR solves.
In 16K retrieval (Table 14), QuaRot changes two digits of the value requested by a single-key query, while OSCAR returns a different number. For four queried keys, OSCAR repeats two values and omits the others; QuaRot repeats an unrelated number. ROLAQ retrieves the correct value or complete set in each case.
| Method | Knowledge & QA | Math | Code | Avg. | |||
|---|---|---|---|---|---|---|---|
| MMLU | CMMLU | TriviaQA | GSM8K | HumanEval | MBPP | ||
| DeepSeek-V2-Lite | |||||||
| BF16 | 58.0 | 64.1 | 65.2 | 37.4 | 28.0 | 43.4 | 49.4 |
| RTN | 43.0 | 49.6 | 55.0 | 13.3 | 18.9 | 26.0 | 34.3 |
| QuaRot | 53.1 | 60.1 | 62.4 | 30.3 | 27.4 | 36.2 | 44.9 |
| KVarN | 52.8 | 59.0 | 62.6 | 29.5 | 24.4 | 39.8 | 44.7 |
| OSCAR | 49.9 | 57.4 | 61.2 | 18.4 | 25.6 | 37.8 | 41.7 |
| RoLAQ | 55.5 | 62.1 | 64.4 | 33.8 | 27.4 | 42.1 | 47.6±0.6 |
| Moonlight-16B-A3B | |||||||
| BF16 | 70.0 | 78.2 | 66.4 | 73.5 | 47.0 | 53.4 | 64.7 |
| RTN | 65.1 | 71.8 | 62.3 | 60.9 | 39.0 | 47.2 | 57.7 |
| QuaRot | 65.4 | 72.6 | 62.3 | 64.8 | 42.7 | 51.6 | 59.9 |
| KVarN | 63.0 | 67.4 | 57.3 | 61.0 | 41.5 | 43.0 | 55.5 |
| OSCAR | 67.5 | 74.9 | 63.0 | 68.8 | 40.2 | 48.0 | 60.4 |
| RoLAQ | 67.5 | 75.7 | 64.2 | 70.0 | 43.9 | 49.3 | 61.8±0.4 |
| MiniCPM3-4B | |||||||
| BF16 | 64.4 | 72.9 | 36.2 | 75.7 | 74.4 | 51.8 | 62.6 |
| RTN | 58.9 | 66.9 | 32.1 | 64.1 | 68.9 | 46.8 | 56.3 |
| QuaRot | 62.4 | 70.0 | 34.0 | 70.1 | 70.7 | 48.2 | 59.2 |
| KVarN | 62.8 | 70.8 | 34.4 | 72.3 | 67.7 | 50.4 | 59.7 |
| OSCAR | 63.0 | 71.4 | 34.5 | 73.5 | 70.1 | 50.2 | 60.5 |
| RoLAQ | 63.4 | 71.1 | 34.9 | 73.4 | 73.4 | 50.7 | 61.1±0.1 |
Table 8: Accuracy (%) with 4 sink and 8 recent BF16 tokens.
| Model | Seed | MMLU | CMMLU | TriviaQA | GSM8K | HumanEval | MBPP | Avg. |
|---|---|---|---|---|---|---|---|---|
| DS | 42 | 55.1 | 61.5 | 63.8 | 31.6 | 26.8 | 42.4 | 46.9 |
| DS | 43 | 55.3 | 61.5 | 64.1 | 32.5 | 26.2 | 42.2 | 47.0 |
| DS | 44 | 54.8 | 61.6 | 64.3 | 32.3 | 23.2 | 40.8 | 46.2 |
| std | 0.21 | 0.04 | 0.24 | 0.47 | 1.96 | 0.87 | 0.44 | |
| ML | 42 | 67.1 | 74.8 | 63.0 | 65.7 | 38.4 | 47.2 | 59.4 |
| ML | 43 | 67.6 | 74.8 | 63.0 | 67.0 | 42.7 | 48.8 | 60.7 |
| ML | 44 | 67.5 | 75.2 | 63.5 | 66.9 | 40.2 | 47.8 | 60.2 |
| std | 0.26 | 0.24 | 0.27 | 0.77 | 2.14 | 0.81 | 0.66 | |
| CPM | 42 | 63.3 | 71.0 | 35.1 | 70.7 | 68.3 | 50.0 | 59.7 |
| CPM | 43 | 63.0 | 70.9 | 34.3 | 70.4 | 64.0 | 50.0 | 58.8 |
| CPM | 44 | 62.3 | 71.1 | 34.5 | 70.2 | 68.9 | 51.0 | 59.7 |
| std | 0.54 | 0.09 | 0.42 | 0.27 | 2.66 | 0.58 | 0.53 |
Table 9: Per-seed accuracy (%) without protection. Avg. averages six tasks; std denotes sample standard deviation.
| Model | Seed | MMLU | CMMLU | TriviaQA | GSM8K | HumanEval | MBPP | Avg. |
|---|---|---|---|---|---|---|---|---|
| DS | 42 | 55.6 | 62.5 | 64.4 | 34.1 | 29.9 | 43.2 | 48.3 |
| DS | 43 | 55.4 | 61.8 | 64.2 | 33.8 | 26.8 | 41.4 | 47.2 |
| DS | 44 | 55.7 | 62.1 | 64.5 | 33.5 | 25.6 | 41.8 | 47.2 |
| std | 0.15 | 0.34 | 0.16 | 0.30 | 2.20 | 0.95 | 0.61 | |
| ML | 42 | 67.3 | 75.9 | 64.7 | 71.3 | 47.0 | 47.4 | 62.3 |
| ML | 43 | 67.7 | 75.6 | 64.0 | 68.8 | 42.7 | 51.0 | 61.6 |
| ML | 44 | 67.5 | 75.5 | 64.0 | 70.0 | 42.1 | 49.6 | 61.4 |
| std | 0.17 | 0.19 | 0.42 | 1.29 | 2.66 | 1.81 | 0.44 | |
| CPM | 42 | 63.4 | 71.1 | 35.0 | 73.1 | 73.2 | 50.2 | 61.0 |
| CPM | 43 | 63.4 | 71.2 | 34.8 | 73.3 | 73.8 | 51.2 | 61.3 |
| CPM | 44 | 63.5 | 71.1 | 35.0 | 73.8 | 73.2 | 50.6 | 61.2 |
| std | 0.06 | 0.04 | 0.12 | 0.39 | 0.35 | 0.50 | 0.15 |
Table 10: Per-seed accuracy (%) with 4 sink and 8 recent BF16 tokens.
| Model | Seed | MMLU | CMMLU | TriviaQA | GSM8K | HumanEval | MBPP | Avg. |
|---|---|---|---|---|---|---|---|---|
| DS | 42 | 55.9 | 62.5 | 64.8 | 34.6 | 26.8 | 44.0 | 48.1 |
| DS | 43 | 55.5 | 61.6 | 64.8 | 34.3 | 29.3 | 42.8 | 48.0 |
| DS | 44 | 55.9 | 62.1 | 65.0 | 33.6 | 25.0 | 40.6 | 47.0 |
| std | 0.25 | 0.45 | 0.14 | 0.54 | 2.14 | 1.72 | 0.60 | |
| ML | 42 | 67.9 | 76.2 | 65.7 | 70.4 | 46.3 | 49.2 | 62.6 |
| ML | 43 | 67.8 | 76.1 | 65.2 | 70.1 | 44.5 | 51.6 | 62.5 |
| ML | 44 | 68.0 | 75.9 | 64.9 | 71.0 | 42.1 | 49.4 | 61.9 |
| std | 0.09 | 0.18 | 0.41 | 0.46 | 2.14 | 1.33 | 0.42 | |
| CPM | 42 | 63.7 | 71.1 | 35.3 | 74.1 | 76.2 | 50.4 | 61.8 |
| CPM | 43 | 63.4 | 71.4 | 35.2 | 75.1 | 73.2 | 48.8 | 61.2 |
| CPM | 44 | 63.4 | 71.3 | 35.4 | 74.5 | 72.0 | 49.8 | 61.1 |
| std | 0.17 | 0.13 | 0.10 | 0.50 | 2.20 | 0.81 | 0.41 |
Table 11: Per-seed accuracy (%) with 4 sink and 16 recent BF16 tokens.
| Range | Validation KL |
|---|---|
| Free gain | |
Table 12: Range calibration with on MiniCPM3. is validation KL relative to OSCAR (lower is better); values are mean sample standard deviation over three seeds.

Figure 8: Learned per-layer thresholds with for all rotations and seeds. The dashed line is the Lloyd–Max threshold used by OSCAR.
| (a) Counting both bags | |
|---|---|
| Question | Mitchell is making nachos for his family. He buys two bags of chips with 55 chips each. If his family has five members, how many chips does each person get if they all get the same number? |
| Answer | 22 |
| BF16 | 22 |
| QuaRot | Each person gets 55 / 5 = <<55/5=11>>11 chips. #### 11 |
| OSCAR | There are 55 chips in each bag.If there are five people, each person gets 55 / 5 = <<55/5=11>>11 chips. #### 11 |
| RoLAQ | Mitchell buys 2 * 55 = <<2*55=110>>110 chips.There are 5 members in his family, so each person gets 110 / 5 = <<110/5=22>>22 chips. #### 22 |
| (b) Subtracting the available line | |
| Question | The caretaker of the docks needs to buy some new line. He wants 3 feet of line for every foot of dock. Right now, there is 200 feet of dock, and he has 6 feet of new line. How many feet of line does he need to buy in total? |
| Answer | 594 |
| BF16 | 594 |
| QuaRot | He needs 3*200 = <<3*200=600>>600 feet of line. #### 600 |
| OSCAR | He needs 200*3 = <<200*3=600>>600 feet of line. #### 600 |
| RoLAQ | He needs 3 feet of line for every foot of dock, so he needs 3*200 = <<3*200=600>>600 feet of line.He has 6 feet of line, so he needs to buy 600-6 = <<600-6=594>>594 feet of line. #### 594 |
Table 13: GSM8K examples on DeepSeek-V2-Lite. (a) Both bags must be counted. (b) The available line must be subtracted. We show BF16 final answers and the quantized models' solutions. All quantized methods retain 4 sink and 16 recent tokens in BF16; RoLAQ uses calibration seed 42.
| (a) Retrieving the matching value | |
|---|---|
| Needle Query | One of the special magic numbers for hesitant-finding is: 4868456.What is the special magic number for hesitant-finding mentioned in the provided text? |
| BF16 | 4868456. |
| QuaRot | 4806456. |
| OSCAR | 1807270. |
| RoLAQ | 4868456. |
| (b) Retrieving all requested values | |
| Needles | One of the special magic numbers for overjoyed-strip is: 8531380.One of the special magic numbers for drunk-notice is: 3564729.One of the special magic numbers for towering-shear is: 2264218.One of the special magic numbers for dysfunctional-brushing is: 9289908. |
| Query | What are all the special magic numbers for overjoyed-strip, drunk-notice, towering-shear, and dysfunctional-brushing mentioned in the provided text? |
| BF16 | 9289908, 8531380, 2264218, and 3564729. |
| QuaRot | 10000000, 10000000, 10000000, and 10000000, respectively. |
| OSCAR | 8531380, 2264218, 2264218, and 8531380. |
| RoLAQ | 8531380, 2264218, 9289908, and 3564729. |
Table 14: RULER examples from the 16K evaluation on DeepSeek-V2-Lite. (a) A single key is queried among multiple keys. (b) Four keys are queried together. We show the relevant context sentences and each model's first answer line, with the same protection budget and calibration seed as Table 13.
D Serving Benchmarks
We evaluate serving from three perspectives: how much context fits in the cache, how quickly decoding proceeds as the cache grows, and how long requests wait for their first token under concurrency. Tables 15–17 report the capacity, throughput, and latency measurements in Figure 6.
The experiments use the final , checkpoint of DeepSeek-V2-Lite (seed 42) on one A100 80GB PCIe GPU. Tensor parallelism is one and the static memory fraction is 0.8. The content cache uses two-bit codes; RoPE keys, 4 sink tokens, and 16 recent tokens remain in BF16. Both BF16 and RoLAQ use Triton prefill and decode kernels under the same workload and memory budget. WikiText-2 requests arrive together and generate fixed-length outputs with greedy decoding. Prefix reuse and early stopping are disabled. We report one timed run per workload after warmup.
OSCAR uses the same packed-cache layout and kernels as RoLAQ. Its curves in Figure 6(b–d) therefore reuse the RoLAQ timing values under this shared implementation. The allocation runs give the same KV capacity for both methods.
| Method | KV tokens | GiB | Ratio |
|---|---|---|---|
| BF16 | 1,151,705 | 33.36 | |
| OSCAR | 4,564,012 | 33.33 | |
| RoLAQ | 4,564,012 | 33.33 |
Table 15: Allocated KV capacity in Figure 6(a). GiB measures KV memory; ratios use BF16 as the reference.
Long-input and long-output workloads expose the growing cost of reading a larger history in two ways. The former sweeps 1K–256K input tokens with 128 output tokens; the latter starts from 128 input tokens and generates 256K tokens. Both use four concurrent requests, with K denoting 1,024 tokens. For the input sweep, decode throughput is the aggregate token rate after all requests finish prefill and before the first completes. For the output sweep, throughput is measured in successive output-token intervals beginning with the first generated token; Figure 6c plots each rate at the upper end of its interval.
| Input length | Long input | Speedup | |
|---|---|---|---|
| BF16 | RoLAQ | ||
| 1K | 366.1 | 323.6 | |
| 2K | 350.9 | 310.1 | |
| 4K | 318.4 | 308.5 | |
| 8K | 271.6 | 275.4 | |
| 16K | 210.5 | 250.2 | |
| 32K | 144.4 | 200.3 | |
| 64K | 88.8 | 154.5 | |
| 128K | 50.1 | 107.4 | |
| 256K | 27.0 | 67.7 | |
| Output interval | Long output | Speedup | |
|---|---|---|---|
| BF16 | RoLAQ | ||
| 1–1K | 379.8 | 338.3 | |
| 1K–2K | 361.6 | 319.5 | |
| 2K–4K | 334.8 | 297.4 | |
| 4K–8K | 293.2 | 294.3 | |
| 8K–16K | 236.1 | 261.8 | |
| 16K–32K | 169.7 | 222.3 | |
| 32K–64K | 106.8 | 177.3 | |
| 64K–128K | 63.2 | 128.0 | |
| 128K–256K | 34.8 | 84.4 | |
Table 16: Decode throughput (tok/s) underlying Figure 6(b,c). Both workloads use four concurrent requests. Speedups relative to BF16 are computed from unrounded measurements.
The concurrency workload instead fixes each request at 16K input and 1K output tokens and increases simultaneous arrivals from 1 to 256. P99 TTFT is measured within each burst and includes queueing and prefill. This captures the delay experienced by requests as the service becomes more heavily loaded. Capacity counts the allocated KV token slots under the same memory budget and request-slot limit, including group metadata and protected-token buffers.
| Concurrent requests | BF16 | RoLAQ |
|---|---|---|
| 1 | 1.40 | 1.44 |
| 2 | 2.83 | 2.86 |
| 4 | 5.60 | 5.73 |
| 8 | 11.19 | 11.46 |
| 16 | 22.28 | 22.97 |
| 32 | 44.60 | 46.16 |
| 64 | 89.19 | 93.29 |
| 128 | 254.87 | 182.29 |
| 256 | 588.58 | 365.99 |
Table 17: P99 TTFT (s) underlying Figure 6(d). Each request has 16K input and 1K output tokens.
E AI Assistance
We used AI assistants for code development, manuscript organization, and language editing. The authors take responsibility for the final work.