LinQuant: Functional Invariances for Low-Precision Linear Recurrences
Organizations: MIT CSAIL · Max Planck Institute for Intelligent Systems · ETH Zürich · Tübingen AI Center ·
Abstract
Linear recurrences are emerging as practical alternatives to softmax attention in large language models, appearing in both standalone and hybrid architectures. However, despite their rapid emergence, low-precision inference remains much less developed for these models than for softmax attention. During prefill, chunkwise-parallel algorithms cast much of the recurrence as dense matrix multiplications, suggesting a natural path to low-precision execution. Simply quantizing these operations in their native form, however, can be fragile. In this work, we identify functional invariances that preserve the full-precision computation while making the operands more amenable to quantization. Building on this observation, we introduce LinQuant, a framework for low-precision recurrent prefill based on seven such invariances, including rotations, diagonal rescalings, and alternative placements of recurrent decay and write factors. We derive when these transformations remain valid across common recurrence families spanning linear, gated, and delta-rule updates, and show that they provide complementary degrees of freedom for improving low-precision accuracy. Finally, we translate this framework to production by augmenting SSDi8, an existing low-precision prefill pipeline for Mamba-2, with the applicable invariances. LinQuant improves perplexity at matched latency on Mamba-2 1.3B, 2.7B, and 8B and Nemotron-H 8B, demonstrating the practical utility of invariance-based quantization for recurrent models.
Figures & tables
| Nr. | Transformation | LA | Mamba-2 | GLA | DN | GDN | KDA |
| (1/7) | {\color[rgb]{0.0313,0.5664,0.6016}\bm{\mathrm{R}}_{QK}} | ||||||
| (2/7) | {\color[rgb]{0.8633,0.2227,0.4648}\bm{\mathrm{D}}_{QK}} | ||||||
| (3/7) | {\color[rgb]{0.0313,0.5664,0.6016}\bm{\mathrm{R}}_{V}} | ||||||
| (4/7) | {\color[rgb]{0.8633,0.2227,0.4648}\bm{\mathrm{D}}_{V}} | ||||||
| (5/7) | \big({\color[rgb]{0,0.4453,0.6992}(\bm{\mathrm{\Gamma}}^{\rightarrow}_{[i]})^{\eta}},\;{\color[rgb]{0,0.4453,0.6992}(\bm{\mathrm{\Gamma}}^{\rightarrow}_{[i]})^{1-\eta}}\big) | ||||||
| (6/7) | \big({\color[rgb]{0,0.4453,0.6992}\bm{\mathrm{E}}_{[i]}^{\eta}},\;{\color[rgb]{0,0.4453,0.6992}\bm{\mathrm{E}}_{[i]}^{1-\eta}}\big) |
| {\color[rgb]{0.0313,0.5664,0.6016}\bm{\mathrm{R}}_{QK}} | {\color[rgb]{0.0313,0.5664,0.6016}\bm{\mathrm{R}}_{QK}}+{\color[rgb]{0.8633,0.2227,0.4648}\bm{\mathrm{D}}_{QK}} | ||||
| Model | FP16 | SSDi8 | value | value | key |
| Mamba-2 | |||||
| 1.3B | 10.420 | 10.928 | 10.860 | 10.849 | 10.830 |
| 2.7B | 9.060 | 9.441 | 9.379 | 9.383 | 9.372 |
| 8B | 7.250 | 7.620 | 7.456 | 7.435 | 7.437 |
| Nemotron-H | |||||
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| model | update |
| Linear attention ( Katharopoulos et al., 2020 ) | |
| Mamba-2 ( Dao & Gu, 2024 ) | \bm{\mathrm{S}}_{t}={\color[rgb]{0,0.4453,0.6992}\alpha_{t}}\,\bm{\mathrm{S}}_{t-1}+\bm{v}_{t}\bm{k}_{t}^{\top} |
| Gated Linear Attention (GLA) ( Yang et al., 2024b ) | \bm{\mathrm{S}}_{t}=\bm{\mathrm{S}}_{t-1}\,{\color[rgb]{0,0.4453,0.6992}\operatorname{diag}(\bm{\alpha}_{t})}+\bm{v}_{t}\bm{k}_{t}^{\top} |
| DeltaNet ( Schlag et al., 2021 ; Yang et al., 2024c ) | \bm{\mathrm{S}}_{t}=\bm{\mathrm{S}}_{t-1}\,\bigl(\bm{\mathrm{I}}-{\color[rgb]{0.9023,0.625,0}\beta_{t}}\bm{k}_{t}\bm{k}_{t}^{\top}\bigr)+{\color[rgb]{0.9023,0.625,0}\beta_{t}}\,\bm{v}_{t}\bm{k}_{t}^{\top} |
| Gated DeltaNet ( Yang et al., 2025 ) | \bm{\mathrm{S}}_{t}={\color[rgb]{0,0.4453,0.6992}\alpha_{t}}\,\bm{\mathrm{S}}_{t-1}\,\bigl(\bm{\mathrm{I}}-{\color[rgb]{0.9023,0.625,0}\beta_{t}}\bm{k}_{t}\bm{k}_{t}^{\top}\bigr)+{\color[rgb]{0.9023,0.625,0}\beta_{t}}\,\bm{v}_{t}\bm{k}_{t}^{\top} |
| Kimi Delta Attention (KDA) ( Team et al., 2025 ) | \bm{\mathrm{S}}_{t}=\bm{\mathrm{S}}_{t-1}\,{\color[rgb]{0,0.4453,0.6992}\operatorname{diag}(\bm{\alpha}_{t})}\,\bigl(\bm{\mathrm{I}}-{\color[rgb]{0.9023,0.625,0}\beta_{t}}\bm{k}_{t}\bm{k}_{t}^{\top}\bigr)+{\color[rgb]{0.9023,0.625,0}\beta_{t}}\,\bm{v}_{t}\bm{k}_{t}^{\top} |
| Model | Static write scales | Dynamic write scales |
| LA | 22.7 | 26.2 |
| Mamba-2 | 16.1 | 16.4 |
| GDN | 18.4 | 18.8 |
| Method | 1.3B | 2.7B | 8B |
| WikiText-2 perplexity | |||
| FP16 | 10.42 | 9.06 | 7.25 |
| SSDi8 W4A8 (official implementation) | 10.923 | 9.430 | 7.629 |
| Value-side baseline (our re-implementation) | 10.928 | 9.441 | 7.620 |
| Prefill latency (ms) | |||
| SSDi8 W4A8 (official implementation) | 616 | 1184 | 2563 |
| Rescaling exponent | 1.3B | 8B |
| 10.858 | 7.435 | |
| 10.849 | 7.435 | |
| 10.866 | 7.441 | |
| Implementation | Latency (ms) | Relative latency |
| Without rescaling | 1.498 | 1.00 |
| Fused rescaling | 1.498 | 1.00 |
| Transformation and state basis | FP projections |
| No rotation | 10.496 |
| {\color[rgb]{0.0313,0.5664,0.6016}\bm{\mathrm{R}}_{V}} , rotated storage | 10.533 |
| {\color[rgb]{0.0313,0.5664,0.6016}\bm{\mathrm{R}}_{V}} , canonical storage | 10.497 |
LLM Quantization
Large language model quantization reduces numerical precision to lower memory use and accelerate training or inference.
See all 391 papers