Learn Before
Example

Example of Prefix Language Modeling Input Format

In Prefix Language Modeling, an input text is partitioned into two parts: a prefix and a subsequent sequence. The prefix serves as the context processed entirely by the encoder, while the subsequent sequence is the target that the decoder autoregressively generates. An illustration of this structure is:

[CLS] The puppies are frolickingPrefixs outside the house .Subsequent Sequence{}\underbrace{\mathrm{[CLS]}\ \textrm{The puppies are frolicking}}_{\textrm{Prefix}} \to \underbrace{\langle s \rangle\ \textrm{outside the house .}}_{\textrm{Subsequent Sequence}}

In this format, the input prefix begins with a special token such as [CLS], and the target subsequent sequence is initiated by a start-of-sequence token like s{}\langle s \rangle.

Image 0

0

1

Updated 2026-04-16

Contributors are:

Who are from:

Tags

Ch.1 Pre-training - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences