Review — How an LLM works
Back to the lesson · Learning path plan
What to remember
- Text becomes a sequence of tokens. An autoregressive LLM predicts the next token from the tokens already in its context.
- A forward pass turns that context into scores. The scores at the last position can then be normalized into a distribution over the vocabulary.
- Generation selects a token and feeds it back into the context. Scoring reads an already-observed token’s probability. Training uses known targets to adjust the parameters.
- Parameters encode learned patterns. The context provides the current instructions and examples. The same prediction task can support summarization or translation depending on that context.
Recall from memory
The rule selects “They,” then “built.” What context does the model receive on the second turn? How would you use the first distribution if “They” were an observed target to score?
Show the answer
The second context is the original question followed by “They.” The parameters stay fixed. To score the token, read the probability of “They” from the first distribution. To generate, apply a decoding rule and feed back the token it selects.