How Much VRAM is Needed to Run a Model
Summary
You need approximately 1.2–2 times the size of the model file in memory. A model with 7 billion parameters in quantization Q4 takes around 4–5 GB — fitting into an 8 GB GPU. Here’s how to calculate more precisely and what to choose for your hardware.
What Factors Contribute to VRAM Usage
Three main factors:
- Model Weights — the file with parameters. The main contributor.
- KV Cache — memory for context. The longer the dialogue and the larger the context window, the more it uses.
- Activations and Auxiliary Buffers — temporary data during calculations. Usually 10–30% extra.
Practical rule: Final VRAM ≈ model file size × 1.2–1.5 with moderate context. Longer context or larger batches — closer to ×2.
How Big Are the Models
Size depends on the number of parameters and storage precision.
Without Quantization (FP16)
Each parameter takes 2 bytes:
| Parameters | FP16 Size |
|---|---|
| 1B | ~2 GB |
| 3B | ~6 GB |
| 7B | ~14 GB |
| 8B | ~16 GB |
| 13B | ~26 GB |
| 14B | ~28 GB |
| 32B | ~64 GB |
| 70B | ~140 GB |
| 405B | ~810 GB |
| 671B | ~1.3 TB |
Without quantization, models from 70B cannot run on a regular PC — server GPUs are needed.
With Quantization (Q8, Q6, Q5, Q4)
Quantization reduces precision and compresses the model. The GGUF format is the standard for local runs.
| Parameters | Q8 | Q6 | Q4 |
|---|---|---|---|
| 7B | ~8 GB | ~6 GB | ~4.5 GB |
| 8B | ~9 GB | ~7 GB | ~5 GB |
| 13B | ~14 GB | ~11 GB | ~8 GB |
| 32B | ~35 GB | ~26 GB | ~19 GB |
| 70B | ~75 GB | ~56 GB | ~40 GB |
Files with suffixes Q4_K_M are quantized to 4 bits. Letters K, M — variants of the scheme: Q4_K_M is considered a good balance of 'quality/size'.
What Actually Runs on Different Hardware
Approximate table by VRAM volume:
| VRAM | Comfortable | Stretch |
|---|---|---|
| 6 GB | 3B in Q4, 7B in Q4 with small context | — |
| 8 GB | 7B in Q4, 8B in Q4 | 13B in Q4 (slow, small context) |
| 12 GB | 7B in Q6, 8B in Q6, 13B in Q4 | 14B in Q4 |
| 16 GB | 13B in Q5, 14B in Q5 | 32B in Q4 (partially on CPU) |
| 24 GB | 32B in Q4, 34B in Q4 | 70B in Q4 (offloaded) |
| 48 GB | 70B in Q4 | 70B in Q6 |
What Does 'Stretch' Mean
The model works, but with offloading: some layers are calculated on CPU. This is slower (1–5 tokens per second instead of 20–40), but allows running a model larger than fits in GPU.
How to Check Your GPU
Windows: Task Manager → Performance tab → GPU → 'Allocated GPU Memory'.
Linux:
nvidia-smi
Look at the Memory line — that’s your VRAM.
How to Run Locally
Two simple ways:
- Ollama — easiest:
ollama run qwen2.5, models are automatically downloaded in GGUF. - LM Studio — graphical interface: choose model from catalog, specify quantization level, run.
- vLLM — server-side option for production and batches, but requires more setup.
For personal use, start with Ollama or LM Studio.
Quick Checklist for Selection
- Check VRAM volume.
- Choose a model whose size in Q4 fits comfortably with 20–30% buffer.
- Don’t chase parameter count — quality of 7B in Q4 is often better than 'dead' 32B offloaded.
- Start with a short context, increase as needed.
- If it doesn’t fit — reduce quantization (Q8 → Q5 → Q4) or choose a smaller model.