If you've ever pulled a 14B or 32B GGUF model that "only takes 18 GB on disk," loaded it onto a 24 GB GPU, and immediately hit CUDA out of memory as soon as you raised context length — you ran into the KV cache
wall.

### The 3 Parts of Real Local LLM VRAM Usage 1. **Model Weights (`params × bits-per-weight / 8`)** GGUF `Q4_K_M` isn't literally 4.0 bits per weight — in `llama.cpp`, it averages ~4.83 bpw (~0.60 bytes/param). A 32.8B model like Qwen3 32B or DeepSeek-R1-Distill 32B takes ~18.5 GB just for the weights. 2. **KV Cache (`2 × layers × kv_heads × head_dim × context × 2 bytes`)** This scales linearly with context length. Push context from 4K to 32K or 64K at FP16 KV cache, and you can easily add 4–12 GB on top of the weights. 3. **Runtime Overhead (~1 GB)** CUDA/ROCm context, compute graph, and activation buffers. ### Quick Way to Check Before Downloading 20 GB Weights Instead of doing the `config.json` math by hand every time, I put together a free, zero-login client-side calculator that computes exact weights + GQA KV-cache + overhead for **Qwen3, Llama 3.3, Gemma 3, DeepSeek-R1**, and custom parameter sizes, and maps them against consumer GPUs (8 GB to RTX 5090 32 GB) and unified-memory systems (Mac Studio & 128 GB Strix Halo): 👉 **[Free Local LLM VRAM Calculator](https://runaihome.com/tools/vram-calculator/)** ### 3 Fast Fixes When You're Slightly Over VRAM - Drop context length first (32K → 8K often saves more VRAM than dropping a quant tier). - Enable 8-bit KV cache quantization (`-ctk q8_0 -ctv q8_0` in `llama.cpp` / `OLLAMA_KV_CACHE_TYPE=q8_0` in Ollama) to roughly halve KV cache memory. - Step down one GGUF tier (`Q5_K_M` → `Q4_K_M` or `Q3_K_M`) rather than offloading half the layers to system RAM. Hope this saves someone a few wasted downloads!