Example

Example of Next Sentence Prediction (NSP) Input Formatting

In sentence-pair tasks such as Next Sentence Prediction (NSP), two sentences are combined into a single input sequence. A special start token, [CLS], is prepended, while a [SEP] token separates the two sentences. For example, a training sample formatted as [CLS] It is raining . [SEP] I need an umbrella . [SEP] is classified with the label IsNext, indicating that the second sentence logically follows the first.

Image 0

0

1

Updated 2026-04-17

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

Related