Awesome Testing

Lesson 01 · The destination

What should follow “The animal did not cross the street because it was too …”?

Unfinished prompt

The animal did not cross the street because it was too

Prior knowledge
Basic vectors and probability help. The machine-learning course is useful, but not required.
Study time
3–4 hours guided · about 8 hours of optional deep dives
By the end
Trace a prompt through tokenization, representations, attention, transformer blocks, logits, sampling, and cached generation.

01 · Smallest useful mechanism

One small prediction, repeated

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

Test the prediction

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

Commit before reveal

Choose the continuation you expect to rank first.

The distribution stays hidden until you commit.

Real pinned forward pass

Inspect the evidence behind one GPT-2 prediction.

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

The #464·animal #5044·did #750·not #407·cross #3272·the #262·street #4675·because #780·it #340·was #373·too #1165

Final layer · head 0 · attention from “too”

The15.5%
·animal18.0%
·did9.6%
·not11.3%
·cross3.2%
·the4.3%
·street3.6%
·because8.8%
·it6.1%
·was15.1%
·too4.5%

Top next-token probabilities

1. ·scared #1200813.38%
2. ·dangerous #49237.44%
3. ·close #19697.11%
4. ·far #12905.99%
5. ·frightened #247764.90%
6. ·busy #81794.87%
7. ·afraid #77873.16%
8. ·late #27392.11%
Raw tensor sample and integrity checks

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

Define a next-token evidence claim

Commit to a written claim and evidence plan. The Lab stores the draft locally and never sends it to a server.

Your learning artifact

Write the argument you would defend

Stored only in this browser. No account required; course reset does not delete it.

04 · Check your understanding

What does one forward pass produce?

Optional referenceDeep dive / reference chapterOpen the complete essay, diagrams, mathematics, exercises, glossary, and sources when you want more depth.

Next: To make that prediction, the model must first turn the visible sentence into its own discrete alphabet.