Skip to content

Top-p

Spicy — senior dev territoryAI & ML

ELI5 — The Vibe Check

Top-p (also called nucleus sampling) is another dial that controls how an AI picks its next word. Instead of choosing from ALL possible words, it only considers words that together add up to P% of the probability. Set it to 0.9 and it only considers the most likely words until they total 90% of the probability. It's like letting the AI only pick from the 'reasonable' options.

Real Talk

Top-p (nucleus sampling) is a token sampling strategy where the model only samples from the smallest set of tokens whose cumulative probability exceeds the threshold p. This dynamically adjusts the candidate vocabulary, avoiding both tail tokens and overly restrictive greedy decoding. It is often used in combination with temperature.

When You'll Hear This

"Use top-p of 0.95 to avoid incoherent outputs." / "Top-p and temperature work together."

Made with passive-aggressive love by manoga.digital. Powered by Claude.