Generated Sequence
30 / 30 Tokens Active
The
Legend
Base Prob
Renorm. Boost
Running Total (CDF)
Nucleus Selection (Top-P)
Understanding Filters & Re-Normalization βΌ
βοΈ Top-P (Nucleus)
P is a cumulative probability threshold. Instead of "keep 10 words," the model keeps the "Nucleus"βthe minimum set of words whose total probability accounts for P% of the distribution.
Adjust Temperature to see this: at low temp, the Nucleus shrinks. At high temp, it expands.
π Re-Normalization
When filters (Top-K/P) remove words, the surviving words must sum to 100%. The system proportionally scales up the probability of the survivors.
The dashed green boxes in the chart show the final probability after this boost. The solid indigo represents the original prob.
βοΈ Top-K Sampling
Sorts the vocabulary and hard-caps selection to the top $K$ words. All others get 0% chance.
A simple way to prevent the model from picking extremely low-probability, "hallucinated" words.