Short Answer

Interpreting the Formal Definition of Top-k Selection

A junior developer is implementing a text generation algorithm. At a specific step i, the model's vocabulary is V = {'the', 'a', 'cat', 'dog'} and the next-token probabilities are Pr('the'|...) = 0.4, Pr('a'|...) = 0.1, Pr('cat'|...) = 0.3, Pr('dog'|...) = 0.2. For K=2, the developer's code outputs the selection pool (V_i) as {0.4, 0.3}. Based on the formal definition Vi=argTopKyiVPr(yix,y<i)\large V_i = \underset{y_i \in V}{\text{argTopK}} \, \text{Pr}(y_i|\mathbf{x}, \mathbf{y}_{<i}) explain the fundamental mistake in the developer's output.

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

Analysis in Bloom's Taxonomy

Cognitive Psychology

Psychology

Social Science

Empirical Science

Science