LESSON 27.14 · 5 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW
Batched and grouped GEMM
Watch eight small expert GEMMs become one kernel launch, in two ways.
Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 2 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 27.14 · GEMM BAY16 TOKENS · 8 EXPERTS · MAX 4 PER EXPERT
01
Stage 1 of 5 · Tokens per expert
The router sends 16 tokens to 8 experts. Each expert runs its own GEMM with 0 to 4 rows.
Explain it simply
Each chip at the top is one token. Its line shows the expert the router picked. Each expert multiplies its token rows by its own weights, the ochre square. Here the busiest expert gets 4 tokens and the quietest gets 0.
16 token chips with lines to 8 expert columns. The columns hold 2, 1, 0, 4, 2, 4, 3, 0 token rows.
token rowsweights, tiles, launchespadding, start cost, idle GPUrun time, tile time
Toy: 16 tokens, 8 experts, a GPU with 4 SMs, 5 µs per launch
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each expert multiplies its own token rows by its own weights.
PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
- 4 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.