LLM VRAM Calculator
See how much GPU memory an AI model needs to run or fine-tune, which GPUs and Macs it fits on, and roughly how fast it will go.
For a mixture-of-experts model, the part used for each token. Same unit as total. Only changes the speed.
Bits per weight are typical averages, approximate. Q4_K_M is the usual pick for home use.
The prompt plus the reply. 1K = 1,024 tokens; 1 token ≈ ¾ of a word.
Leave at 1 to see how many you'd need.
Each chat running at the same time keeps its own KV cache.
Sequences per step on each GPU. Use gradient accumulation for a bigger effective batch.
FP8 or Q4 cache halves or quarters the cache, with a small quality cost.
Working memory, CUDA and the framework. 10–20% is typical.
Adapters on every attention and MLP layer. 8–64 is common.
Used if the model spills out of GPU memory. Dual-channel DDR5 ≈ 60–90 GB/s.
Which GPUs and Macs fit
The same model on every common card. Macs count only the share of memory macOS gives the GPU. Tap one to pick it. Speeds are rough upper limits.
No card big enough? See what renting one costs with the GPU cloud cost calculator.
How your GPU memory is worked out
Weights + KV cache (or training extras) + overhead, then compared with your GPU.
- 1
Model weights
70.6B × 4.8 bits
÷ 8 = 39.5 GiB - 2
KV cache
2×80×8×128×2 B
× 8,192 tokens
= 2.50 GiB - 3
Add overhead
(39.5 + 2.50)
× 10% = 4.20 GiB - 4
Total vs your GPU
= 46.1 GiB
RTX 4090 24 GB
→ need 2
Read more: the formula, a worked example and every spec used
To run a model, its weights must sit in GPU memory (VRAM), along with the KV cache: the model's notes on every token of the conversation so far, which grows with the context length and with every chat running at once. On top of that comes working memory for the GPU software, usually 10–20%. Fine-tuning needs more: gradients, the optimiser's saved state and the activations kept for the backward pass.
The formula
weights = parameters × bits per weight ÷ 8
KV cache = 2 × layers × KV heads × head size × bytes per number × context tokens × batch
overhead = (weights + KV cache + training extras) × overhead %
total = weights + KV cache + training extras + overhead
full fine-tune extras = parameters × (2 gradients + 4 master copy + 8 AdamW) bytes + activations
LoRA extras = adapter weights × 16 bytes + activations
GPUs needed = total ÷ memory of one GPU, rounded up
speed ≈ memory bandwidth ÷ (active weights + KV cache)
Worked example
Llama 3.3 70B at Q4_K_M (about 4.8 bits per weight) with an 8,192-token context, FP16 KV cache and 10% overhead:
- Weights: 70.6 billion × 4.8 ÷ 8 = 42.36 billion bytes = 39.45 GiB (÷ 1,073,741,824).
- KV cache: 2 × 80 layers × 8 KV heads × 128 × 2 bytes = 327,680 bytes per token; × 8,192 tokens = 2,684,354,560 bytes = 2.50 GiB.
- Overhead: 10% × (39.45 + 2.50) = 10% × 41.95 = 4.195 GiB.
- Total: 41.95 + 4.195 = 46.145, about 46.1 GiB (49.5 GB).
- One RTX 4090 has 24 GiB, so you need 2 (48 GiB). A 64 GB Mac lets the GPU use about ¾ of it, 48 GiB, so it just fits.
- Speed: each new token reads the weights and cache once, 42.36 + 2.68 = 45.04 GB. The 4090 moves 1,008 GB/s, so 1,008 ÷ 45.04 ≈ 22 tokens a second at most (the two cards take turns, layer by layer).
Things that change the answer
- Mixture-of-experts (MoE) models like DeepSeek V3, Mixtral, Qwen3 30B-A3B and gpt-oss need memory for all their weights, but only read the active ones for each token, so they run much faster than their size suggests.
- Sliding-window attention (Gemma 3, gpt-oss, Llama 4) keeps only recent tokens in most layers, and DeepSeek's compressed cache stores far less per token, so long contexts cost them much less.
- Offloading: llama.cpp, Ollama and LM Studio can keep some layers in system RAM when the model doesn't fit. It works, but system RAM is 10–30 times slower than VRAM, so speed drops sharply.
- Several GPUs split the model by layers (they take turns, so speed stays near one card's) or by tensor parallel in vLLM (faster, but usually needs 2, 4 or 8 cards and a little extra memory on each).
- QLoRA stores the frozen model in 4-bit (about 4.25 bits per weight here) and trains small 16-bit adapters, which is how a 70B model can be fine-tuned on a single 48–80 GB card.
- Full fine-tuning with mixed precision and AdamW needs about 16 bytes per weight before activations, so even an 8B model needs over 120 GB. DeepSpeed ZeRO or FSDP split this across GPUs.
Model shapes used (approximate)
| Model | Parameters | KV numbers per token |
|---|---|---|
| Llama 3.2 1B | 1.24B | 2 × 16 × 8 × 64 |
| Llama 3.2 3B | 3.21B | 2 × 28 × 8 × 128 |
| Llama 3.1 8B | 8.03B | 2 × 32 × 8 × 128 |
| Llama 3.3 / 3.1 70B | 70.6B | 2 × 80 × 8 × 128 |
| Llama 3.1 405B | 405.9B | 2 × 126 × 8 × 128 |
| Llama 4 Scout (MoE) 75% of layers keep the last 8,192 tokens | 109B (17B active) | 2 × 48 × 8 × 128 |
| Qwen2.5 7B | 7.62B | 2 × 28 × 4 × 128 |
| Qwen2.5 14B | 14.7B | 2 × 48 × 8 × 128 |
| Qwen2.5 / QwQ 32B | 32.5B | 2 × 64 × 8 × 128 |
| Qwen2.5 72B | 72.7B | 2 × 80 × 8 × 128 |
| Qwen3 30B-A3B (MoE) | 30.5B (3.3B active) | 2 × 48 × 4 × 128 |
| Qwen3 235B-A22B (MoE) | 235B (22B active) | 2 × 94 × 4 × 128 |
| Mistral 7B | 7.25B | 2 × 32 × 8 × 128 |
| Mistral Small 24B | 23.6B | 2 × 40 × 8 × 128 |
| Mixtral 8x7B (MoE) | 46.7B (12.9B active) | 2 × 32 × 8 × 128 |
| Mixtral 8x22B (MoE) | 141B (39B active) | 2 × 56 × 8 × 128 |
| DeepSeek V3 / R1 671B (MoE) | 671B (37B active) | 61 × 576 (compressed) |
| Kimi K2 1T (MoE) | 1040B (32B active) | 61 × 576 (compressed) |
| Gemma 3 4B 83% of layers keep the last 1,024 tokens | 4.3B | 2 × 34 × 4 × 256 |
| Gemma 3 12B 83% of layers keep the last 1,024 tokens | 12.2B | 2 × 48 × 8 × 256 |
| Gemma 3 27B 83% of layers keep the last 1,024 tokens | 27.4B | 2 × 62 × 16 × 128 |
| Phi-3.5 mini 3.8B | 3.82B | 2 × 32 × 32 × 96 |
| Phi-4 14B | 14.7B | 2 × 40 × 10 × 128 |
| gpt-oss-20b (MoE) 50% of layers keep the last 128 tokens | 20.9B (3.6B active) | 2 × 24 × 8 × 64 |
| gpt-oss-120b (MoE) 50% of layers keep the last 128 tokens | 116.8B (5.1B active) | 2 × 36 × 8 × 64 |
GPUs and Macs used (approximate)
| GPU | Memory | Bandwidth |
|---|---|---|
| RTX 3060 12 GB | 12 GB | 360 GB/s |
| RTX 4060 Ti 16 GB | 16 GB | 288 GB/s |
| RTX 5060 Ti 16 GB | 16 GB | 448 GB/s |
| RTX 5080 16 GB | 16 GB | 960 GB/s |
| RTX 3090 24 GB | 24 GB | 936 GB/s |
| RTX 4090 24 GB | 24 GB | 1,008 GB/s |
| Radeon RX 7900 XTX 24 GB | 24 GB | 960 GB/s |
| RTX 5090 32 GB | 32 GB | 1,792 GB/s |
| RTX PRO 6000 Blackwell 96 GB | 96 GB | 1,792 GB/s |
| Mac 16 GB (M4) | 16 GB (~11 for GPU) | 120 GB/s |
| Mac 24 GB (M4) | 24 GB (~16 for GPU) | 120 GB/s |
| Mac 36 GB (M4 Max) | 36 GB (~24 for GPU) | 410 GB/s |
| Mac 48 GB (M4 Pro) | 48 GB (~36 for GPU) | 273 GB/s |
| Mac 64 GB (M4 Max) | 64 GB (~48 for GPU) | 546 GB/s |
| Mac 96 GB (M3 Ultra) | 96 GB (~72 for GPU) | 819 GB/s |
| Mac 128 GB (M4 Max) | 128 GB (~96 for GPU) | 546 GB/s |
| Mac 192 GB (M2 Ultra) | 192 GB (~144 for GPU) | 800 GB/s |
| Mac 512 GB (M3 Ultra) | 512 GB (~384 for GPU) | 819 GB/s |
| A100 40 GB | 40 GB | 1,555 GB/s |
| A100 80 GB | 80 GB | 2,039 GB/s |
| H100 80 GB (SXM) | 80 GB | 3,350 GB/s |
| H200 141 GB | 141 GB | 4,800 GB/s |
| AMD MI300X 192 GB | 192 GB | 5,300 GB/s |
| B200 192 GB | 192 GB | 8,000 GB/s |
Model shapes come from each model's published configuration and GPU figures from makers' spec sheets, checked 10 October 2026. Bits per weight for GGUF files are typical whole-file averages. Mac figures are one chip option for each memory size; other chips with the same memory have different bandwidth. All results are estimates: real use depends on the software (llama.cpp, Ollama, vLLM, PyTorch), its settings and the driver, so leave some headroom.
Common questions
How much VRAM do I need to run a 70B model?
At Q4_K_M (about 4.8 bits per weight) with an 8,192-token context, Llama 3.3 70B needs about 46 GiB: 39.45 GiB of weights, 2.50 GiB of KV cache and 10% overhead. That's two 24 GiB RTX 4090 cards, or a 64 GB Mac, where the GPU can use about ¾ of the memory.
How do you calculate VRAM for an LLM?
Add up the weights (parameters × bits per weight ÷ 8), the KV cache, which grows with context length and with every chat running at once, and working memory for the GPU software, usually 10–20%. Fine-tuning adds gradients, the optimiser's saved state and the activations kept for the backward pass.
How much VRAM does quantisation save?
Weights take parameters × bits per weight ÷ 8 bytes, so memory falls in step with the bits. A 70.6 billion parameter model at about 4.8 bits per weight takes 42.36 billion bytes; at 16 bits it would take over three times as much. The KV cache and overhead come on top either way.
How much VRAM do I need to fine-tune an LLM?
Full fine-tuning with mixed precision and AdamW needs about 16 bytes per weight before activations, so even an 8B model needs over 120 GB. QLoRA stores the frozen model in 4-bit and trains small 16-bit adapters, which is how a 70B model can be fine-tuned on a single 48–80 GB card.
Can I run a model that doesn't fit in my GPU's VRAM?
Yes, with offloading: llama.cpp, Ollama and LM Studio can keep some layers in system RAM when the model doesn't fit. It works, but system RAM is 10–30 times slower than VRAM, so speed drops sharply. Splitting the model across several GPUs is the faster option.
How many tokens per second will I get?
Roughly the GPU's memory bandwidth divided by the bytes read for each token, the active weights plus the KV cache. An RTX 4090 at 1,008 GB/s reading 45.04 GB per token gives at most about 22 tokens a second. Mixture-of-experts models read only their active weights, so they run much faster than their size suggests.
Related calculators
Made by Zulu Calculator, part of AlphaZulu LLC. Formulas are shown in full and rule figures are checked against official sources; see how we build calculators.