LESSON 27.C3 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW
One decoder layer as kernels
Watch one decode token cross one decoder layer, kernel by kernel.
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/moEXPLAINER · 27.C3 · KERNEL BAY9 KERNELS · 2,032 B · 46.0 µs
01
Stage 1 of 6 · Norm and QKV
Explain it simply
First the norm scales the token x by one number, r, so its size is near 1. Then Tensor Cores turn it into a query, a key and a value, with sums in FP32. One token fills only 1 of the 8 columns of each Tensor Core step. Here that takes 2 kernels.
The norm and the QKV projection run as 2 kernels. r is 1.5269. The MMA tile uses 1 of 8 columns.
kernel, activation, HBM tripweights, launchesextra HBM trip, overflowprobabilities, layer output, step timeunused MMA column, the 28.C1 kernel
Toy: D 8, 2 heads, FFN 16, 8 positions, FP16 in HBM
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Scale x by r and the weights, then multiply by W.
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.