Skip to content

Glossary: NLP with Transformers

generate

Also written: max_new_tokens, do_sample

The method that runs a model's decoding loop to write new text. `max_new_tokens` caps its length and `do_sample=False` makes output repeatable.

Where the book teaches it

Related terms

Seq2seqBeam search