Learn Before
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 explain the fundamental mistake in the developer's output.
0
1
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
Related
A language model is generating a sequence. At a specific step
i, it computes the following probabilities for the next token over its vocabulary V = {'run', 'walk', 'jump', 'sit', 'sleep'}. Given a setting of K=3, which of the following sets correctly represents the selection poolV_iaccording to the formal definition:Probabilities:
- Pr('run' | ...) = 0.15
- Pr('walk' | ...) = 0.40
- Pr('jump' | ...) = 0.05
- Pr('sit' | ...) = 0.35
- Pr('sleep' | ...) = 0.05
A developer is implementing the selection mechanism for a text generation model based on the formal definition: For a vocabulary V = {'cat', 'dog', 'ran', 'sat'} and K=2, the model computes the next-token probabilities as: Pr('cat'|...) = 0.1, Pr('dog'|...) = 0.5, Pr('ran'|...) = 0.3, Pr('sat'|...) = 0.1. The developer's code returns the set {0.5, 0.3} as the selection pool . What is the fundamental error in this output when compared to the formal definition?
Interpreting the Formal Definition of Top-k Selection