Debugging a Sampling Algorithm
An engineer is building a text generation system. At a specific step, the system has calculated the following probabilities for the top 3 most likely next words: 'the' (0.5), 'a' (0.2), and 'one' (0.1). The engineer's code directly uses these probabilities to sample the next word from this restricted set. However, they notice their program sometimes fails to select any word at all for this step. Based on the principles of probability distributions for sampling, identify the fundamental error in the engineer's approach and explain why it leads to the observed failure.
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 predicts the probabilities for the next word in a sequence. The top four candidates are: 'happy' (0.4), 'sad' (0.2), 'angry' (0.1), and 'joyful' (0.05). A decoding method is applied that restricts the possible choices to only the top three candidates ('happy', 'sad', 'angry'). After the probabilities for this smaller set are rescaled to form a new, valid probability distribution, what is the new probability for the word 'sad'?
Debugging a Sampling Algorithm
Impact of Vocabulary Set Size on Renormalized Probabilities