Autoregressive Generation

Autoregressive generation is a sequential prediction method where a model generates output token-by-token (or element-by-element), conditioning each new prediction on all previously generated tokens. This approach is fundamental to modern large-language-models (LLMs) and sequence-to-sequence tasks.

Core Mechanism

  • Sequential Dependency: The probability of the next token is conditioned on the history : .
  • Markov Assumption: Simplified models assume dependence only on a fixed window of previous tokens (e.g., N-gram Models), while transformer-based models use attention mechanisms to attend to the entire context window.
  • Decoding Strategies: Common methods include Greedy Decoding, Beam Search, and Sampling (e.g., temperature, top-k, top-p).

Emerging Alternatives: Parallel Generation

While autoregressive modeling dominates current LLMs, its sequential nature imposes latency constraints. Recent research explores non-autoregressive or parallel generation methods to accelerate inference:

References