Learn Before
Formula

Formula for the Top-k Selection Pool

The selection pool in top-k sampling, ViV_i, is formally defined by identifying the KK tokens with the highest conditional probabilities from the entire vocabulary at each generation step ii. This selection process is formalized using the argTopK\text{argTopK} function, which ranks the prediction probabilities of all possible next tokens and returns the top KK. The resulting selection pool is thus defined as: Vi={yitop1,,yitopk}=argTopKyiV,Pr(yix,y<i)V_i = \{y_i^{\text{top1}}, \dots, y_i^{\text{topk}}\} = \underset{y_i \in V}{\text{argTopK}} , \text{Pr}(y_i|\mathbf{x}, \mathbf{y}_{<i}) where the probability is conditioned on the input x\mathbf{x} and the preceding token sequence y<i\mathbf{y}_{<i}.

Image 0

0

1

Updated 2026-06-29

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

Related