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.

Original post →

More from Infra

Infra channel →