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

SmoothQuant

Watch SmoothQuant move an outlier channel's range from the activations into the weights.


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

Go Pro · $8.25/mo
EXPLAINER · 30.08 · QUANT BAYCHANNEL 6 MAX 14.47 · OTHERS ≤ 2.71
01
Stage 1 of 6 · Outlier channel
Channel 6 of the activations reaches 14.47. The other channels stay within 2.71.
Explain it simply

Each column of teal dots is one input channel over 16 tokens. Channel 6 swings far wider than the rest: it is an outlier channel. The ochre dots below are the weights that multiply each channel. The bars on the right compare the largest activation and the largest weight of each channel.

Eight columns of 16 teal activation dots, one per input channel. Channel 6 spans minus 9.54 to 14.47; the others stay within 2.71. Below, eight columns of ochre weight dots. On the right, a pair of bars per channel: largest activation and largest weight.

activationsweights, factors soutputerroroutlier channel
14.47−14.4701.24−1.240activations x (16 tokens)weights w (8 rows)channellargest |x| and |w| per channel01812345678one output: token 6, row 4123456782.310.582.710.382.390.4714.471.242.500.63y = Σ x · w = 19.6614.47−14.4701.24−1.240activations x (16 tokens)weights w (8 rows)channellargest |x| and |w| per channel01812345678one output: token 6, row 4123456782.310.582.710.382.390.4714.471.242.500.63y = Σ x · w = 19.66
Toy: the 30.C1 layer, 8 × 8 weights and 16 calibration tokens
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
yt,i=∑jxt,j wi,j\sy{y}{out}{y_{t,i}} = \sum_j \sy{x}{data}{x_{t,j}}\,\sy{w}{param}{w_{i,j}}
y6,4=∑jx6,j w4,j=19.66y_{6,4} = \textstyle\sum_j x_{6,j}\,w_{4,j} = 19.66

Each output adds every input channel times its weight.

Common mix-ups

MYTHSmoothing changes what the layer computes.

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

Predict, then reveal
3 CHECKS · PRO
Q01At W4A4 without smoothing, which code does channel 1 reach at most?

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

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 2 live controls
  • 2 mix-up cards and 3 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.