AI Blog

AI Blog

by Michele Laurelli

Beam Search

Algorithm
Definition

Decoding algorithm keeping top B most likely sequences at each step.

Explores multiple hypotheses simultaneously. Beam width B controls quality-speed tradeoff. Produces more coherent but less diverse outputs.

Examples

1

Beam width 5 for translation

2

Deterministic decoding

3

Machine translation

Michele Laurelli - AI Research & Engineering