How Much VRAM Do You Need to Run an LLM Locally?
The three things that fill your GPU memory when you run a language model — weights, KV cache and overhead — with worked examples from 8B to 70B.
reviewed 2026-11-15 · by Bedino
When people ask “how much VRAM do I need for model X?” they usually get a single number, and it is usually wrong for their situation. The honest answer is a sum of three parts, and two of them depend on choices you make. Once you know the three parts you can size any model yourself.
The three parts
1. Weights. The model’s parameters, stored at some precision. This is the big, fixed part:
weights = parameters × bytes per parameter
At 16-bit precision (FP16/BF16) a parameter takes 2 bytes, so a model costs about 2 GB per billion parameters. A GGUF Q8_0 file averages about 1.06 bytes per parameter, and a Q4_K_M file about 0.6 bytes, so 4-bit quantization costs roughly 0.6 GB per billion parameters.
2. KV cache. While generating, the model keeps the attention keys and values of every token it has seen so it does not recompute them. This grows linearly with context length and with the number of concurrent sequences. It is small for a short chat and enormous for a long document. The KV cache guide covers it in detail.
3. Overhead. Activation buffers for the forward pass plus a fixed reservation for the framework (CUDA context, allocator fragmentation, cuBLAS workspaces). The calculators add about 1 GiB plus a context-dependent activation term. It is a safety margin, not a precise measurement.
Worked examples
All figures below come straight from the calculator’s formulas, at an 8,192-token context, a single request, and an FP16 KV cache. Values are in GiB.
| Model | Parameters | FP16 | Q8_0 | Q4_K_M |
|---|---|---|---|---|
| Llama 3.1 8B | 8.0 B | 17.3 | 10.3 | 6.9 |
| Qwen3 14B | 14.8 B | 30.2 | 17.3 | 11.0 |
| Qwen3 32B | 32.8 B | 64.5 | 35.9 | 21.9 |
| Llama 3.3 70B | 70.6 B | 135.7 | 74.1 | 43.9 |
Read the table the other way round and you get the hardware tiers: an 8 GB card runs an 8B model at Q4; 24 GB is where 32B models become comfortable at Q4; 70B at Q4 needs 48 GB or more (two 24 GB cards, a workstation card, or a 64 GB Mac with the GPU memory limit raised). The GPU buying guide turns this into a shopping checklist.
Context length is the part people forget
Take the same 70B Q4_K_M model. The weights are 39.7 GiB either way. At an 8k context the total is 43.9 GiB; at a 128k context the KV cache alone is 40 GiB and the activation overhead grows too, for a total of 92.7 GiB. The model did not change — the context did. If you only chat in short turns, size for 8k. If you want to paste whole codebases into the prompt, size for the context you will really use.
Concurrency multiplies the cache
If you serve several people at once, every active sequence needs its own KV cache. Llama 3.1 8B at Q4_K_M and an 8k context needs 6.9 GiB for one request, 16.5 GiB for eight and 49.5 GiB for thirty-two. The weights are shared; the cache and activations are not. This is why a card that runs a model comfortably for one user can fall over under load. The serving side of this is covered on our sister site, finetune-calc.com.
Mixture-of-Experts models
MoE models such as gpt-oss-120b or Qwen3-30B-A3B are the exception to “bigger model, slower model”. You must hold all experts in memory, so the weights follow the total parameter count (gpt-oss-120b in MXFP4 is about 58 GiB of weights). But each token only reads the active experts, so speed follows the active count (about 5 billion for gpt-oss-120b). They are memory-hungry and fast — the opposite trade-off from a dense model of the same speed.
What to do when it does not fit
In rough order of how much quality you give up:
- Shorten the context. The cheapest fix if you do not really need 32k tokens.
- Quantize the KV cache to 8-bit; it halves the cache for a negligible quality cost on most models.
- Use a lower-bit weight quantization. Q5_K_M to Q4_K_M saves about 15 percent. Below Q4 the quality drop becomes noticeable; see the quantization format guide.
- Offload some layers to the CPU. It works but slows generation to the speed of system RAM.
- Pick a smaller model, or one with a more memory-efficient architecture (the KV cache of a hybrid or MLA model is a fraction of a classic one).
- Add a second GPU. Layer splitting across two cards works fine for inference without a fast interconnect.
Check your own numbers
Pick your model, quantization and context in the VRAM estimator and compare the result to the breakdown above. To see whether a specific card can run a specific model, use Will it fit?, which also tells you how much headroom you have left for longer contexts.
- Is the VRAM figure the same as the size of the model file?
- No. The file only contains the weights. At run time the GPU also holds the KV cache (which grows with context length and with the number of simultaneous requests), activation buffers and a fixed framework reservation for the CUDA or Metal context. A 4.5 GB 8B Q4_K_M file needs roughly 7 GB of VRAM at an 8k context.
- Can I use system RAM when the model does not fit in VRAM?
- Yes, llama.cpp-style runtimes can keep some layers on the CPU, but those layers run at the speed of your system memory, which is typically 5 to 20 times slower than GPU memory. It is a way to make a model run at all, not a way to make it run fast.
- Why do your GB figures differ slightly from what nvidia-smi shows?
- The calculators show binary gigabytes (GiB, 1024³ bytes), which is what GPU tools report. A card sold as 24 GB has 24 GiB of memory, and a few hundred MB of it is reserved by the driver and display before your model loads.
- How do Mixture-of-Experts models change the maths?
- All experts must be resident in memory, so VRAM is driven by the total parameter count. Only a few experts are active per token, so speed follows the much smaller active parameter count. gpt-oss-120b, for example, stores about 117 billion parameters but activates roughly 5 billion per token.