KVarN Reduces VRAM for 27B Long Context
logickkk1 · hn · 2026-07-15
This post shares benchmark results from porting the KVarN structured KV cache quantization to the Bonsai runtime, aiming to reduce VRAM usage and boost generation speed for long contexts.
Core Findings
- On Bonsai-27B Q10, 120K context, RX 9070 XT:
- q80 cache: 43.4 tok/s, total VRAM 13.1GB
- kvarn4 cache: 73.0 tok/s, total VRAM 9.8GB
- Compared to the original method, the author reports a +68% speed boost and 3.3GB VRAM saved.
Method
- KVarN is based on concepts from KIVI and QuIP#.
- It applies quantization after Walsh-Hadamard transform and Sinkhorn variance equalization to mitigate quality loss from low-bit KV caches.
Practical Observations
- The author believes this approach is more valuable for scenarios requiring long context retention.
- They compared it to TurboQuant, noting that while the latter is faster, it carries a higher quality risk.
- They also mention this modification 100% breaks DFlash, but it doesn't impact their use case.
Reproduction Info
- The author ported the solution to the Bonsai runtime, modifying about 23 files / 1300 lines.
- Recommended for trying dense model long-context inference in Bonsai or similar setups: --cache-type-k kvarn4 --cache-type-v kvarn4.
More from Infra
- 80% of the DIY LLM inference hype posters have already quit — it's brutally hard systems work — abhijithneil · 2026-09-11
- Hugging Face's Ultra Scale Playbook: a free book on training LLMs on GPU clusters — mdancho84 · 2026-09-11
- Is inference latency becoming the biggest bottleneck for production AI agents? — Euphoric_Sea632 · 2026-09-11
- LLM Serving Metrics Thread: Why TPOT and Uptime Make or Break User Experience — abhijithneil · 2026-09-11
- PlanetScale launches sharded Postgres: 768 servers acting as one, 1PB scale — dhruv2038 · 2026-09-11
- Can a 7900 XTX 24GB run Qwen locally? Reddit seeks ROCm tok/s benchmarks — thenomadexplorerlife · 2026-09-11