Low-Bit GDN Recurrent-State Quantization: Global Gradient-aware Allocation and Pure-Write Sliding Windows
Organizations: Zhejiang University
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.
Figures & tables
| 934 | Count: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. |
|---|---|
| 935 | Okay, I miscounted when I said “that is 9 numbers”. |
| 947 | Okay, there are 10 divisors. |
| 948 | The list is 1, 2, 3, 4, 6, 8, 12, 16, 24, 48 is wrong. |
| 949 | Missing divisor: |
| Model | Method | AIME | HMMT | GPQA | HE+ | MATH | IFB | LCB | Macro-avg. |
|---|---|---|---|---|---|---|---|---|---|
| 4B | FP32 | 86.67 | 63.64 | 70.96 | 86.89 | 94.90 | 62.00 | 63.75 | 75.54 |
| FP16 | 84.00 | 61.82 | 71.97 | 86.28 | 95.60 | 58.00 | 62.25 | 74.27 | |
| Naive INT4 | 0.00 | 0.00 | 1.26 | 0.00 | 2.40 | 8.00 | 0.00 | 1.67 | |
| STEP@ | 0.67 | 0.00 | 16.41 | 78.96 | 47.30 | 46.50 | 30.25 | 31.44 | |
| GGA@ | 30.67 | 17.58 | 50.51 | 78.66 | 83.60 | 51.67 | 43.75 | 50.92 | |
| STEP@ +PW-S8 | 54.67 | 37.58 | 60.61 | 82.62 | 94.00 | 56.00 | 60.25 | 63.67 |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Allocation | INT2 | INT4 | INT6 | INT8 | FP16 |
|---|---|---|---|---|---|---|
| 4B | STEP@ | 380 | 119 | 158 | 79 | 32 |
| 4B | GGA@ | 369 | 139 | 151 | 77 | 32 |
| 4B | STEP@ | 214 | 185 | 140 | 197 | 32 |
| 4B | GGA@ | 215 | 171 | 165 | 185 | 32 |
| 4B | STEP@ | 0 | 302 | 164 | 270 | 32 |
| 4B | GGA@ | 0 | 293 | 182 | 261 | 32 |
| Model | Allocation | @ | @ +PW | @ | @ | @ +PW |
|---|---|---|---|---|---|---|
| 4B | STEP | 4.758 | 5.790 | 5.677 | 6.573 | 7.604 |
| GGA | 4.753 | 5.784 | 5.678 | 6.573 | 7.604 | |
| 9B | STEP | 4.755 | 5.786 | 5.677 | 6.573 | 7.604 |
| GGA | 4.749 | 5.780 | 5.679 | 6.573 | 7.604 |
| Composite impact bin | Heads | STEPQuant | GGA |
|---|---|---|---|
| 10 | 2.00 | 2.00 | |
| 7 | 4.00 | 2.57 | |
| 25 | 2.96 | 2.40 | |
| 56 | 5.14 | 3.36 | |
| 81 | 5.28 | 3.09 | |
| 104 | 4.37 | 3.13 |
| Implementation | Task | Version |
|---|---|---|
| MathArena | AIME, HMMT | b89f2f0ad64c |
| math-verify | MATH500 | 0.9.0 |
| GPQA | GPQA Diamond | 56686c06f5e1 |
| EvalPlus | HumanEval+ | 26d6d00bb1fd |
| IFBench | IFBench | 1c40f0c10d9b |
| LiveCodeBench | LCB v6 subset | 28fef95ea8c9 |
| Model | Method | AIME | HMMT | GPQA | HE+ | MATH | IFB | LCB | Mean |
|---|---|---|---|---|---|---|---|---|---|
| 4B | FP32 | 39.79 | 53.10 | 26.62 | 1.27 | 15.06 | 17.81 | 20.94 | 24.94 |
| FP16 | 47.98 | 63.50 | 28.41 | 1.30 | 16.46 | 20.92 | 22.48 | 28.72 | |
| Naive INT4 | 3.74 | 3.33 | 3.03 | 2.18 | 3.18 | 2.87 | 2.64 | 2.99 | |
| STEP@ | 94.21 | 97.13 | 84.17 | 2.06 | 56.67 | 27.30 | 46.06 | 58.23 | |
| GGA@ | 81.36 | 86.87 | 48.60 | 1.41 | 30.33 | 16.66 | 35.46 | 42.96 | |
| STEP@ +PW-S8 | 70.31 | 81.62 | 34.76 | 1.44 | 19.68 | 12.85 | 25.38 | 35.15 |
| Model | Setting | bit/value | Macro-avg. | Mean length |
|---|---|---|---|---|
| 4B | STEP@ | 5.677 | 60.38 | 37.25 |
| STEP@ +PW-S8 | 5.790 | 63.67 | 35.15 | |
| GGA@ | 5.678 | 67.23 | 32.27 | |
| GGA@ +PW-S8 | 5.784 | 69.83 | 29.07 | |
| 9B | STEP@ | 5.677 | 68.46 | 35.03 |
| STEP@ +PW-S8 | 5.786 | 70.02 | 32.39 |
| Model | Method | EOS | 100K cap | Repetition | No final | Mean length |
|---|---|---|---|---|---|---|
| 4B | FP32 | 91.81 | 4.54 | 3.65 | 7.54 | 24.94 |
| FP16 | 90.10 | 6.58 | 3.32 | 9.38 | 28.72 | |
| Naive INT4 | 100.00 | 0.00 | 0.00 | 11.62 | 2.99 | |
| STEP@ | 53.37 | 36.66 | 9.97 | 45.74 | 58.23 | |
| GGA@ | 79.43 | 14.18 | 6.38 | 19.55 | 42.96 | |
| STEP@ +PW-S8 | 91.12 | 8.36 | 0.53 | 8.88 | 35.15 |
| Model | Method | EOS | 100K cap | Repetition | No final | Mean length |
|---|---|---|---|---|---|---|
| 4B | STEP@ | 83.38 | 9.64 | 6.98 | 16.42 | 37.25 |
| GGA@ | 89.87 | 5.03 | 5.10 | 9.94 | 32.27 | |
| 9B | STEP@ | 89.40 | 8.03 | 2.57 | 10.37 | 35.03 |
| GGA@ | 95.56 | 3.29 | 1.15 | 4.18 | 26.78 |
| Model | Method | AIME | HMMT | GPQA | HE+ | MATH | IFB | LCB | Mean |
|---|---|---|---|---|---|---|---|---|---|
| 4B | STEP@ | 69.58 | 80.97 | 41.15 | 1.27 | 23.02 | 18.96 | 25.77 | 37.25 |
| STEP@ +PW-S8 | 70.31 | 81.62 | 34.76 | 1.44 | 19.68 | 12.85 | 25.38 | 35.15 | |
| GGA@ | 60.99 | 73.37 | 33.32 | 1.27 | 17.41 | 14.99 | 24.56 | 32.27 | |
| GGA@ +PW-S8 | 54.13 | 67.48 | 30.22 | 1.26 | 15.06 | 11.25 | 24.10 | 29.07 | |
| 9B | STEP@ | 62.23 | 76.95 | 40.44 | 1.05 | 19.44 | 14.31 | 30.79 | 35.03 |
| STEP@ +PW-S8 | 60.25 | 71.16 | 35.54 | 1.12 | 16.20 | 13.97 | 28.47 | 32.39 |
LLM Quantization
Large language model quantization reduces numerical precision to lower memory use and accelerate training or inference.
See all 391 papers