liveBook · Manning

Autoregressive model

As explained in Introduction to Generative AI, Second Edition

Autoregressive generation produces a sequence by predicting each successive element from previously generated elements and available context.

When generating text, a model must decide what comes next without seeing future words. An autoregressive model predicts each next token from the tokens already available, making future predictions depend on past data. section 2.3

Training usually uses self-supervision: the model repeatedly guesses the next token in large text collections and adjusts its weights using the correct token. This differs from bidirectional prediction, which can use context on both sides of a missing word and is aimed more at understanding context than generating sequences. section 2.3 section 2.1

Autoregressive modeling appears across the language-model pipeline:

  • Pretraining establishes foundational knowledge through next-token prediction over a very large corpus. section 2.1
  • Post-training can refine the model for conversation, instruction following, or code generation. section 2.1

From prompt to continuation

Given “A good location for a romantic honeymoon is …,” the model predicts a likely continuation at the end of the prompt. GPT-family models and Google’s PaLM are examples of autoregressive models. section 2.3 section 2.17

Figure 2.1 The high-level training process for LLMs
A close-up of several white circles

AI-generated content may be incorrect.

Use the high-level training-process figure to place autoregressive pretraining alongside later post-training stages. section 2.1

How Introduction to Generative AI, Second Edition covers it

How deep it goes
Explains the prediction task, training intuition, and bidirectional contrast without descending into implementation details.
Examples
Uses a honeymoon-completion prompt and identifies GPT-family models and PaLM as autoregressive examples.
What it assumes
Assumes only basic awareness of tokens and language models while defining autoregression through familiar sentence completions.
What you can do after
Evaluate/understand why generative models use left-context next-token prediction.
How it connects
Connects autoregression with self-supervised learning, token prediction, bidirectional models, pretraining, and post-training.

Also explained in

Compare how 5 books explain autoregressive model →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Introduction to Generative AI, Second Edition. The section links point to the parts of the book it draws on.