Low-Discrepancy Dither for Quantized Recurrent State Caches
Abstract
Mamba-style and hybrid language models compress their past into a fixed-size recurrent state that is rewritten at every generated token. Storing this state in low precision saves memory bandwidth, but every rounding error is fed back into the next update and can accumulate over long generations. Production systems round the state stochastically; we ask which rounding rule such caches should use. We find that a deterministic golden-ratio Weyl dither, which needs no random numbers, consistently brings the quantized model closer to the full-precision one than stochastic rounding, across pure and hybrid models, storage formats, and long decoding horizons, at no extra cost. Round-to-nearest behaves differently: because it discards small updates, its error keeps growing, so it can look best in short evaluations yet falls far behind over long generations. A discrepancy analysis explains this ordering, and we document implementation pitfalls that silently remove the benefit.
Create a lesson
Related papers
Local Affine Quantization for KV Caches: From Shared Ranges to Prediction Error
Shared title terminologycs.LGShrey Shah, Rohith Kukkala
Multi-Signal Internal-State Online Quality Monitoring for LLM Serving
Shared title terminologycs.LGYibo Zhao, Nengneng Yu, Sixian Xiong et al.
MLP Cache: A Post-Hoc Memory-Compute Trade-off for Transformer Inference
Shared title terminologycs.LGHuzheng Yang, Yiqiao Huang, Qingqiao Hu et al.
Learning interpretable Schur forms of recurrent weight matrices
Shared title terminologycs.LGAlexander Lanine, Liana Akobian, N Alex Cayco-Gajic
Compressing Gated DeltaNet States with a Shared Value Basis and an Adaptive Residual
Shared title terminologycs.LGIvan Krivorotov, Egor Maximov, Aleksei Merkelov et al.
Robust LLM-based User Simulation With Trained Latent-State Dynamics
Shared title terminologycs.LGMartin Mladenov, Jihwan Jeong, Hubert Pham et al.