Skip to content

Decoding: logits to text

How a model's output scores become the next token: greedy, softmax, top-k, sampling and beam search.

Syllabus

Greedy decoding

Softmax

Top-k filtering

Temperature sampling

Beam search