arXiv(opens in a new tab)cs.CLOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.13041

RAMP: Recurrent Adaptive Mixed Precision for Efficient Prefill in Recurrent-Depth Language Models

Ke Wan, Chen Chen

Abstract

Recurrent-depth language models improve inference-time reasoning by repeatedly applying a shared network to refine internal representations, but the additional recurrent computation also increases inference cost. This overhead is particularly pronounced during long-context prefill, where the full input sequence is repeatedly processed across recurrent depth. Weight-and-activation quantization offers a natural way to accelerate this computation through lower-precision arithmetic, yet repeatedly applying quantized computation introduces numerical perturbations that accumulate along the recurrent trajectory. We systematically analyze how such errors propagate across recurrent depth and show that quantization errors introduced earlier are attenuated by more subsequent recurrent steps and therefore have a smaller effect on the final representation. Matched-budget experiments strongly support this prediction, showing that placing quantized computation earlier in recurrent depth consistently yields the best fidelity. Based on this insight, we introduce RAMP (Recurrent Adaptive Mixed Precision), which performs early recurrent refinement using low-precision weight-and-activation computation and restores high precision for terminal refinement. Across context lengths up to 4K, RAMP preserves near-full-precision prefill quality while achieving up to 1.16×1.16\times end-to-end first-prefill speedup on an NVIDIA H100, corresponding to a 13.9% latency reduction.

1 Introduction

Recurrent-depth language models provide a new way to scale inference-time computation without generating additional intermediate tokens: a shared transformation is repeatedly applied to refine internal representations (Wan & Chen, 2026). Increasing recurrent depth has been shown to improve model performance (Geiping et al., 2026), suggesting that additional recurrent computation can translate into stronger reasoning. However, this benefit comes with increased inference latency. The cost is especially pronounced during long-context prefill, where each recurrent step repeatedly processes the full input sequence. This motivates a fundamental question: can we accelerate recurrent-depth prefill while preserving the performance gains of deeper recurrent computation?

Quantization provides a natural way to reduce inference cost (Dettmers et al., 2022; Xiao et al., 2023; Lin et al., 2024). In particular, weight-and-activation quantization lowers the precision of both model parameters and intermediate activations, enabling faster low-precision arithmetic during prefill (Xiao et al., 2023; Zhao et al., 2024; Lin et al., 2025). A straightforward approach for recurrent-depth models is therefore to quantize the recurrent computation uniformly throughout prefill. However, repeatedly applying low-precision computation to an evolving representation introduces numerical perturbations at every recurrent step, causing the quantized trajectory to deviate progressively from its full-precision counterpart. A natural alternative is to use mixed precision across recurrent depth, assigning quantized computation to some recurrent steps while

Figure

(b)

Figure

Figure 1: Empirical validation of depth-dependent quantization error propagation. (a) Perturbation survival as a function of injection depth. Both Gaussian perturbations and INT8 quantization-residual perturbations exhibit substantially lower survival when injected earlier in recurrent depth, while perturbations introduced near terminal depth retain a larger fraction of their initial error. Error bars denote the original 95% confidence intervals. (b) Precision-placement comparison under the same budget of 24 FP8 and 8 BF16 recurrent steps. Each point represents one of 20 frozen random precision schedules, with the horizontal axis indicating the mean depth of its BF16 steps and the vertical axis showing final hidden-state relative error. Moving BF16 computation toward later recurrent depth is associated with lower final error. RAMP places all eight BF16 steps at the end and outperforms all 20 random schedules, whereas the reverse (EARLY-BF16) schedule places all eight BF16 steps at the beginning and produces substantially larger error.

preserving the original precision for others. This raises a fundamental question: how should a fixed precision budget be allocated across recurrent depth to maximize efficiency while preserving the fidelity of full-precision recurrence?

To understand this tradeoff, we analyze how quantization error propagates through recurrent computation. Our analysis reveals a depth asymmetry in precision requirements: under locally contractive recurrent dynamics, perturbations introduced earlier are attenuated by more subsequent recurrent steps, whereas perturbations introduced near the end retain a larger effect on the final representation. Consequently, under a fixed precision budget, placing low-precision computation early and preserving high precision for later recurrent steps minimizes the theoretical final-error bound. Based on this insight, we introduce RAMP (Recurrent Adaptive Mixed Precision), which performs early recurrent refinement with low-precision computation and reserves high precision for terminal refinement. Our contributions are summarized as follows:

  • We theoretically show that, under a fixed precision budget, quantized computation should be placed earlier in recurrent depth while high-precision computation should be preserved for later steps. As shown in Figure 1, experiments strongly support this prediction.

  • Based on this analysis, we introduce RAMP (Recurrent Adaptive Mixed Precision), a training-free mixed-precision inference method that performs early recurrent refinement with low-precision weight-and-activation computation and restores the original precision for terminal recurrent refinement.

  • We show that RAMP preserves near-full-precision prefill quality across context lengths up to 4K while achieving up to 1.16×1.16 \times end-to-end first-prefill speedup on an NVIDIA H100, corresponding to a 13.9% reduction in latency.

References (18)