LLM VRAM Calculator

Pick a model, quantization and context length to see how much GPU memory it needs and which GPUs can run it. An 8B model needs about 6.3 GB at Q4_K_M with 8K context; a 70B model needs about 43.2 GB.

6.3 GB VRAM

Llama 3.1 8B at Q4_K_M with 8K context and the KV cache in FP16.

  • Weights 4.5 GB
  • KV cache 1.0 GB
  • Runtime overhead 0.8 GB

Which GPUs can run it

Llama 3.1 8B VRAM requirements: every quantization and context length →

How the estimate works

Total VRAM is the sum of three parts, each calculated from the model's own config.json rather than a flat percentage:

  • Weights = parameters × bits per weight ÷ 8. Q4_K_M averages about 4.85 bits because GGUF keeps some tensors at higher precision.
  • KV cache = 2 × layers × KV heads × head dimension × bytes per value × tokens. Sliding-window layers (Gemma 3 and 4, gpt-oss), latent attention (DeepSeek, Kimi, Mistral Small 4), hybrid linear attention (Qwen 3.5 and later) and shared-KV layers (Gemma 4 E2B/E4B) are handled separately.
  • Overhead = the CUDA or Metal context plus compute buffers, about 0.6–1.2 GB depending on vocabulary size.

A model is marked as fitting when the total is within 94% of usable memory. The full formulas and their limits are on the methodology page.

VRAM needed by popular models

At Q4_K_M (or the official native format) with 8K context and FP16 KV cache:

ModelWeightsTotal at 8KSmallest VRAM tier
Llama 3.2 3B Q4_K_M1.8 GB3.5 GB4 GB
Gemma 4 E4B Q4_K_M4.5 GB5.7 GB8 GB
Llama 3.1 8B Q4_K_M4.5 GB6.3 GB8 GB
Qwen 3.5 9B Q4_K_M5.1 GB6.4 GB8 GB
Qwen 3 14B Q4_K_M8.4 GB10.5 GB12 GB
gpt-oss-20b MXFP4 (official)12.8 GB13.9 GB16 GB
Mistral Small 3.1 24B Q4_K_M13.6 GB15.6 GB20 GB
Gemma 4 26B-A4B Q4_K_M14.2 GB15.6 GB20 GB
Qwen 3.6 27B Q4_K_M15.2 GB16.9 GB20 GB
Gemma 4 31B Q4_K_M17.3 GB19.8 GB24 GB
Qwen 3.6 35B-A3B Q4_K_M19.8 GB21.0 GB24 GB
Qwen 3 32B Q4_K_M18.5 GB21.4 GB24 GB
Llama 3.3 70B Q4_K_M39.9 GB43.2 GB48 GB
Qwen 3.5 122B-A10B Q4_K_M68.9 GB70.2 GB80 GB
gpt-oss-120b MXFP4 (official)60.8 GB62.0 GB80 GB

Browse by model, GPU or VRAM

More calculators

Frequently asked questions

How much VRAM do I need to run an LLM?

Roughly the model size in billions × 0.6 GB at Q4_K_M, plus memory for context. A 7–8B model needs about 6.3 GB with 8K context, a 32B model about 21.4 GB, and a 70B model about 43.2 GB.

Can I run a 70B model on 24 GB of VRAM?

Not fully. Llama 3.3 70B needs about 43.2 GB at Q4_K_M. On 24 GB you can offload part of it to system RAM, but speed drops to a few tokens per second. Two 24 GB cards or 64 GB+ of unified memory run it properly.

Does context length affect VRAM?

Yes. Every token in the context stores keys and values for every layer. Llama 3.1 8B uses 128 KB per token in FP16, so 32K of context adds 4 GB and 128K adds 16 GB. Quantizing the KV cache to Q8_0 roughly halves that.

Do MoE models need VRAM for total or active parameters?

Total. Every expert must be in memory because any token can route to any expert. The active parameter count only sets the speed, which is why gpt-oss-120b (5.1B active) runs fast on 128 GB unified-memory systems.

Is Apple unified memory the same as VRAM?

Close, with a limit. macOS lets the GPU use about 75% of memory on larger Macs (about two thirds on smaller ones) by default. A 128 GB Mac has roughly 96 GB usable for models, and you can raise the limit with the iogpu.wired_limit_mb setting.

Why does my model use more VRAM than calculated?

Common causes are a larger context than you think (some apps default to the model maximum), several parallel sequences, a vision encoder loaded alongside the model, or another app using the GPU. Your desktop and browser can take 0.5–1.5 GB on a GPU that also drives a display.