From FP16 to INT4: how to compress LLM weights 2-4x with minimal quality loss. Methods, tradeoffs, and practical deployment.
01The memory wall
Why Quantize?
Quantization stores model weights or activations with fewer bits, which can reduce memory use and sometimes improve throughput. The realized savings and speed depend on metadata, kernels, hardware, and whether the workload is memory- or compute-bound.
A rough weight-only estimate is parameter count × bits per weight ÷ 8, before scales, zero-points, alignment, and runtime buffers. Quantization can make larger batches or longer contexts fit, but KV cache and temporary activations also consume memory. Quality must be measured on the intended tasks; lower precision does not guarantee negligible loss.