Predictions in Large Language Models

Lessons in this section

  1. Token Prediction

    Run a real language model in your browser and see its real next-token guesses, how context changes them, and how sure the model is.

  2. Logits

    What logits are, how softmax turns them into chances, why only the gaps between logits matter, log-probabilities, and nudging a token with logit bias.

  3. Generation Loop

    Watch a real model write text one token at a time, see the choices at every step, how the loop stops, why greedy decoding can repeat, and how streaming works.