VRAM calculator for local LLMs
Most calculators multiply parameters by bits and stop there. That formula ignores the KV cache and the runtime. On the three models we measured it lands between 9 % below and 10 % above reality — and those errors do not cancel when you are deciding whether a card is big enough.
Estimate
What we actually measured
Same models, same GPU, measured with nvidia-smi during generation. Compare these
with the estimate above: that difference is the reason this site exists.
| Model | Params | Quant | Measured VRAM peak |
|---|---|---|---|
| qwen3:8b | 8.2B | Q4_K_M | 6434 MB |
| gemma4:12b | 11.9B | Q4_K_M | 9610 MB |
| gemma4:26b | 25.2B | Q4_K_M | 15799 MB |
Why the formula misses
- KV cache grows with context, not with model size alone. Doubling the context roughly doubles that part of the budget.
- The runtime is not free. CUDA context, compute buffers and the tokenizer add close to a gigabyte before the first token is generated.
- Ollama and llama.cpp allocate for the maximum context, not for the prompt you happen to send.
Rule of thumb from our measurements: leave 20 % headroom. A model that "fits" at 98 % of your card will crash the moment you open a long file or a bigger context.