LESSON 29.C6 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW
An LLM request's lifecycle, end to end
Follow one chat request from its text to its last streamed token.
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 · 29.C6 · SERVING BAY512 PROMPT TOKENS · 7 FROM THE QUESTION
01
Stage 1 of 6 · Tokenize
A tokenizer splits the question into 7 BPE tokens. With the system prompt, the prompt holds 512 tokens.
Explain it simply
The question has 30 bytes, one per character. The tokenizer joins them with 52 merge rules learned from a short training text. So each word here becomes one token with its own ID. The system prompt, fixed instructions at the start, adds 505 more tokens. The model only ever sees these 512 IDs.
The question's 30 bytes join into 7 tokens. Token IDs: What 276, is 257, the 277, capital 265, of 267, France 297, ? 63. A system prompt block adds 505 tokens, 512 in all.
prompt tokens, KV cachewaiting, dropped tokens (dashed)output tokenspolicy pick, cut, now
Toy: 4 requests, an 8B model on one H100; hand-set logits
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
The prompt is the system tokens plus the question tokens.
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.