4-bit KV Cache Tested: Perplexity Surges 43% in Long Contexts, q8_0 is the Sweet Spot
Dhan295 · reddit · 2026-08-02
A developer comprehensively tested KV cache quantization across different context lengths and found a counterintuitive phenomenon: 4-bit (q40) KV cache perplexity actually increases after 2K tokens, worsening by 43% at 8K.
Key Findings:
- q80 is practically free: Compared to f16, perplexity only increases by 0.02%–0.07%, and it remains stable in long contexts.
- q40 struggles with long context: Absolute perplexity bottoms out at 2048 tokens and then climbs, meaning the 4-bit quantization used to save VRAM specifically undermines the benefits of long context.
- Keys are the main culprit: K=q40 causes the vast majority of accuracy loss.
- Best Practice: Rather than using mixed precision K=f16, V=q40 (which is larger and slower), it's better to just use q80 for both, which achieves a perfect balance of accuracy and speed.
The author notes that testing was done on the smaller Qwen3-0.6B model, which is likely a worst-case scenario, but the conclusions sufficiently highlight the risks of blind KV quantization.
More from Infra
- One number = +27%: raising MLX's 20-op CUDA graph cap on DGX Spark boosts Qwen3 to 430 tok/s — AIFlow_ML · 2026-12-02
- Polymarket: Jensen Huang admits under oath Nvidia AI chips were diverted to China — Polymarket · 2026-12-02
- China pours billions into optical chips for AI data centers despite US curbs threat — pstAsiatech · 2026-12-02
- 2.5-bit quantization runs a 35B MoE with 1M context in ~13.4 GiB on a 16GB MacBook — MatMuloi9128 · 2026-12-02
- Air New Zealand to roll out free Starlink-powered inflight Wi-Fi starting 2027 — elonmusk · 2026-12-02
- Nvidia B300 claimed 5-6x more efficient than China GPUs, but revenue gap is only ~3x — teortaxesTex · 2026-12-02