Top-P
A sampling parameter for large language models that accumulates token probabilities in descending order until the cumulative probability reaches the threshold P, then samples only from that subset of tokens.
Core Facts
Top-P (nucleus sampling) samples from the smallest set of tokens whose cumulative probability exceeds the threshold P, while Top-K selects only from the K candidates with the highest probabilities.
Temperature controls the flatness of the sampling distribution; a higher value tends toward selecting lower-probability words, while Top-p dynamically narrows the candidate vocabulary set through a cumulative probability threshold.
Timeline (last 90 days)
The course's view holds that Top-P is more effective for generating high-quality text, and that Top-P and Temperature can be used together.
Temperature, Top-K and Top-P are the three core sampling parameters that control the randomness of text generation, with a common combination being temperature 0.7~0.8, Top-K 40 and Top-P 0.9~0.95.
All Facts (5)
Top-P (nucleus sampling) samples from the smallest set of tokens whose cumulative probability exceeds the threshold P, while Top-K selects only from the K candidates with the highest probabilities.
80%VerifiedTemperature controls the flatness of the sampling distribution; a higher value tends toward selecting lower-probability words, while Top-p dynamically narrows the candidate vocabulary set through a cumulative probability threshold.
65%UnverifiedCoze's Top-P nucleus sampling mechanism starts from the highest-probability words and accumulates probabilities until the cumulative probability reaches the set P value, sampling only from those words.
60%UnverifiedThe course's view holds that Top-P is more effective for generating high-quality text, and that Top-P and Temperature can be used together.
50%UnverifiedTemperature, Top-K and Top-P are the three core sampling parameters that control the randomness of text generation, with a common combination being temperature 0.7~0.8, Top-K 40 and Top-P 0.9~0.95.
50%