Index Ai Academy
Glossary · Phase 5 · Transformers

Top-p

Also written: nucleus sampling, top-k

Sampling only from the most likely tokens, cutting off the unlikely tail.

Try it now

Try temperature 0.3, then 2. Then cut the list with top-k, or with top-p, and press Sample 100 to see the real draws match the bars.

Learn it properly

Sampling strategies · Temperature, top-k and top-p: turning probabilities into text. About 30 minutes.

Create a free account See what's in the lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write