Skip to content

autoregressive generation

Autoregressive generation is a sequence modeling approach in which a model produces output one token at a time, and each new token is predicted based on all the tokens that came before it.

In language modeling, these systems are typically trained with next-token prediction under teacher forcing, where the model learns to predict the next token given a ground-truth prefix from real data.

At inference time, common decoding strategies include greedy search, beam search, top-k sampling, and nucleus (top-p) sampling, often combined with a temperature parameter to control how random or deterministic the outputs are.

Hugging Face Transformers: Leverage Open-Source AI in Python

Tutorial

Hugging Face Transformers: Leverage Open-Source AI in Python

Get hands-on with Hugging Face Transformers in Python. Download, run, and inspect pretrained open-source AI models, and speed up inference on GPUs.

intermediate ai

For additional information on related topics, take a look at the following resources:

Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.


By Leodanis Pozo Ramos • Updated Oct. 6, 2026