AlgoViz

Sampling and trustworthy answers

easy 6 min

A decoder turns the model’s scores into a choice.

Trace the example

Follow the evidence through each stage, then test a change in the case.

Which words survive a nucleus cutoff?

Which words survive a nucleus cutoff?. Selected component: Token distribution inside Model.
Open full-size diagram

Model

A 0.60 · B 0.30 · C 0.10

Hold logits and temperature fixed. These three tokens form the complete vocabulary in this worked example.

Raise the threshold to 0.95. Which tokens can now be selected?

Move the nucleus cutoff

A 66.7% · B 33.3% · C 0%

The original masses are 60%, 30% and 10%. The smallest eligible prefix is renormalized before sampling.