TL;DRQuantization shrinks models by storing weights in fewer bits — int8, int4, GGUF.
Models store weights as numbers; quantization reduces their precision (32-bit → 8-bit, 4-bit), cutting memory and speeding inference, with a small accuracy cost. It's what lets large models run on a laptop or single GPU. Formats like GGUF (llama.cpp) package quantized models for local use. Lower bits = smaller/faster but more quality loss — pick the level your hardware and quality bar allow.
Key points
Fewer bits per weight (32→8→4)
Cuts memory, speeds inference
Small accuracy cost; GGUF for local
Runs big models on modest hardware
Common mistakes
Over-quantizing and tanking quality
Assuming all tasks tolerate 4-bit equally
Confusing quantization with distillation
Try it: Explain the trade-off between int4 and int8 quantization.
Example code
<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>fp16 → int8 → int4
smaller + faster, slightly less accurate
GGUF: quantized model for laptop/local use</pre></body></html>