← 🔦 Machine Learning & Neural Networks

🔦 Beam Search: Finding Good Sequences Without Brute Force

Depth: 0
Best score:
Drag — rotate · Scroll — zoom

🔦 Beam Search: Finding Good Sequences Without Brute Force

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.

🔬 What It Demonstrates

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.

🎮 How to Use

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.

💡 Did You Know?

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.