The simulation visualizes beam search as a branching tree of candidate token sequences, showing how the algorithm expands every surviving beam at each step, scores all the extensions, and prunes back down to the top-k highest-scoring paths.
Drag the beam width slider to change how many candidate sequences are kept alive at each step, then press play to watch the tree grow, get pruned, and converge on a final chosen sequence, comparing the result against pure greedy decoding.
Beam width (k) slider, step forward / play / pause, compare-to-greedy toggle, rebuild tree
Setting beam width k=1 makes beam search mathematically identical to greedy decoding, which is why greedy decoding is often described as simply the narrowest possible beam search.
The simulation visualizes beam search as a branching tree of candidate token sequences, showing how the algorithm expands every surviving beam at each step, scores all the extensions, and prunes back down to the top-k highest-scoring paths.
The simulation visualizes beam search as a branching tree of candidate token sequences, showing how the algorithm expands every surviving beam at each step, scores all the extensions, and prunes back down to the top-k highest-scoring paths.
Drag the beam width slider to change how many candidate sequences are kept alive at each step, then press play to watch the tree grow, get pruned, and converge on a final chosen sequence, comparing the result against pure greedy decoding.
Setting beam width k=1 makes beam search mathematically identical to greedy decoding, which is why greedy decoding is often described as simply the narrowest possible beam search.