📞 0339-0387701 (WhatsApp) Contact

« Back to Data Science & AI (NCCIA)

What is top-p, also called nucleus sampling?

A. Sampling the single most likely token every time
B. Choosing tokens in alphabetical order
C. Stopping generation after p words
D. Sampling only from the smallest set of tokens whose cumulative probability reaches p ✅

Correct Answer: D. Sampling only from the smallest set of tokens whose cumulative probability reaches p

Explanation

Top-p restricts sampling to the nucleus of high-probability tokens, balancing diversity and coherence.