Code
VBR: Variable Bit-Rate KV Cache for llama.cpp
Summary
spiritbuun llama.cpp fork (buun-llama-cpp) ships VBR as the default KV cache. Cache starts FP16 and degrades one (layer, side) tensor at a time down a price-ordered ladder (f16 → turbo8 → turbo4 → turbo3_tcq → turbo2_tcq → turbo1_tcq) using TurboQuant/TCQ codecs, following per-model KLD degrade tables. Default implicit VBR floors at turbo4; explicit -ct vbr opens the full ladder to t1. Budget is leftover VRAM after weights/compute; -c caps context so the budget is spent on quality instead of max length. CUDA-first with ROCm/HIP mirror. Related to TurboQuant (papers_local 606/640) but this is a dynamic controller, not a new codec paper.
- Venue
- GitHub
- Source
- web
- Access
- free
- License
- MIT
- License family
- Permissive
- Language
- en
- Purpose
- Dynamically degrade KV precision layer-by-layer as context grows so a session stays at the highest quality that still fits VRAM
- Scale
- GitHub 743 stars / 82 forks at check. Tweet ~212 likes / 26 retweets / ~46k views at fetch.
- Time period
- Repo created 2026-03-26. Tweet 2026-07-10. Discord posted 2026-07-15. Pushed 2026-08-14.
- Author type
- human
- Added
- Aug 14, 2026
- Verified
- Aug 14, 2026
- Research status
- done
- Found via
- #random-papers
From the source
- Repository
- spiritbuun/buun-llama-cpp
- Created
- Mar 26, 2026
- Last push
- Oct 3, 2026
- Stars
- 881
- Forks
- 97
- Main language
- C++
Tags
Topics
KV cache compression, llama.cpp inference
Research notes
- Primary: GitHub fork. Discord/X https://x.com/spiritbuun/status/2075624663598629284 via fxtwitter (1/15 thread; video demo). Related fork spiritbuun/llama-cpp-turboquant-cuda. Enable with -ct vbr / --vbr-floor / --vbr-vram. Inference kernel/code item, not a hosted corpus, so no datasets_local row. papers_local 640 (Shard) and 606 (TurboVec) are different KV-compression artifacts.
Similar entries
- Other Shard: getting to 10x KV cache compression
- Thread Scaling KV Cache Compression to Frontier Models (X thread by @RampLabs)
- Paper WeDLM: Reconciling Diffusion Language Models with Standard Causal Attention for Fast Inference
- Paper Disaggregated Quantization: Specializing LLM Prefill and Decode
- Paper SageAttention: Accurate 8-Bit Attention for Plug-and-play Inference Acceleration
- Paper Automated Tensor Scheduling for Hybrid CPU-GPU LLM Inference on Consumer Devices