Top-p Sampling
Nucleus sampling - selecting from the smallest set of tokens whose cumulative probability exceeds p, providing dynamic vocabulary.
Your route here
10 stops · basics first
- 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.
- Token ✓ understood
The basic unit of text that a language model processes, typically representing a word, subword, or character. Tokens are the fundamental building blocks for LLM input and output.
- Tokenization ✓ understood
Splitting text into tokens, usually subword pieces, and mapping each to an integer ID so a language model can process it.
- Language Modeling ✓ understood
Learning probability distributions over sequences of words to predict what comes next.
- Text Generation ✓ understood
Automatically creating coherent text using language models, from simple completion to creative writing.
- 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.
- Neural Network ✓ understood
A computational model inspired by biological neural networks, consisting of interconnected nodes (neurons) organized in layers that process information through weighted connections.
- Activation Function ✓ understood
A non-linear function applied to neuron outputs that introduces non-linearity, enabling networks to learn complex patterns.
- 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.
- Top-k Sampling ✓ understood
A generation strategy that samples from only the k most likely next tokens, balancing quality and diversity.
- Top-p Sampling · you are here ✓ understood