Local LLM VRAM Calculator

20 open models against 30 GPUs, Macs and multi-card builds. Architectures come from each model's own config file, and the key-value cache is sized by key-value heads rather than query heads — which is why these figures are smaller than most calculators give.

Two numbers decide whether a model runs. The weights are fixed and easy. The key-value cache grows with every token of context and is where the surprises live — on a long-context model it can end up larger than the weights themselves, so the model loads fine and then fills the card mid-conversation.

Grouped-query attention, and why it matters

Modern models share one key-value pair across several query heads. The cache is sized by the key-value count, so a model with an 8-to-1 ratio needs an eighth of the cache a naive calculation predicts. This is the single commonest error in VRAM estimates.

Grouped-query attention ratios and per-token cache cost
Model Query / KV heads Cache saving Per token
Qwen3 235B-A22B64 / 416×188.0 KB
Qwen2.5 3B16 / 28×36.0 KB
Qwen3 30B-A3B32 / 48×96.0 KB
Qwen3 32B64 / 88×256.0 KB
Llama 3.3 70B64 / 88×320.0 KB
Qwen2.5 72B64 / 88×320.0 KB
Qwen2.5 7B28 / 47×56.0 KB
Qwen2.5 Coder 7B28 / 47×56.0 KB

Every model

Memory requirements for every model at Q4_K_M
Model Parameters Weights Q4_K_M Total at 8K Runs on
Llama 3.2 1B1.2B0.7 GB1.7 GB30/30
Qwen2.5 3B3.1B1.6 GB2.7 GB30/30
Llama 3.2 3B3.2B1.7 GB3.4 GB30/30
Mistral 7B v0.37.3B3.8 GB5.6 GB30/30
Qwen2.5 7B7.6B4.0 GB5.2 GB30/30
Qwen2.5 Coder 7B7.6B4.0 GB5.2 GB30/30
Llama 3.1 8B8.0B4.2 GB6.0 GB30/30
Gemma 2 9B9.2B4.8 GB8.3 GB30/30
Phi-414.7B7.7 GB10.0 GB29/30
Qwen2.5 14B14.8B7.7 GB10.0 GB29/30
DeepSeek-R1 Distill Qwen 14B14.8B7.7 GB10.0 GB29/30
Gemma 2 27B27.2B14.3 GB17.9 GB18/30
Qwen3 30B-A3B30.5B16.0 GB17.5 GB18/30
Qwen2.5 32B32.8B17.2 GB20.0 GB17/30
Qwen2.5 Coder 32B32.8B17.2 GB20.0 GB17/30
Qwen3 32B32.8B17.2 GB20.0 GB17/30
Mixtral 8x7B46.7B24.5 GB26.3 GB13/30
Llama 3.3 70B70.5B37.0 GB40.3 GB10/30
Qwen2.5 72B72.7B38.1 GB41.4 GB10/30
Qwen3 235B-A22B235.1B123.2 GB125.4 GB1/30

What decides whether a model fits

Memory, not speed, decides whether a model runs at all, and three things fill it.

Weights: parameters times bits

Every billion parameters takes about 1.86 GB at FP16 / BF16, 0.52 GB at Q4_K_M and 0.45 GB at Q3_K_M. For Qwen2.5 32B that is the difference between 61.0 GB of weights and 17.2 GB.

The cache: context times architecture

Among models that accept a 32K context, the key-value cache costs from 32 KB per token (Llama 3.2 1B) to 320 KB (Qwen2.5 72B) — 1.0 GB against 10.0 GB at that length. In 6 of the 20 models the cache at the full context window is larger than the Q4_K_M weights. Llama 3.1 8B holds 4.2 GB of weights and 16.0 GB of cache at 128K.

Usable memory

Not all of a device's memory is available to a model. The GeForce RTX 4090 and the Mac (M4, 24 GB) both have 24 GB, but offer 22.1 GB and 16.1 GB. At the reference settings the card runs 16 of the 20 models and the Mac 11.

Reading a model or hardware page

Common mistakes

Where to go next

Frequently asked questions

How do I work out how much VRAM a model needs?
Weights plus cache plus a runtime allowance. Weights are the parameter count times the bytes per weight — a 7B model at Q4_K_M is about 4 GB. The key-value cache is 2 × layers × key-value heads × head dimension × context × bytes, which grows linearly with how long a conversation gets. Then add roughly a gigabyte for the runtime itself.
Why do other calculators give much bigger numbers?
Usually because they size the cache by the query head count instead of the key-value head count. Nearly every modern model uses grouped-query attention, sharing one key-value pair across several query heads — Llama 3.2 1B shares 16-to-1 at the extreme. Using the query count overstates the cache by exactly that factor.
Which quantisation should I pick?
Q4_K_M for most people — small quality loss, and what most GGUF downloads default to. Note that K-quants are not their nominal bit width: Q4_K_M averages about 4.5 bits per weight once the block scales and higher-precision attention tensors are counted, so a file is roughly 12% larger than "4-bit" implies. The general rule is to fit the largest model you can and only then step the quantisation down.
Can a Mac run models a graphics card cannot?
Yes, and it is the main reason Apple Silicon shows up here. Unified memory is shared between CPU and GPU, so a 192 GB machine can hold models that no consumer graphics card — capped at 32 GB — can touch. Generation is slower than a discrete card of similar capacity, but a model that does not fit does not run at any speed.
Does context length really matter that much?
On long-context models it decides the answer. Qwen3 235B-A22B needs 125.4 GB at 8K, but the cache grows every token — on models with a 128K window the cache at full context can exceed the quantised weights. Plenty of setups load a model successfully and then run out of memory once the conversation gets long.

Model config.json files published on Hugging Face. GGUF K-quant effective bit widths as produced by llama.cpp. Manufacturer specifications for VRAM and unified memory.

An estimate of memory, not a benchmark. It counts model weights, the key-value cache at the context you choose, and a fixed runtime allowance. Actual usage moves with the runtime, the batch size, whether flash attention is on, and how much the operating system has already taken from a shared memory pool. Treat a result within a gigabyte of your card's capacity as 'probably not' rather than 'just fits'.

Data on this page last verified . How these figures are calculated

    ↑↓ to move ↵ to open