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

Manuscript Offprint

arXiv:2610.39931

Low-Bit GDN Recurrent-State Quantization: Global Gradient-aware Allocation and Pure-Write Sliding Windows

Qinghang Huang, Xuchu Huang, Xunzhao Yin

Abstract

Linear attention stores historical information in a recurrent state of fixed size, providing a compact memory representation for long-context inference. Reducing state precision further lowers per-request storage requirements, but quantized writeback errors enter subsequent recurrences, degrade prediction quality on long-reasoning tasks, and can be accompanied by repetitive generation and excessively long outputs. We propose Global Gradient-aware Allocation (GGA) and the Pure-Write Sliding Window (PW) to address precision allocation and recent-information maintenance. GGA combines candidate quantization residuals with gradient sensitivity to future prediction loss to allocate head bit widths under a model-wide mixed-precision budget. PW independently maintains recent pure writes as FP8 vector pairs, propagates them through the full GDN state transition, and merges them into the low-bit historical state only after they leave the window. Across seven evaluations on Qwen3.5-4B/9B, GGA allocation alone improves over STEPQuant@4 by 19.48/29.84 percentage points. Adding PW-S8 yields seven-task macro-averages of 69.83%/78.63%, improving over STEPQuant@4 by 38.39/41.21 percentage points, respectively. Both precision reallocation and window maintenance improve task scores while mitigating excessively long outputs: at @6, GGA reduces mean generation length, averaged equally across tasks, by 10.45%/14.65% relative to STEPQuant; adding PW-S8 to GGA@4 further reduces mean generation length by 32.32%/36.77%. Comparisons at similar storage budgets further show that using additional capacity to maintain recent writes yields higher task scores and shorter mean outputs than solely increasing the bit width of the accumulated state.

1 Introduction

Autoregressive inference requires the continuous retention of historical information. In standard attention, the KV cache grows with sequence length, whereas linear attention compresses historical interactions into a recurrent state of fixed size [1]. Architectures such as GLA, Gated DeltaNet (GDN), and Mamba-2 further improve the expressiveness and computational efficiency of recurrent memory [2, 3, 4]. Nevertheless, even a fixed-size state must be stored separately for each concurrent request and read and updated at every decoding step; its storage and memory-access costs therefore motivate compression in inference deployment [5, 6, 7].

Recurrent-state quantization faces both precision-allocation and error-feedback challenges. Perturbations to different heads have different effects on subsequent predictions, while writeback errors introduced by stepwise quantization enter future recurrences. DAMP protects high-risk channels using decay-weighted risk, STEPQuant jointly models error persistence and readout impact, and LeapQuant delays state quantization through window buffering [5, 6, 7]. These studies provide an effective foundation for state compression and motivate two further questions: how final prediction loss can guide head precision allocation, and how recent information can be maintained according to write age.

For precision allocation, local candidate distortion and error lifetime alone do not determine changes in final predictions. State residuals of equal magnitude can have different effects because of their directions, subsequent query readouts, and downstream network mappings. We retain STEPQuant's candidate quantization formats and nominal budget, and weight candidate residuals by gradients of future language-model loss with respect to the writeback state to construct an additive risk proxy for Global Gradient-aware Allocation (GGA). For temporal maintenance, we separate pure writes in the GDN update into individual floating-point vector branches, apply the full state transition to them, and evict them individually into the low-bit historical state at a fixed age, yielding the Pure-Write Sliding Window (PW). This rolling maintenance differs from quantizing the entire state at the end of a window: the old state is still quantized at every step.

Our contributions are as follows:

• We propose Global Gradient-aware Allocation (GGA) guided by future prediction loss. Along calibration trajectories, we estimate the sensitivity of future loss to the state at each writeback position and construct comparable head risks by weighting squared candidate quantization residuals coordinatewise with squared gradients. Retaining STEPQuant's candidate quantization formats and nominal budget, we combine FP16 pivot selection with discrete bit-width optimization to reallocate precision across layers and heads; gradient computation is used only for offline calibration.

• We propose the Pure-Write Sliding Window (PW). We separate recent pure writes from the GDN recurrence, represent each branch as a vector pair, apply the full state transition at subsequent steps, and merge branches into the low-bit historical state on a rolling basis according to write age. This design retains stepwise quantization of the old state while delaying the first incorporation of recent branches into the low-bit matrix. We provide a proof of recurrence equivalence under ideal conditions and an online FP8 maintenance algorithm with per-vector scales.