The five steps
- Greedy decoding 8 min
- Keep a beam 10 min
- Rank by length 9 min
- Block repeats 10 min
- Stop when settled 11 min
Decode text from a language model the way inference does it: start greedy, keep a beam of the best sequences, rank them with a length penalty, block repeated phrases, and stop the moment no unfinished beam can win.