Complete a phrase
Collect several continuations of the same phrase and distinguish familiar from supported.
Ask: “Does sounding natural make the fact true?”
Listen for: “No, it could be a familiar but false claim.”
Brightlab
Year 6 · Generation
Does a likely next word make a true sentence?
Go to the investigation ↓A token-branch journal with probability strips, replay comparison and evidence policy.
Which next word is likely, and what makes it supported?
A language generator chooses from possible next tokens. This teaching model starts with a small supplied score table, converts scores into probabilities using softmax and samples from them. Temperature changes how concentrated the probabilities are. Fixed random draws make comparisons reproducible. It is not a large language model and its word scores are invented. Likelihood is a property of this distribution, not evidence that a sentence describes the world.
Before this lesson: Read a probability bar and distinguish a guess from evidence. Useful earlier investigations: The pattern that fooled us.
A language generator chooses from possible next tokens. This teaching model starts with a small supplied score table, converts scores into probabilities using softmax and samples from them. Temperature changes how concentrated the probabilities are. Fixed random draws make comparisons reproducible. It is not a large language model and its word scores are invented. Likelihood is a property of this distribution, not evidence that a sentence describes the world.
Read a probability bar and distinguish a guess from evidence. Useful earlier investigations: The pattern that fooled us.
Print the supplied phrase and score table. Prepare a number line from 0 to 1 for sampling. Explain that real tokenisers can split words into pieces; this tiny model uses whole words for visibility.
ACARA V9 AI curriculum connection ↗ · Technologies ↗
A complete teaching sequence · 70 minutes
Collect several continuations of the same phrase and distinguish familiar from supported.
Ask: “Does sounding natural make the fact true?”
Listen for: “No, it could be a familiar but false claim.”
Predict the effect of increasing temperature with logits and random draws fixed.
Ask: “Will the largest probability usually grow or shrink?”
Listen for: “It should shrink as alternatives gain probability.”
Change temperature and inspect probabilities, cumulative intervals and multiple sampled continuations. Replay identical draws to isolate the parameter effect.
Ask: “Why did the same random number choose a different token?”
Listen for: “The probability intervals changed.”
Use the unsupported-fact score table. Observe that low temperature concentrates on its wrong continuation.
Ask: “Did greater concentration create evidence?”
Listen for: “No, the score table never checked a source.”
Choose settings for a fictional creative task and a factual task. Add a source-check requirement for factual use; compare outputs without claiming one temperature guarantees truth.
Ask: “What must happen outside sampling to support a fact?”
Listen for: “We need relevant evidence and verification.”
Annotate one draw on the cumulative probability strip.
Ask: “What exactly was computed in this lab?”
Listen for: “Softmax probabilities and sampling from supplied scores.”
The most likely word is a verified fact.
A supplied score table can assign its highest score to a false continuation; lowering temperature makes it more consistently wrong.
Specify a creative sampling policy and a separate factual evidence requirement, supported by two replayed runs.
Ask learners to identify the cumulative interval containing one draw. Require them to distinguish supplied scores, calculated probabilities and external factual evidence.
| Criterion | Beginning | Secure | Extending |
|---|---|---|---|
| Sampling mechanism | Treats output as chosen by understanding | Connects draw to probability interval | Explains a temperature-induced interval change |
| Evidence judgement | Treats high score as truth | Identifies unsupported output | Designs a verification step independent of sampling |
Begin with three candidates and probabilities in tenths; use a physical number strip before displaying softmax.
Calculate entropy across temperatures and examine why diversity is not the same as usefulness.
Only supplied benign text is sampled. No account, prompt upload or external model request occurs.
Shared device? Turn remembering off. A project file lets you continue on another device.
Your browser is the laboratory
Increase temperature with logits and random draws fixed. Predict concentration and at least one sampled token change.
Four candidate logits are 2.8,1.6,0.8,0.1. Softmax converts them to probabilities. Fixed draws are 0.08,0.34,0.62,0.88,0.97. Temperature starts at 1; compare with 2.
The experiment opens after your prediction.
There is no penalty for being surprised.
Apple Silicon · PyTorch MPS
Sample 65,536 seeded draws from a temperature-scaled distribution using MPS/CUDA tensor operations. Compare theoretical probabilities, empirical frequencies and absolute errors.
Students extend the experiment in teams, documenting parameters, outputs and limitations.
The bundle contains lesson-specific working code, a configuration file, a reactive notebook, a deterministic CPU check and hardware setup instructions. Acceleration is reported only after a tensor operation and result read-back succeed.
Download Mac Studio investigation ↓unzip y6-tokens-mac-pathway.zip -d y6-tokens-mac cd y6-tokens-mac bash setup-mac.sh source .venv/bin/activate python experiment.py --device mps --output results marimo edit notebook.py
CPU and available-device execution status is recorded in the downloaded README and validation report. DGX Spark execution requires that hardware; static validation alone does not establish GPU compatibility or performance. The browser lesson remains fully available without this extension.
NVIDIA DGX Spark · PyTorch CUDA
Sample 65,536 seeded draws from a temperature-scaled distribution using MPS/CUDA tensor operations. Compare theoretical probabilities, empirical frequencies and absolute errors.
Students extend the experiment in teams, documenting parameters, outputs and limitations.
The bundle contains lesson-specific working code, a configuration file, a reactive notebook, a deterministic CPU check and hardware setup instructions. Acceleration is reported only after a tensor operation and result read-back succeed.
Download DGX Spark investigation ↓unzip y6-tokens-dgx-pathway.zip -d y6-tokens-dgx cd y6-tokens-dgx bash run-dgx.sh # Open the localhost notebook URL printed by the container.
CPU and available-device execution status is recorded in the downloaded README and validation report. DGX Spark execution requires that hardware; static validation alone does not establish GPU compatibility or performance. The browser lesson remains fully available without this extension.
A token-branch journal with probability strips, replay comparison and evidence policy.
Download the editable handout →