Formula

Mathematical Representation of the Top-p Candidate Pool

In top-p (nucleus) sampling, the candidate pool at a given step ii, denoted as Vi\overline{V}_i, is composed of the kpk_p most probable tokens. The value of kpk_p is the size of the smallest set of top-ranked tokens whose cumulative probability meets or exceeds the threshold pp. The pool is formally represented as the set of these top kpk_p tokens: Vi={yitop1,,yitopkp}\overline{V}_i = \{y_i^{\text{top1}}, \dots, y_i^{\text{topk}_p}\}

Image 0

0

1

Updated 2025-10-08

Contributors are:

Who are from:

Tags

Ch.5 Inference - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences