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
- Nearly half of Claude revenue now flows through cloud marketplace commitments, up from 11% — BenBajarin · 2026-10-26
- Anthropic ARR goes vertical after price cuts: tokens up 4x, $100B+ ARR back in play — GavinSBaker · 2026-10-26
- Alex Banks argues power caps GPU supply, real risk is demand cooling first — thealexbanks · 2026-10-26
- Analyst: Ant has the most fungible AI workload of any model provider today — BenBajarin · 2026-10-26
- Anthropic S-1: training infra edge cut per-task cost 40% and doubled revenue growth — BenBajarin · 2026-10-26
- Rewriting scaling law study: optimal synthetic data share rises from 10% to 32% with compute — heghbalz · 2026-10-26