CSC-105

LibraryToken Prediction Lab

Token Prediction Lab

Large language models create responses one token at a time. At each step, the model assigns a probability to many possible next tokens and samples one of them.

  1. Write a short prompt and select Generate.
  2. Use Previous, Next, or Play to inspect each generated token.
  3. Compare the chosen token with the five most likely alternatives.
  4. Change the temperature and run the same prompt again. What changes?

Notice that tokens are not always complete words. A · represents a space attached to a token.

Try asking yourself before each step: Which token do you expect the model to choose?