Reference 12 stops to get here

Top-p Sampling

Also called Nucleus Sampling

Nucleus sampling - selecting from the smallest set of tokens whose cumulative probability exceeds p, providing dynamic vocabulary.

Your route here

12 stops · basics first
  1. Natural Language Processing ✓ understood

    The field of AI that lets computers read, interpret, translate and generate human language, from spam filters and search to chatbots.

  2. Token ✓ understood

    The unit of text a language model reads and writes: a word, part of a word, or a character, drawn from the model's fixed vocabulary.

  3. Tokenization ✓ understood

    Splitting text into tokens, usually subword pieces, and mapping each to an integer ID so a language model can process it.

  4. Language Modeling ✓ understood

    Assigning probabilities to sequences of text, in practice by predicting each next token from the ones before it; the objective behind large language models.

  5. Autoregressive Model ✓ understood

    A model that generates output one token at a time, using previously generated tokens as input for the next prediction.

  6. Machine Learning ✓ understood

    Building systems that learn patterns from data instead of following hand-written rules, getting better at a task as they see more examples.

  7. Neural Network ✓ understood

    A model built from layers of simple units, each taking a weighted sum of its inputs and applying a nonlinearity; training adjusts the weights so the whole stack maps inputs to useful outputs.

  8. Activation Function ✓ understood

    A non-linear function applied to neuron outputs that introduces non-linearity, enabling networks to learn complex patterns.

  9. Softmax ✓ understood

    A function that turns a list of scores (logits) into probabilities that are all positive and sum to 1; the standard output of classifiers and language models.

  10. Decoding Strategies ✓ understood

    The rules a language model uses to turn its next-token probabilities into actual text, from always taking the top token to sampling with temperature, top-k or top-p.

  11. Text Generation ✓ understood

    Automatically creating coherent text using language models, from simple completion to creative writing.

  12. Top-k Sampling ✓ understood

    A generation strategy that samples from only the k most likely next tokens, balancing quality and diversity.

  13. Top-p Sampling · you are here ✓ understood

Sampling from the smallest token set with cumulative probability exceeding p (also called top-p sampling).

This concept is essential for understanding large language models and forms a key part of modern AI systems.

  • Top-p Sampling
  • Generation
  • Sampling

Where it sits

Top-p Sampling

Leads to

Nothing yet: a destination in its own right.

Explore nearby