Inference and generation

Beam search

stable definition

Definition

Beam search retains a fixed-width set of high-scoring partial sequences and expands them step by step.

Distinguish it from nearby terms

Greedy decoding keeps one candidate; sampling introduces stochastic selection; beam search performs bounded deterministic search.

Check your understanding

Describe how beam width affects compute, diversity, and the chance of discarding a later-better sequence.