Learn Before
Process of Beam Search
At the first time step, beam search selects the tokens with the highest predicted probabilities from the vocabulary to serve as the initial candidate sequences. At each subsequent time step, the algorithm considers the candidate sequences from the previous step and extends them with all possible tokens, creating k\left|\mathcal{Y} ight| possible combinations. From these combinations, it evaluates and selects the extended sequences with the highest overall predicted probabilities to carry forward to the next step.
0
1
Tags
D2L
Dive into Deep Learning @ D2L
Related
Balancing Efficiency and Accuracy with Beam Width (K)
An engineer is using a text generation model that employs a search algorithm where a parameter,
K, determines the number of top candidate sequences kept at each step. The engineer observes that withK=1, the generated text is often repetitive and predictable. To improve the diversity and potential quality of the output, which of the following adjustments toKis the most logical next step?Analyzing Generation Algorithm Performance
Analyzing Parameter Impact on Text Generation
Process of Beam Search