Example

Example of Autoregressive Generation and Log-Probability Calculation

This example illustrates how an autoregressive model generates the sentence 'cats are playful.' by following a specific path through a search space (e.g., node 0 → 3 → 9 → 11 → 17). The overall probability of this generated sequence is calculated by summing the conditional log-probabilities of each token. The calculation unfolds sequentially as follows:

  • log Pr("cats"|x)
  • log Pr("are"|x, "cats")
  • log Pr("playful"|x, "cats are")
  • log Pr("."|x, "cats are playful") Each term represents the log-probability of generating the current token, given the input x and all previously generated tokens in the sequence.

0

1

Updated 2026-05-02

Contributors are:

Who are from:

Tags

Ch.5 Inference - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences

Related