Will this model run on my machine? Pick a model and a quantization, set your context length, and enter how much RAM (for CPU) or VRAM (for a GPU) you have. The calculator adds up weights, KV cache and runtime overhead and tells you whether it fits.
Model
Architecture (edit for any model)
You'll find these in the model's config.json: num_hidden_layers, num_key_value_heads, and head_dim (or hidden_size divided by num_attention_heads).
GGUF names (Q4_K_M and so on) are what llama.cpp, Ollama and LM Studio use. Bits per weight are averages.
Workload
Prompt plus answer. Longer context means a bigger KV cache.
Your hardware
Run on
Result
–
Model weights–
KV cache–
Runtime overhead–
Left for everything else–
What to expect
Rough generation speed–
Longest context that fits–
Speed is an upper bound: generating each token reads every weight once, so tokens per second ≈ bandwidth ÷ model size. Real numbers are usually 50–80% of this.
Same model, other quantizations
Quantization
Total
Speed
Fits?
How the numbers are calculated
Weights = parameters × bits per weight ÷ 8. A 8B model at FP16 is about 16 GB; at Q4_K_M it is about 4.9 GB.
KV cache = 2 (keys and values) × layers × KV heads × head dim × context × parallel chats × bytes per value. Models with grouped-query attention (few KV heads) need far less.
Overhead = about 0.5 GB of compute buffers plus 5% of the weights for the runtime itself. On a CPU the operating system and your other apps also need memory, so the calculator keeps about 2.5 GB of RAM aside for them.
A web page cannot read your exact RAM or GPU memory, so enter it yourself. Chrome reports a rough value (rounded, and never above 8 GB), which we show as a hint when it is available.
These are estimates for llama.cpp-style runtimes. vLLM on a GPU pre-allocates most of the VRAM for KV cache by design, so its reported usage looks higher.