What Is Quantization in AI Models? Smaller, Faster LLMs
Quantization compresses model weights by representing them with fewer bits. A 16-bit model needs about 2 bytes per parameter; at 4 bits, about half a byte.
Why it matters
It is what lets 8B models run on laptops and 70B models run on two consumer GPUs.
Common formats
- GGUF: llama.cpp family; many levels, CPU and GPU. See GGUF.
- GPTQ, AWQ: GPU-focused 4-bit formats used by some servers.
- EXL2/EXL3: ExLlama formats with flexible bit rates for NVIDIA GPUs.
- FP8: 8-bit floating point, common in servers and newer GPUs.
Quality
Small loss down to about 5 bits, modest at 4, larger below. Code and maths are more sensitive. Imatrix quants improve low-bit quality.
Memory planning
Weights at your chosen quant plus KV cache for context. Use the LLM VRAM calculator.
Related
More terms: Abliteration · Base model · DPO · Fine-tuning · Mixture of experts · Model card · Full glossary