Jargonautica
Language Models Specifically

Beam Search

Keeping several candidate continuations alive at once and choosing the best complete one at the end, rather than committing to each word as you go. It helps for translation and summarisation, where there is a right answer, and it makes open-ended writing worse and blander.

Technical view

Maintains the k highest-scoring partial sequences, expanding each step and pruning. Requires length normalisation to avoid favouring short outputs. Standard in machine translation and speech recognition, but for open-ended generation it produces text that is high-probability and low-quality, an observation that motivated nucleus sampling. It also multiplies inference cost by the beam width, which matters at scale.


Part of AI Terminology Index, section: Language Models Specifically.

How it connects

Beam Search links to 4 other terms. The faint lines are links between those terms. See it in the full graph.

Temperature and SamplingTemperature and Sam…Greedy DecodingGreedy DecodingMachine TranslationMachine TranslationTree of ThoughtsTree of ThoughtsBeam Search