- finds the smallest number of tokens with total probability > p
- then samples from these tokens.
i.e.
- sort the tokens by probability in descending order
- take all tokens until prefix sum > p
Transclude of temperature-vs-nucleus-sampling.excalidraw#^arealqivecaghcyncm573z0dk