A language model does not write text directly. Instead, it returns logits for the next token. The decoding algorithm decides how to turn those logits into a token, and repeating this decision produces the output text. The decoding algorithm affects the behavior of the model. Greedy decoding is deterministic and stable, but it can be […]