llama.cpp Introduces Dynamic VBR KV Cache
old-mike · reddit · 2026-07-14
This post introduces the VBR (Variable Bit Rate) KV cache, a new feature in spiritbuun's llama.cpp fork:
- Instead of a fixed KV quantization level for the entire context, it sets a floor, and the cache dynamically steps down quantization levels as the context grows.
- The -ct vbr command automatically calculates the available KV budget based on remaining VRAM and dynamically reduces precision during the decode process.
- Tested on an RTX 3060 12GB compared to fixed quantization:
- Decode TPS is only 4% slower
- TTFT is roughly halved
- Lower VRAM usage
- Automatically adapts to a context of 216k tokens
- The post also mentions a fused kernel bug, for which the author has already reverted the relevant commit.
More from Infra
- SF Compute founder: buying compute is 'an absolutely awful experience' right now — IgorCarron · 2026-09-11
- SmolVM open-sources persistent computer infrastructure for agents that outlive chat sessions — aniketmaurya · 2026-09-11
- PyTorch Day Korea 2026 launches first offline conf, CFP closes Sept 13 — PyTorch · 2026-09-11
- Local LLM server dilemma: 4x CMP-170HX (price up 53% in 20 days) vs Mac Studio M5 Ultra — rumboll · 2026-09-11
- llama.cpp lands Flash Attention tuning for RDNA4, big prefill gains on AMD — pmttyji · 2026-09-11
- Your p99 latency benchmark may be lying: a deep dive into coordinated omission — Franc0Fernand0 · 2026-09-11