Awesome Testing

Lesson 07 · The model makes a choice

How does the final state become “tired” and its alternatives?

Training target revealed

The animal did not cross the street because it was too tired

01 · Smallest useful mechanism

The model scores; the decoder chooses

The transformer finishes with one contextual vector at each position. For generation, the last prompt position matters most: the language-model head compares its state with every token in the vocabulary and assigns each a raw score called a logit. Softmax turns relative scores into a distribution. The model has now finished this prediction step; a decoding rule decides what happens next. Greedy decoding always takes the highest-probability token. Sampling treats the distribution as a weighted lottery, often after controls such as temperature or top-p reshape the choices. This is why the same model and prompt can produce different continuations. These probabilities describe possible next tokens under the model—not truth, confidence in an entire answer, or guaranteed quality.

A final token state becomes alternatives, then a separate decoding rule selects one.

02 · Experiment

Test the prediction

Calculate by hand · compare with local AI

Offline logits are curated teaching data. When enabled, the live lane queries Bonsai through Ollama as a separate comparison.

Loading the experiment…

03 · Production-minded practice

Separate scores, probabilities, and decoding

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

For fixed logits and positive temperature, what can temperature change?

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

Next: After one token is appended, the same forward pass repeats—and reuse becomes a systems problem.