Quantization

Layer 2 · Mechanics

Quantization

Scales and zero-points, symmetric vs asymmetric quantization, why outlier channels break naive schemes, and what GPTQ/AWQ/GGUF actually do differently.

10 min read70 XP

  1. Continuous weights

    fp16, wide dynamic range

  2. Choose scale + zero-point

    per tensor, channel, or group

  3. Round to nearest integer bucket

  4. Store integers + scale

    dequantize on the fly at inference

Every quantization scheme is a variant of this pipeline; the differences are all in step 2.

At its core, quantization maps a continuous range of real numbers onto a small fixed set of integers using a scale and a zero-point: , and reconstructing an approximation later is . Symmetric quantization fixes and centers the integer range on zero — simpler, and fine when weight distributions are roughly symmetric (which most are). Asymmetric quantization allows , useful for distributions that are lopsided (some activation distributions, especially after ReLU-family nonlinearities, are all non-negative).

Go deeper: L3 Code