Quantization
For engineers
How lower-precision weights cut memory, the GGUF, GPTQ, AWQ, MLX and native FP8/FP4 formats, choosing a quant level and measuring what it costs in quality
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
Roughly how much memory do the weights of a 14B-parameter model need at 8 bits per weight?
Check yourself · 2 of 5
Which runner loads a single .gguf file?
Check yourself · 3 of 5
In the name Q4_K_M, what does the M stand for?
Check yourself · 4 of 5
What does a rise in perplexity from the 16-bit model to its quant mean?
Check yourself · 5 of 5
How does quantization-aware training differ from post-training quantization?
Topics
- How quantization shrinks memory needs4 min read · Bits per weight from 16 to 8 to 4 and below, the memory each needs for the same model, and why speed often rises too
- GGUF, GPTQ, AWQ and MLX file formats5 min read · Which quantized formats exist, which runners load each one, and how to read the quant type from a file name
- Picking a quant level like Q4_K_M5 min read · K-quants, i-quants and importance matrices, and how Q8, Q6, Q5, Q4 and Q2 levels trade size for quality
- Measuring quality loss after quantizing5 min read · Perplexity, KL divergence and task evals on your own prompts to find where a smaller quant starts to break
- Native FP8, FP4 and quantization-aware releases4 min read · Models trained or released in FP8, MXFP4 or QAT form, why they lose less quality, and the hardware that runs them fast
- Quantizing a model yourself with llama.cpp6 min read · Converting Hugging Face weights to GGUF, building an importance matrix and running llama-quantize, and checking the result
Start here
- Quantization overview (Hugging Face Transformers docs) (opens in a new tab)DocsFree
Hugging Face's comparison of quantization methods (GPTQ, AWQ, bitsandbytes and others) and what each supports.
- llama.cpp quantize tool (opens in a new tab)DocsFree
The official list of quant types, the importance-matrix option and the llama-quantize command line.
- GGUF on the Hugging Face Hub (opens in a new tab)DocsFree
What the GGUF file format holds and how the Hub shows quant types for a repository.
Helps to know first
110 questions · last verified 2026-12