Beam search improves generative language-model decoding by keeping several promising token paths instead of committing to one choice at every step. It selects the sequence with the highest total probability after exploring the available paths. section 10.2.1
The method controls search in two dimensions:
- Breadth limits how many beams or partial paths remain active. section 10.2.1
- Depth limits how many tokens each path can generate. section 10.2.1
- Recursive expansion after each token creates a receding-horizon process with a predictable time bound, avoiding the exponential growth of unrestricted sequences. section 10.2.1
A road-trip plan
Imagine choosing a road-trip route while keeping several promising routes alive. Slow traffic resembles a low-probability token; beam search delays commitment so the final route can have the best overall score. section 10.2.1
Figure 10.3 A beam search decision tree
A decision-tree figure makes the retained beams and their successive expansions visible. section 10.2.1




