Lesson 01 · The destination
Unfinished prompt
The animal did not cross the street because it was too …
01 · Smallest useful mechanism
An autoregressive language model has one immediate job: given the tokens already in its context, estimate which token could come next. It produces a distribution of possibilities rather than one certainty. A decoding rule chooses a candidate, appends it to the context, and runs the same process again. Repeating this small loop creates a sentence, answer, or program. The response is not normally prepared in full and then revealed word by word. It emerges from learned patterns and the context supplied now. This explains why a tiny prompt edit can change later output, why two sampled runs can diverge, and why fluent text can still be wrong: plausibility is not independent fact-checking.
The model creates a response one next-token choice at a time.
02 · Experiment
Calculate by hand · inspect a pinned GPT-2 trace
Compare a stable teaching distribution with a bundled GPT-2 forward pass whose model revision, prompt, tensors, runtime, and numerical checks are explicit.
One unfinished sentence
The animal did not cross the street because it was too▍
Calculate by hand
Choose the continuation you expect to rank first.
The distribution stays hidden until you commit.
Real pinned forward pass
This is a captured CPU forward pass, not a hand-authored simulation. The model, revision, prompt, runtime, tensor selection, and numerical checks travel with the result.
openai-community/gpt2
revision 607a30d7
2026-08-01 · cpu · float32
Exact input
The animal did not cross the street because it was too
Final layer · head 0 · attention from “too”
Top next-token probabilities
Attention row sum: 1.000000119 · Future attention mass: 0
Full-vocabulary probability sum: 1.000027537 · Captured top-eight mass: 0.489745736
Sampled final state: [-0.0494121, 0.0119252, -1.1041307, 0.339733, -0.658722, 0.8113734, -0.2701479, 0.0290997, -0.4259254, -0.3528047, -0.9118407, -0.133042, 0.7553968, 0.5581592, -0.0567464, -0.892144, 0.3119187, -0.3104014, 0.2714367, 0.3815889, -0.131538, -0.0799356, -0.579934, 0.0505649]
Interpretation boundary: This artifact records one forward pass from one pinned public model revision. It supports claims about these captured tensors and probabilities, not production-model behavior, hidden reasoning, factuality, or general reliability.
03 · Production-minded practice
Commit to a written claim and evidence plan. The Lab stores the draft locally and never sends it to a server.
Your learning artifact
Stored only in this browser. No account required; course reset does not delete it.
04 · Check your understanding
Next: To make that prediction, the model must first turn the visible sentence into its own discrete alphabet.