Log inStart free
LESSON 30.03 · 6 STAGES · 3 CONTROLS · 2 CHECKSPRO · PREVIEW

Calibration and outliers

Watch sample inputs set a quantization range, and outliers pull it wide.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 2 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 30.03 · CALIBRATION256 VALUES · MAX |X| 7.82
01
Stage 1 of 6 · Sample inputs
Quantization calibration runs 4 sample inputs through the layer. It records all 256 activation values.
Explain it simply

Before the model runs for real, you feed it a few sample inputs. Each row at the top is one input with 64 channels. Every value then drops into the chart below, so you see how the values spread.

4 rows of 64 cells are the sample inputs. Their 256 values stack as dots on a number line from about −3 to 8.

activation valuesoutliers, clippingrange ±α, levelserror
−9−6−30369one layer's activations4 sample inputs × 64 channels (calibration)input 1input 2input 3input 4256 recorded values−9−6−30369one layer's activations4 sample inputs × 64 channels (calibration)input 1input 2input 3input 4256 recorded values
Toy: 256 seeded activation values, 0 to 8 outliers
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
{x1,…,x256}\{\sy{x}{data}{x_1}, \dots, \sy{x}{data}{x_{256}}\}
N=4×64=256,max⁡∣x∣=7.82N = 4 \times 64 = 256,\quad \max|x| = 7.82

The calibration set holds 256 recorded activation values.

Common mix-ups

MYTHKeeping every value inside the range gives the smallest error.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
2 CHECKS · PRO
Q01With 2 outliers and the MSE search at INT8, does the range still clip the outliers?

Make your guess, then test it in the diagram. All 2 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 live controls
  • 2 mix-up cards and 2 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.