liveBook · Manning

Calibration data

As explained in Quantization and Fast Inference

Calibration data is representative input data used to measure model values for configuring quantization.

Calibration data is representative input used to observe model activations and derive quantization ranges. If it differs from production traffic, estimated ranges may be too narrow and clip common values, or too wide and waste precision. section 4.0 section 4.2

Build a set that reflects the inputs and activation patterns that matter in deployment:

  • Source production data, then sample across user segments, temporal patterns, and important edge cases. section 4.2
  • Check layer-wise activation coverage against production behavior and iterate when gaps appear. A few hundred representative samples usually suffice. section 4.2 section 4.5
Figure 4.3 Workflow for preparing a calibration set. The process flows from top to bottom: source production data from logs or traffic samples, apply stratified sampling to cover user segments and edge cases, validate distribution coverage against known activation patterns, and iterate if coverage gaps are found. Each stage includes a quality gate that prevents poorly representative data from reaching calibration.

Follow the workflow from production data sourcing through stratified sampling and coverage validation, repeating it when gaps remain. section 4.2

Distribution mismatch

A sentiment model calibrated on polite support messages may encounter angry social posts in production; the resulting activation spikes can exceed calibrated ranges and degrade predictions. Similar mismatches arise between studio photos and security footage, or short queries and long technical documents. section 4.2

How Quantization and Fast Inference covers it

How deep it goes
Contrasts distribution-mismatch failures and outlines sourcing, stratified sampling, coverage validation, and iteration.
Examples
Uses sentiment, vision, and language-model inputs to show how mismatched distributions cause clipping or range errors.
What it assumes
Assumes quantization scales, zero-points, and activation ranges; distinguishes calibration-based PTQ from retraining with quantization-aware training.
What you can do after
Configure quantization ranges from production-like samples and validate layer coverage against production activations before deployment.
How it connects
Links activation ranges and quantization scales to post-training quantization, and contrasts it with quantization-aware training.

Also explained in

Compare how 6 books explain calibration data →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Quantization and Fast Inference. The section links point to the parts of the book it draws on.