Tokens are building blocks
Models read and write token units.
See how large language models tokenize text, assign next-token probabilities, and change sampling behavior with temperature.
Work the problem before reading the explanation.
Turn the outcome into a rule you can reuse.
Models read and write token units.
Candidate tokens receive different scores.
Higher values flatten the distribution.
The chosen token becomes new context.
Connect the experience to concepts, references, and transfer.
Concept guide
A large language model generates text by estimating a probability distribution over possible next tokens, selecting a token using a decoding strategy, adding the selected token to the current context, and repeating the process.
A token is a text unit used by the model. It can be a whole word, part of a word, punctuation, whitespace, or another fragment depending on the tokenizer.
Temperature changes the shape of the sampling distribution. Lower values concentrate probability around top candidates; higher values give lower-ranked candidates more chance to appear.
Decoding choices affect variability, deterministic behavior, structured-output reliability, and how an application balances creativity with control.
No. Autoregressive language models generate incrementally, token by token.
No. Token boundaries depend on the tokenizer and can split words or include punctuation.
No. It changes sampling behavior, not the model weights or underlying knowledge.
No. This MVP uses deterministic educational values so the learning experience stays stable.
Interactive values are illustrative; conceptual explanations are the durable learning content.
LEARNING CONTEXT
Application guarantees must be designed around probabilistic model behavior, not assumed from fluent output.
Mental models
Suggested backfill
No shipped prerequisite is required before entering this incident.
Transfer the model
A model returns a plausible but invalid enum value. Which guarantee belongs to the model, and which belongs to application code?
Carry the idea into another problem or build.
Would you use the same temperature for creative copy and strict JSON? Explain the trade-off before opening the next lab.
Next: understand the finite working context around those tokens.
Continue →