GGUF quantization explained

GGUF files for llama.cpp, Ollama and LM Studio come in a dozen quantization types. The name says how many bits each weight gets, which decides the file size, the memory the model needs and part of its quality. Llama 3.1 8B is 15.0 GB in BF16, 7.95 GB at Q8_0 and 4.52 GB at Q4_K_M.

How to read the names

Bits per weight and file size

Average bits per weight across a whole model, as llama.cpp reports them, and the resulting weights for a few popular models. The KV cache and runtime overhead come on top; the calculator adds them.

Type Bits/weight Llama 3.1 8BGemma 4 12BQwen3.6 27BGemma 4 31BQwen3.6 35B-A3BLlama 3.1 70B
BF16 (unquantized) 16 15.0 GB22.3 GB51.7 GB58.3 GB67.0 GB131 GB
Q8_0 8.5 7.95 GB11.8 GB27.5 GB30.9 GB35.6 GB69.8 GB
Q6_K 6.56 6.13 GB9.13 GB21.2 GB23.9 GB27.5 GB53.9 GB
Q5_K_M 5.67 5.30 GB7.89 GB18.3 GB20.6 GB23.7 GB46.6 GB
Q4_K_M 4.84 4.52 GB6.74 GB15.7 GB17.6 GB20.3 GB39.8 GB
Q3_K_M 3.91 3.66 GB5.44 GB12.6 GB14.2 GB16.4 GB32.1 GB
Q2_K 3.35 3.13 GB4.66 GB10.8 GB12.2 GB14.0 GB27.5 GB

Which one to pick

What fits on your GPU

Each page lists the most precise type every model fits in, with the longest context and the speed:

Model sizes computed from the files on Hugging Face on .