๐ฎ Beam Search (Practice)
Companion to the Beam Search & Constrained Decoding guide. Implement beam search over a toy probability tree. Edit and run the code right here โ it executes in your browser.
๐ Your turnโ
Loading editorโฆ
๐ง Challenge yourselfโ
- Compare beam=1 (greedy) vs beam=3 outputs.
- Add a length penalty so long sequences aren't unfairly punished.
- How does constrained decoding prune invalid tokens?
Continue the learning path โ Graph Algorithms Kg Graphrag