Efficient & Edge AI

post-training quantization (PTQ)

Post-training quantization takes a model that is already trained and lowers its numerical precision without going back into the training loop. At most it runs a few hundred unlabeled examples through the network to observe the range of weights and activations, then picks the scales — a process that finishes in minutes to hours rather than the days a retrain would cost.

The core decisions are granularity (per-tensor, per-channel, or per-group scales), symmetric versus affine zero-points, and how to calibrate each range — by min–max, percentile clipping, or minimizing mean-squared or KL error. Advanced PTQ adds error compensation, as in GPTQ, or range equalization, as in SmoothQuant, to push reliably below 8 bits. The whole family trades a small, sometimes nonzero accuracy drop for not needing labels, gradients, or the original training pipeline.

PTQ is almost always the first thing to try because it is cheap and deployment-friendly. When it loses too much accuracy at aggressive bit-widths or when activations must be quantized, quantization-aware training is the fallback.

Post-training means after training is finished — PTQ never updates the weights by gradient descent; that distinction is exactly what separates it from quantization-aware training.

Also called
PTQ訓練後量化