Free tool · runs in your browser

LLM VRAM calculator

Pick a model preset or enter parameters, choose a quantisation and context length, and see how much VRAM you need and which GPUs it fits on.

kv heads × head dim
0 GBestimated VRAM
0 GBmodel weights
0 GBKV cache
0 GBruntime overhead
Fits on

Estimate = params × bits ÷ 8 + KV cache (2 × layers × context × KV dim × bytes) + ~0.8 GB overhead. Real usage varies by runtime (llama.cpp, vLLM, ExLlama) and batch size.

Where the memory goes

Running an LLM needs memory for three things: the model weights (parameters × bits per weight), the KV cache that stores attention keys and values for every token in context, and runtime overhead. Weights dominate for short contexts; the KV cache grows linearly with context length and can become significant at 32K tokens and beyond.

Quantisation in one paragraph

Quantisation stores weights with fewer bits. A 4-bit quantisation such as Q4_K_M needs roughly a third of the memory of 16-bit weights with a small quality loss, which is why it's the most popular choice for local use.

  • Q8: near-lossless, about half of FP16.
  • Q5-Q6: excellent quality/size balance.
  • Q4_K_M: the popular default for local use.
  • Q2-Q3: noticeable quality loss; last resort.

Common questions

How accurate is the estimate?

It's a solid planning estimate. Actual usage varies by runtime, batch size and implementation details.

What is KV dim?

The number of key/value heads multiplied by the head dimension. Models using grouped-query attention have a much smaller KV dim than their hidden size, which shrinks the KV cache.

Can I split a model across GPUs or into RAM?

Yes. Multi-GPU splitting and CPU offloading let larger models run, at some cost to speed.

Now pick a model.

Use the directory to find a model that matches your numbers.