How Much Graphics Card Memory Do You Need to Run an AI Model? (VRAM for LLMs)
VRAM is the memory on your graphics card, the board that holds the GPU, the chip that runs AI fast, and it decides which models you can run. The formula is simple. VRAM equals the model weights, the numbers that make up the model itself, plus the KV cache, the model's short-term memory for the conversation, plus overhead, the memory the running program uses for itself. Get those three numbers right and you will never buy the wrong card.
New to these terms? Every word is explained in the series glossary.
Think of it like a suitcase. The weights are the clothes, the KV cache is the toiletries you add as the trip goes on, and the overhead is the suitcase itself. If the clothes alone fill the case, there is no room for anything else, and the trip fails.
Here is the formula.
VRAM = weights + KV cache + overhead
Weights are the model itself. At 4-bit quantisation, which means storing each number in fewer bits so the model takes less memory, each billion parameters, the numbers the model learned in training, takes about 0.5 to 0.6 GB. At 8-bit, about 1 GB per billion. At full 16-bit, about 2 GB per billion. So a 8B model, one with 8 billion parameters (see model sizes like 7B), is about 5 GB at 4-bit, 8 GB at 8-bit, and 16 GB at 16-bit.

The same Qwen3 models at 4, 8 and 16 bit. The 4-bit weights are the smallest by far.
The KV cache is the model's short-term memory. It grows as the conversation gets longer. At an 8,000 token context, meaning the model holds about 8,000 tokens, small chunks of text, in mind at once, it is roughly 1 GB for a small model and more for a big one. Overhead is the runtime itself, the program that runs the model, about 1 to 2 GB, always there.
Animation: Weights plus KV cache and overhead stacking up inside an 8, 12 and 24 GB card, at 4-bit.
Here are three worked examples, all at 4-bit and an 8,000 token context, using the real Ollama numbers. Ollama is the free tool that downloads and runs models, and the models here are from the Qwen3 family.
| Model | Weights | KV cache + overhead | Total VRAM | Fits |
|---|---|---|---|---|
| Qwen3-8B | 5.2 GB | about 1.3 GB | about 6.5 GB | 8 GB card, tight |
| Qwen3-14B | 9.3 GB | about 1.3 GB | about 10.6 GB | 12 GB card |
| Qwen3-32B | 20 GB | about 1.2 GB | about 21.2 GB | 24 GB card |
And here is the same model at three quantisations, so you can see why 4-bit is the default.
| Model | 4-bit | 8-bit | 16-bit |
|---|---|---|---|
| Qwen3-8B | 5.2 GB | 8.9 GB | 16 GB |
| Qwen3-14B | 9.3 GB | 15.9 GB | 28 GB |
| Qwen3-32B | 20 GB | 35 GB | 64 GB |
The rule of thumb is this. Take the parameter count, halve it for 4-bit, and that is your weights in GB. Add 2 GB for cache and overhead. If the total is under your VRAM, the model fits. If it is over, go smaller or go more compressed.
The calculator below is written in Python, a popular, easy-to-read programming language.
python# A mini VRAM calculator. Run it before you download anything. def vram_gb(params_b, bits=4, context_k=8): bytes_per_weight = {4: 0.6, 8: 1.0, 16: 2.0}[bits] weights = params_b * bytes_per_weight kv_and_overhead = 1.0 + context_k * 0.05 return round(weights + kv_and_overhead, 1) print("Qwen3-8B at 4-bit:", vram_gb(8, 4), "GB") print("Qwen3-14B at 4-bit:", vram_gb(14, 4), "GB") print("Qwen3-32B at 4-bit:", vram_gb(32, 4), "GB")
Try this
Paste this into your terminal, the text window where you type commands. python3 -c runs the Python code inside the quotes.
bashpython3 -c " def vram(p, bits=4): return round(p * {4:0.6, 8:1.0, 16:2.0}[bits] + 2, 1) for size in [4, 8, 14, 32]: print(f'Qwen3-{size}B at 4-bit: {vram(size)} GB') "
Calculated your VRAM? Pick a model in Part 4. It matches the best model to your RAM, the computer's main working memory, 8 GB, 16 GB or 32 GB.
Sources
- Weights and VRAM: Ollama registry and Qwen model cards, read 2 November 2026.
- Quantisation sizes: Qwen3 FP16, FP8 and INT4 figures (FP16, FP8 and INT4 are the 16-bit, 8-bit and 4-bit number formats), Spheron and LLM Hardware, November 2026.
