Quantization explained for local LLMs
Key facts
Q4, Q5, Q8 and FP16 are quality levels of the same AI model. Each step up needs more memory. Q4 is the standard pick.
Updated . Checked . 70B at Q4.
Quantization shrinks an AI model so it needs less memory. In our estimates it is only an assumed number of bytes per parameter, close to the label on the download, not a file we weighed. We also have no quality benchmark, so this page will not tell you how much quality Q4 loses.
Four sizes, all assumed
- Q4, standard quality (the Q4_K_M download): 0.6 bytes per parameter, including a little file overhead. It is not a measured file size.
- Q5, a bit higher quality: 0.71 bytes per parameter, near the Q5_K_M download. It is not a measured file size.
- Q8, near full quality: 1.07 bytes per parameter, close to the Q8_0 download.
- FP16, full quality: 2 bytes per parameter.
The number of parameters is not in the model's Hugging Face config. A count rounded to billions stays an estimate even when we link the config. The conversation memory does not use these rates. We count it at full precision (FP16), so a smaller quant shrinks the model itself and leaves the conversation memory alone.
The same model, four sizes
Llama 3.1 8B has 32 layers and 8 key-value heads of size 128 (these set how much conversation memory it needs), and takes conversations of up to 131,072 tokens. Source for that layout: https://huggingface.co/unsloth/Meta-Llama-3.1-8B-Instruct/raw/main/config.json. Its size, 8.03 billion parameters, is our estimate. Llama 3.3 70B has 80 layers and 8 key-value heads of size 128 (these set how much conversation memory it needs), and takes conversations of up to 131,072 tokens. Source for that layout: https://huggingface.co/unsloth/Llama-3.3-70B-Instruct/raw/main/config.json. Its size, 70.6 billion parameters, is our estimate.
Sizes below are for a conversation of about 6,000 words (8,192 tokens).
- Llama 3.1 8B at Q4: 4.9 GB for the model itself, 6.8 GB with the conversation and the software.
- Llama 3.3 70B at Q4: 42.5 GB for the model itself, 46.0 GB in total.
- Llama 3.1 8B at Q5: 5.7 GB for the model itself, 7.6 GB with the conversation and the software.
- Llama 3.3 70B at Q5: 50.1 GB for the model itself, 53.6 GB in total.
- Llama 3.1 8B at Q8: 8.6 GB for the model itself, 10.5 GB with the conversation and the software.
- Llama 3.3 70B at Q8: 75.5 GB for the model itself, 79.0 GB in total.
- Llama 3.1 8B at FP16: 16.1 GB for the model itself, 17.9 GB with the conversation and the software.
- Llama 3.3 70B at FP16: 141.2 GB for the model itself, 144.7 GB in total.
Budget PC with RTX 3060 12GB has 11.4 GB usable. Llama 3.1 8B there at Q4: runs, a full fit; at Q8: runs, a full fit. Dual RTX 3090, 128 GB RAM has 46.8 GB usable. Llama 3.3 70B there at Q4: runs, a full fit; at Q8: runs slowly, only by spilling into normal memory (not a full fit); at FP16: runs slowly, only by spilling into normal memory (not a full fit). Mac Studio M5 Ultra 256GB is the machine on our list described as still holding 70B at FP16. Our estimate there: runs, a full fit.
KV cache quantization (context memory)
The KV cache is the conversation memory: the keys and values a model keeps so it does not recompute the whole chat for every new token. llama.cpp stores it separately from the model file. The flags are --cache-type-k and --cache-type-v (also -ctk and -ctv). The default for both is f16. The type list also includes q8_0 and q4_0. A quantized V cache (q8_0 or q4_0) needs flash attention; llama.cpp refuses it otherwise. K can be quantized without that requirement.
FP8 KV cache (the type name f8_e4m3) was merged in llama.cpp pull request 28392 on 10 Nov 2026 and is in nightly b12284. f8_e4m3 is not a quantized type in ggml, so the flash-attention refusal above does not apply to it. That pull request publishes no perplexity or KLD comparison of f8_e4m3 against q8_0, and we have not measured it. This page states no speed and no quality result for any KV cache type.
What quantization is not, here
It is not a measured file size, not a quality score (perplexity), and not a leaderboard. Q3 and Q6 are not in our estimates. If you need a quality comparison, it is not on this site.
See the effect on a real pick: 70B at Q4, 70B at Q8, 8B at Q4, how we calculate.
Related: How much VRAM does a 70B model need?, Running DeepSeek and Qwen locally, Best GPU for local LLMs in 2026.
Sources and method
Checked . 70B at Q4
Speeds and memory are our estimate from the hardware specs, not a measured test. Prices are dated and may change. How we calculate
Questions
- Quantization explained for local LLMs?
- Quantization shrinks an AI model so it needs less memory. In our estimates it is only an assumed number of bytes per parameter, close to the label on the download, not a file we weighed. We also have no quality benchmark, so this page will not tell you how much quality Q4 loses.
- What is KV cache quantization (context memory)?
- The KV cache is the conversation memory llama.cpp keeps apart from the model file. --cache-type-k and --cache-type-v default to f16; q8_0 and q4_0 are also accepted, and a quantized V cache needs flash attention. FP8 (f8_e4m3) was merged in llama.cpp pull request 28392 on 10 Nov 2026 and is in nightly b12284. That pull request publishes no perplexity or KLD comparison of f8_e4m3 against q8_0, and we have not measured it.
Want it on paper? The GPU Buying Cheat Sheet (EU, Nov 2026) is a short PDF: graphics memory per budget and the cheapest machine per model size.