liveBook · Manning

Chapter 4: Applying Post-Training Quantization and Calibration

What you will learn in chapter 4 of Quantization and Fast Inference

This introduction explains why post-training quantization depends on production-representative calibration data and why calibration can often avoid retraining.

After this chapter you will be able to

What it builds on

Section by section

Introduction

This introduction explains why post-training quantization depends on production-representative calibration data and why calibration can often avoid retraining.

Key terms: calibration data, activations, scale factor S, zero-point Z, clipped, post-training quantization (PTQ), calibration, quantization-aware training (QAT), range estimation, validation protocol

4.1 Know when post-training quantization is enough

This section explains why post-training quantization is usually the first choice and how bit-width, architecture, model redundancy, and accuracy tolerance shape the decision to use it or escalate.

Key terms: post-training quantization, PTQ, quantization-aware training, QAT, calibration data, fake quantization, model architecture, activation outliers, residual connections, noise sensitivity

4.2 Build a calibration set that actually represents production

This section explains how to choose calibration inputs that expose production activation ranges, how to judge whether the set is large enough, and how to check its coverage against production.

Key terms: PTQ, scale factors, zero-points, activation ranges, clipping, representative calibration data, temporal patterns, user segments, edge cases, activation patterns

4.3 Estimate ranges (absolute max, percentile, and MSE)

This section explains how to choose a quantization range from calibration data by balancing clipping against rounding error and comparing four range-estimation methods.

Key terms: absolute maximum, absmax, scale factor, zero clipping error, percentile clipping, granular (rounding) error, overload (clipping) error, MSE, MSE-optimal calibration, candidate range

4.4 Validate accuracy and size with a repeatable protocol

This section shows how to validate post-training quantization by comparing FP32 and INT8 accuracy and size across calibration methods, while keeping latency claims separate.

Key terms: FP32 baseline, PTQ validation, hardest slices, batch normalization, folding, calibration, scale statistics, INT8, FP32, compression ratio

4.5 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 3: Choosing What to Quantize and at What Granularity Chapter 5: Recovering Accuracy with Quantization-Aware Training →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.