← Curriculum map
L06 · Phase 3 · 20 min

Language Models

AI Tool wrote 'The solar system contains a 300 litre…' — what happens next inside the model?

Next Token Predictor

"The solar system contains a 300 litre …"

Before revealing — which single word do you think the model is most likely to pick next?

Prototype note: the candidate list and logit values are hand-authored to be plausible, not extracted from a real model’s vocabulary — but the softmax(x)ᵢ = eˣⁱ ÷ Σeˣʲ arithmetic shown is computed live on those numbers.

Depth ladder

Underneath, generating a whole answer is really just one trick repeated over and over: given everything written so far, guess the single most likely next word-piece, add it, and repeat. Try it below — guess the next token yourself, then see the model's actual ranked list.

Knowledge check

Given a hypothetical logit distribution, identify which token softmax would most often select, and why it isn't guaranteed.