TL;DR
RECAP is a novel post-training quantization (PTQ) framework that rescues the performance of low-bit reasoning models by calibrating them on the long, quantized histories they actually encounter during inference. By combining a "dynamic-prefix" calibration strategy with a "read-geometry" loss that weights cache errors by their impact on future attention, RECAP achieves massive accuracy gains—up to 15.8 percentage points—on challenging benchmarks like AIME-120.
What Problem Does This Paper Address?
Reasoning models, such as DeepSeek-R1, achieve their "intelligence" through long chains of thought (CoT). To make these models affordable to run, engineers often use quantization—reducing the precision of weights and activations (e.g., from 16-bit to 4-bit).
However, low-bit quantization is notoriously brutal for reasoning. Because these models generate thousands of tokens, quantization errors in the KV cache (the memory of past tokens) accumulate over time. Standard calibration methods typically look at short, isolated segments of text. This creates a "distribution shift": during calibration, the model sees clean or short-range history, but during inference, it must navigate a long, noisy, quantized past. As shown in Figure 1, this often leads to "rambling"—where the quantized model generates much longer, yet incorrect, sequences compared to the high-precision baseline.
Methods
The authors introduce RECAP (REad-geometry CAlibration with dynamic Prefixes), which tackles historical dependencies through two main innovations:
- Dynamic-Prefix Calibration: Instead of calibrating on short windows, RECAP uses a sliding "active block" that reads from a long historical "prefix." Crucially, this prefix is regenerated using the current quantizer at every update step. This ensures the model learns to reconstruct its outputs while specifically accounting for the noise present in its own quantized history. By rotating which block is "active," the method supervises every position in a long trajectory without the prohibitive cost of full-sequence reconstruction.
- Prefix Read Geometry: Not all errors in the KV cache are equally damaging. RECAP introduces an auxiliary loss function based on "attention sensitivity." It uses a first-order approximation to determine how much a change in a historical Key or Value affects the final attention output.
- Key errors are weighted by their alignment with query directions.
- Value errors are weighted by the attention strength they receive. This "geometry-aware" penalty ensures the calibration process prioritizes fixing the errors that actually distort the model's "train of thought."
Datasets
The authors evaluated RECAP across a diverse set of reasoning-heavy benchmarks:
- MATH500 & GSM8K: Mathematical word problems.
- AIME-120: High-level competitive mathematics.
- GPQA-Diamond: Graduate-level science questions.
- LiveCodeBench: Code generation.
For calibration, they used 1,000 reasoning trajectories generated by the original full-precision models from the NuminaMath-1.5 dataset.
Key Insights and Ideas
- Importance is Unpredictable: The authors found that "importance scores" (trying to predict which tokens need higher precision) transfer poorly between different problems. This motivates RECAP’s approach of supervising the entire history rather than trying to cherry-pick "important" tokens.
- The "Rambling" Effect: A key discovery was the strong correlation between quantization error and excessive generation length. When a model's "memory" (KV cache) is corrupted, it loses its place in the reasoning chain and begins to loop or wander. RECAP significantly reduces this behavior, leading to more concise and correct answers.
- Beyond MSE: Standard Mean Squared Error (MSE) on the cache is an incomplete metric. By weighting errors by their "read impact," RECAP provides a much more effective signal for preserving long-range dependencies.
Key Results
RECAP consistently outperformed state-of-the-art baselines like FlatQuant and QuaRot across multiple models (DeepSeek-R1-Distill-Qwen, Qwen3):
- Accuracy Boosts: Under the aggressive W4A4KV4 setting (4-bit weights, activations, and KV cache), RECAP improved accuracy by 13.3 percentage points on MATH500 for the 1.5B model and 15.8 points on AIME-120 for the 4B model.
- Efficiency: RECAP recovered 41–58% of the accuracy gap between the 4-bit baseline and the full-precision (BF16) model.
- Generation Quality: As seen in Figure 4, RECAP-calibrated models produced shorter, more accurate trajectories, effectively curbing the "rambling" issue seen in standard quantized models.
Limitations and Future Work
While RECAP significantly narrows the gap to full precision, it does not close it entirely, especially for the smallest models. The authors also note that while the method adds no overhead at inference time, the calibration phase is more computationally intensive than simpler methods due to the need to regenerate prefixes. Future work could explore more efficient ways to approximate the read geometry or apply these insights to even lower bit-widths (e.g., 2-bit quantization).
Summary updated