Activity (Process)

Sequence Classification Pipeline using the [CLS] Token Output

For sequence-level classification tasks, a standard pipeline is often employed. An input sequence, prepared with a special [CLS] token at the beginning, is first processed by a Transformer encoder. This yields a sequence of hidden state vectors, {h_0, ..., h_m}. The hidden state corresponding to the [CLS] token, h0h_0, is then isolated, as it serves as an aggregate representation of the entire sequence's meaning. Finally, this single vector h0h_0 is passed through a classification layer, such as Softmax, to produce the final output, for instance, in a binary classification system.

Image 0

0

1

Updated 2025-10-10

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