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

AWQ

Watch AWQ scale one weight channel so that rounding hurts the output less.


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.07 · QUANT BAYCHANNEL 6 INPUT 5.36 · OTHERS ≤ 0.92
01
Stage 1 of 6 · The layer
Each output adds every weight times its input. Channel 6 carries inputs about 7 times larger than the rest.
Explain it simply

Each column of the grid is one input channel. The bars above it show how large that channel's inputs are, on average over 16 sample tokens. Channel 6 is about 7 times larger than the others. So any error in its weights grows about 7 times in the output.

An 8 by 8 grid of weights. Bars above the columns show the mean input size per channel. Channel 6 is 5.36; the others are below 1.

weights, codes, sinput size |x|errorround to nearest
1234578612345678rowinput size a = mean |x|channel 60.800.750.740.920.825.360.830.670.21−0.32−0.07−0.210.470.340.05−0.50−0.110.25−0.11−0.460.00−0.140.50−0.340.120.09−0.370.26−0.15−0.230.200.09−0.160.24−0.290.010.281.24−0.630.130.110.02−0.38−0.05−0.36−0.01−0.100.260.030.01−0.170.110.190.300.440.09−0.58−0.31−0.27−0.140.00−0.06−0.080.23−0.270.08−0.04−0.04−0.060.31−0.13−0.6216 sample tokens × 8 input channels (x)weights Wsample inputs1234578612345678rowinput size a = mean |x|channel 60.800.750.740.920.825.360.830.670.21−0.32−0.07−0.210.470.340.05−0.50−0.110.25−0.11−0.460.00−0.140.50−0.340.120.09−0.370.26−0.15−0.230.200.09−0.160.24−0.290.010.281.24−0.630.130.110.02−0.38−0.05−0.36−0.01−0.100.260.030.01−0.170.110.190.300.440.09−0.58−0.31−0.27−0.140.00−0.06−0.080.23−0.270.08−0.04−0.04−0.060.31−0.13−0.6216 sample tokens × 8 input channels (x)weights Wsample inputs
Toy: the 8 × 8 layer and 16 sample inputs of 30.C1, seeded, not trained
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
yi=∑jwij xjaj=mean⁡t∣xtj∣\sy{y}{out}{y_i} = \sum_j \sy{w}{param}{w_{ij}}\,\sy{x}{data}{x_j} \qquad \sy{a}{data}{a_j} = \operatorname{mean}_t |x_{tj}|
a6=5.36a_{6} = 5.36

Each output sums weight times input; a is the mean input size.

Common mix-ups

MYTHA larger scale on channel 6 always lowers the error.

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

Predict, then reveal
3 CHECKS · PRO
Q01At α 0, is the AWQ error lower than round to nearest, or the same?

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.