\(\bullet\)_Top-\(p\) sampling._ Since top-\(k\) sampling does not consider the overall possibility distribution, a constant value of \(k\) may be not be suitable for different contexts. Therefore, top-\(p\) sampling (_a.k.a._, nucleus sampling) is proposed by sampling from the smallest set having a cumulative probability above (or equal to) \(p\)[308]. In practice, the smallest set can be constructed by gradually adding tokens from the vocabulary sorted in descending order of generative probability, until their cumulative value exceeds \(p\).