Concept

A variation on autoregressive generation

Instead of generating a sentence from scratch, the language model can complete a sequence given a specified prefix as following.

  1. Pass a specified prefix to the language model using forward inference to produce a sequence of hidden states;
  2. Apply autoregressive generation using the hidden state of the last word of the prefix as the starting point of generation;
  3. The result of this process is a sequence of words that should be a reasonable completion given the prefix input.
Image 0

0

1

Updated 2021-11-14

Tags

Data Science