# VBR: Variable Bit-Rate KV Cache for llama.cpp

- **ID:** 631
- **Kind:** code
- **URL:** https://github.com/spiritbuun/buun-llama-cpp
- **Authors:** buun
- **Venue:** GitHub
- **Published:** 2026
- **Source:** web
- **Language:** en
- **Access:** free
- **License:** MIT
- **License family:** Permissive (auto-classified)
- **Tags:** vbr, kv-cache, llama-cpp, turboquant, quantization, inference, x
- **Topics:** KV cache compression, llama.cpp inference
- **Added:** 2026-08-14
- **Verified:** 2026-08-14
- **Research status:** done
- **Needs deep evaluation:** no
- **Page:** https://papers.projxon.ai/entries/631

## 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.

## Attributes

- **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

## From the source (fetched 2026-10-03)

- **Repository:** spiritbuun/buun-llama-cpp (GitHub)
- **Created:** Mar 26, 2026 (GitHub)
- **Last push:** Oct 3, 2026 (GitHub)
- **Stars:** 881 (GitHub)
- **Forks:** 97 (GitHub)
- **Main language:** C++ (GitHub)

## 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

- [Shard: getting to 10x KV cache compression](https://papers.projxon.ai/entries/621) (other, #621)
- [Scaling KV Cache Compression to Frontier Models (X thread by @RampLabs)](https://papers.projxon.ai/entries/740) (thread, #740)
- [WeDLM: Reconciling Diffusion Language Models with Standard Causal Attention for Fast Inference](https://papers.projxon.ai/entries/1118) (paper, #1118)
- [Disaggregated Quantization: Specializing LLM Prefill and Decode](https://papers.projxon.ai/entries/829) (paper, #829)
- [SageAttention: Accurate 8-Bit Attention for Plug-and-play Inference Acceleration](https://papers.projxon.ai/entries/570) (paper, #570)
- [Automated Tensor Scheduling for Hybrid CPU-GPU LLM Inference on Consumer Devices](https://papers.projxon.ai/entries/642) (paper, #642)
