Back to glossary
AI GLOSSARY
Top-P Sampling
Large Language Model (LLM) Terms
A decoding strategy, also called nucleus sampling, where the model selects the next token from the smallest set of tokens whose combined probability exceeds a threshold P. Unlike top-k sampling, the size of the candidate set varies dynamically based on the probability distribution, making it more adaptive to context.