What is a calibration dataset?
A calibration dataset is a small, usually unlabelled set of examples run through a model in post-training quantisation to measure activation value ranges or find weight settings that minimise quantisation error.
Unlike an evaluation dataset, which measures the quantised model's performance, a calibration set configures the quantisation itself. If both use the same examples, results can look better than they are. Static quantisation relies on it for activation ranges.
- Topic
- Machine learning, models and training
- Also known as
- Calibration set
How a calibration dataset works
- A small sample of text or inputs representing target use is chosen; no labels are needed.
- The model runs on these examples and activation statistics are collected layer by layer.
- Scales and zero points are computed from the statistics, or weights are quantised to minimise layer output error.
- The quantised model is compared with the original on a separate evaluation set.
In more detail
Sample count, length and coverage of prompt formats
Typically, 128 to 512 diverse sequences of 512 to 4096 tokens suffice for LLM post-training quantisation, provided they cover the target prompt formats, including chat templates, system prompts, tool-calling JSON schemas and multilingual text. Calibrating solely on raw prose like WikiText can cause severe degradation in structured tool calling or reasoning chains.
Calibration for weight-only versus weight-and-activation quantisation
Weight-only quantisation (such as W4A16) uses calibration mainly to protect salient weights or reduce layer output error, whereas weight-and-activation quantisation (such as INT8 W8A8, FP8 or FP4 formats such as NVFP4) depends far more critically on calibration to capture extreme activation outliers across transformer channels (often paired with SmoothQuant or rotation transforms).
Routing coverage in mixture-of-experts models
In multi-expert (MoE) models, calibration datasets should be broad enough to trigger routing across all experts; otherwise rarely activated experts receive poor quantisation statistics and degrade specialised tasks.
Commonly confused terms
| Term | How it differs |
|---|---|
| Probability calibration set | In quantisation, a calibration dataset configures scales, zero points or Hessian estimates for compressing weights and activations; in probabilistic classification and risk scoring, a calibration set (validation split) is used for temperature scaling or Platt scaling so predicted probabilities match empirical accuracy. |
| QAT training set | In Quantisation-Aware Training (QAT), a labelled training dataset updates weights via backpropagation with simulated quantisation noise, whereas Post-Training Quantisation (PTQ) uses a small, unlabelled calibration dataset without full retraining. |
Why a calibration dataset matters for on-premises AI
The calibration set directly affects quantised model quality: a set unlike real use, such as English-only general text, can leave more error on Turkish or domain-specific inputs. A technical guide to quantisation notes post-training quantisation needs no retraining or labelled data, so a small, unlabelled but representative set suffices. AWQ, which scales weights by activation statistics without backpropagation or reconstruction, stresses its low risk of overfitting the calibration set; reconstruction methods such as GPTQ carry more of that risk.
Quantising an open-weight model to 4 bits, a bank calibrates with a small sample of anonymised Turkish customer correspondence and tests the quantised model on an evaluation set kept separate from those samples.
Common questions
Does a calibration dataset need labels?
Usually not. Unlabelled examples run through the model to collect activation statistics are enough.
How should a calibration set be chosen?
To represent real use: same language, same domain and similar input length, kept separate from the evaluation set.
Related terms
- Static quantisation
- Post-training quantisation
- Activation quantisation
- Quantisation error
- Evaluation dataset
- Quantisation
Sources
- Nagel et al., A White Paper on Neural Network Quantization, 2021
- Frantar et al., GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers, 2022
- Lin et al., AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration, 2023
In the glossary: Glossary, A to C