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
- Engram's random reads don't suit SSDs; CPU-memory over NVLink could serve all 72 GPUs — bookwormengr · 2026-09-11
- 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