Methodology

Every result is an estimate. Actual memory use depends on runtime, version and settings (batch sizes, flash attention, CUDA/Metal buffers, other apps). This page lists every formula, number and source the calculator uses, so you can check or change them.

1. Total memory

total = weights + KV cache + recurrent state + overhead

Weights

If a real GGUF file exists on Hugging Face for the selected model and quantization, its size is used (split files are summed). Otherwise: weights = parameters × bits per weight ÷ 8. Mixture-of-experts models use total parameters, because all experts must be in memory.

Parameter counts come from the unquantized (BF16/F16) GGUF file size ÷ 2 where available (text model only), otherwise from the model card or the Hugging Face safetensors count. Each model shows its source.

KV cache

Computed per group of layers from the model’s real config.json:

KV precision (bytes per element), from llama.cpp’s block formats (ggml-common.h): F16 = 2 (16-bit float = 2 bytes); Q8_0 = 1.0625 (block_q8_0: 32 int8 values + one FP16 scale = 34 bytes / 32 values); Q4_0 = 0.5625 (block_q4_0: 32 4-bit values + one FP16 scale = 18 bytes / 32 values).

Overhead

Default 10% of weights. Source: Flavio Copes, “How much VRAM do you need to run an LLM locally?”: “A 1.1× multiplier on the weights is a reasonable estimate.” It covers runtime compute buffers, which llama.cpp logs as “compute buffer size”; compare with your own log. Adjustable under “Assumptions”.

2. Will it fit?

The defaults are conservative (overhead and reserve are both counted). Users with a headless GPU can raise usable memory; results near the limit should be tested before buying hardware.

3. Quantization formats

Bits per weight (bpw) are effective averages. GGUF values were measured by llama.cpp on Llama-3.1-8B; other architectures differ slightly because embeddings and output layers are quantized differently. When a real GGUF file exists for the selected model, the calculator uses the real file size instead of this value. Last checked 2026-10-18.

4. Validation

The formula (parameters × bits ÷ 8) is compared with published reference sizes: real GGUF files on Hugging Face and figures from the llama.cpp documentation. Required tolerance: ±10% for every case. Current mean absolute error: 1.6%, max 8.1%. These cases run as automated tests on every build. When a real file exists, the calculator uses it directly instead of the formula.

CaseFormulaReferenceError
Llama 3.1 8B Q4_K_M (llama.cpp docs)llama.cpp quantize README: 8B Q4_K_M = 4.9 GB4.92 GB*4.90 GB*+0.3%
Llama 3.1 70B Q4_K_M (llama.cpp docs)llama.cpp quantize README: 70B Q4_K_M = 43.1 GB (Llama 3.1 70B; 3.3 70B has the same architecture)43.17 GB*43.10 GB*+0.2%
Qwen3 8B Q4_K_MGGUF file size on Hugging Face5.01 GB*5.03 GB*-0.3%
Qwen3 14B Q5_K_MGGUF file size on Hugging Face10.53 GB*10.51 GB*+0.2%
Qwen3 32B Q4_K_MGGUF file size on Hugging Face20.05 GB*19.76 GB*+1.4%
Qwen2.5 72B Q4_K_MGGUF file size on Hugging Face (split file, all parts summed)44.48 GB*47.42 GB*-6.2%
Gemma 3 27B Q4_K_MGGUF file size on Hugging Face16.53 GB*16.55 GB*-0.1%
Mistral Nemo 12B Q8_0GGUF file size on Hugging Face13.02 GB*13.02 GB*-0.0%
Phi-4 14B Q6_KGGUF file size on Hugging Face12.03 GB*12.03 GB*-0.0%
DeepSeek R1 Distill Qwen 32B Q3_K_MGGUF file size on Hugging Face16.37 GB*15.94 GB*+2.7%
Mixtral 8x7B Q4_K_M (MoE)GGUF file size on Hugging Face28.57 GB*26.44 GB*+8.1%
Llama 3.2 3B Q8_0GGUF file size on Hugging Face3.42 GB*3.42 GB*-0.1%

* Decimal GB (10⁹ bytes) to match the published figures. Everywhere else the calculator uses binary GB (1024³ bytes), the unit GPU vendors use for VRAM.

The KV-cache formula itself is exact arithmetic over the model config; for example Llama 3.1 8B at 8,192 tokens in FP16 is exactly 1 GiB (32 × 2 × 8 × 128 × 8192 × 2 bytes). What is not validated yet: runtime buffers on specific GPUs. If you measure real usage, the numbers from your runtime log are the best reference.

5. Data sources and freshness

6. Known limitations

7. Licensing and trademarks

This site describes models and links to them; it does not host or redistribute model weights. Model and hardware names are used descriptively; no endorsement is implied.