Active Nerds
Back to Glossary Index

Top-P (Nucleus) Sampling

Sampling strategy filtering candidate tokens to the smallest set whose cumulative probability reaches threshold P.

Mechanism & Definition

A generation sampling strategy (also called nucleus sampling) that truncates the candidate token vocabulary dynamically. Keeps only the smallest set of most-probable tokens whose cumulative probability exceeds parameter $P$ (e.g. 0.9), ignoring long-tail low-probability noise tokens.

Related Terms

Appears In