How BERT's NSP Works: Binary Classification of Sentence Pairs

BERT's Next Sentence Prediction (NSP) pre-training task involves presenting the model with two sentences (A and B) and training it to classify if B is the actual next sentence after A (50% of the time) or a randomly sampled one, using the [CLS] token's output for prediction.

Sources

Open the full topic