TL;DR
Modern "hybrid" LLMs juggle two distinct working memories: a traditional KV cache that balloons with every word, and a compact, fixed-size recurrent state. Until now, nobody knew how to split a tight memory budget between them without lobotomizing the model. This paper delivers the first joint quantization playbook—revealing why recurrent states shatter when squeezed too hard, why math reasoning breaks silently even at 8 bits, and how a simple "change jar" trick rescues accuracy while slashing memory by up to 68%.
What Problem Does This Paper Address?
For years, running LLMs meant managing one memory hog: the Key-Value (KV) cache of standard softmax attention, which grows linearly with context length. Today, open-weight families like Qwen3.5 interleave a few standard attention layers with many "linear-attention" layers (like Gated DeltaNet). Linear-attention layers replace the growing cache with a fixed-size matrix—the recurrent state—that gets overwritten at every token.
As shown above, at short contexts (under 768 tokens for Qwen3.5), the recurrent state is actually bigger than the KV cache; at long contexts, the KV cache dominates. Compressing memory via quantization (storing numbers in 4 or 8 bits instead of 16) is standard practice, and 4-bit KV caches are practically free. Yet recurrent states are notoriously fragile—4-bit storage breaks the model, and even 8-bit hurts. Previous research quantized each memory in isolation while holding the other at full 16-bit precision. A real serving engine, however, faces one shared memory budget: where should the bits actually go?
Methods
The author studies store-time, calibration-free "fake" quantization across Qwen3.5 models (0.8B to 9B parameters, using Gated DeltaNet) and Falcon-H1-1.5B (a Mamba-2 hybrid control). Without touching model weights or using calibration data, tensors are intercepted right as they are written to memory, compressed using asymmetric uniform group quantization (group size 128), and dequantized when read.
Because recurrent states are rewritten at every decoding step, tiny updates smaller than the quantization step get rounded down to zero, "freezing" the state. To fix this, the author pairs state quantization with Error Feedback (EF): keeping a transient, full-precision residual buffer per active request that catches the rounding dust from step $t-1$ and adds it back before quantizing step $t$.
Datasets
Because quantization is data-free, datasets are used strictly for evaluation:
- WikiText-2 and C4: Used for teacher-forced, token-by-token decoding loss (Negative Log-Likelihood, or NLL) and synthetic "Needle-in-a-Haystack" (NIAH) retrieval tests at 4k and 16k contexts.
- GSM8K: A 200-problem math subset evaluated in long-horizon "thinking mode" (up to 4,096 tokens) to stress-test multi-step reasoning. No new benchmarks are introduced.
Key Insights and Ideas
- A Massive Asymmetry Driven by the "Delta Rule": Compressing the KV cache to 4 bits is nearly invisible, because a rounding error on a past token is committed once and diluted by softmax. Compressing the GDN recurrent state to 4 bits is catastrophic, because the state feeds back into itself at every token. Crucially, the Mamba-2 control model survives 4-bit state quantization with zero loss! Unlike Mamba-2's simple additive updates, Gated DeltaNet actively erases and overwrites memory directions—making it uniquely fragile to coarse rounding.
- Your Task Dictates Your Bottleneck: Exact retrieval (finding a needle in a haystack) relies on standard attention—even a broken 4-bit recurrent state leaves retrieval near 100%, while 2-bit KV tanks it. Conversely, chain-of-thought reasoning relies on the recurrent state. Even an 8-bit state (lossless on short text!) derails 4,000-token math chains into repetitive, budget-exhausting loops—unless Error Feedback is turned on.
- Why Rounding Beats Random Noise (Idempotence): Theory suggests rounding errors should snowball at every step. Yet replacing 4-bit rounding with equal-energy Gaussian noise makes the loss nine times worse. Why? Deterministic round-to-nearest is idempotent: rounding an already-rounded number injects zero new error (which keeps total error bounded, though it also causes state freezing). Consequently, stochastic rounding—often praised in deep learning—is toxic here, multiplying loss fivefold by injecting fresh noise every step.
- Errors Don't Compound Across Memories, and Layer 0 Rules All: KV errors and state errors are almost purely additive, meaning engineers can tune them independently. Furthermore, state sensitivity doesn't follow a layer's memory decay rate; instead, up to 80% of single-layer damage is concentrated in the very first GDN layer.
Key Results
Grid of decoding loss (dNLL) across KV and state bit-widths for Qwen3.5-0.8B and 4B, comparing plain rounding (EF off) to Error Feedback (EF on).
- Asymmetry in Numbers: On Qwen3.5-0.8B, 4-bit KV adds just $+0.028$ nats of NLL loss, whereas a 4-bit state adds $+1.049$ nats ($37\times$ worse). On Falcon-H1 (Mamba-2), a 4-bit state costs virtually nothing ($+0.004$ nats).
- Rescuing Reasoning: On Qwen3.5-4B, plain 8-bit state quantization crashes GSM8K math accuracy from $0.600$ (bf16) to $0.345$. Turning on Error Feedback completely restores 8-bit accuracy to $0.600$, and lifts a 6-bit state from $0.105$ to $0.560$ (statistically indistinguishable from full precision).
- The Practical Recipe: Keep Error Feedback on at all times. At 512 tokens on Qwen3.5-4B:
- Lossless: 4-bit KV + 8-bit state + EF uses 40% of the bf16 cache footprint ($-0.001$ nats, $1.00$ NIAH retrieval).
- Aggressive: 4-bit KV + 6-bit state + EF uses 32% of the footprint ($+0.044$ nats, $0.555$ GSM8K, $1.00$ retrieval). At long contexts (32k+), the KV cache dominates memory, so state bits should be the last to go.
Limitations and Future Work
- Simulated Quantization: All experiments simulate low-bit storage in PyTorch; actual wall-clock speedups will require custom GPU kernels implementing store-time quantization and the transient EF residual buffer.
- Scope & Horizon: Reasoning was tested on a single 200-problem subset of GSM8K with one model size (4B) and a single random seed, and NLL was only checked out to 1,024 tokens.
- The 2B Mystery: Qwen3.5-2B suffered nearly double the 4-bit plain-rounding state penalty of 0.8B despite having identical cache geometry—an unexplained anomaly likely tied to packing a wider hidden state into the same memory capacity.
- Future Directions: Combining this inter-memory budget split with intra-memory mixed precision—especially keeping the ultra-sensitive first GDN layer at higher precision or using smaller group sizes ($g=32$) alongside Error Feedback.
Summary updated