Cross entropy is used to compute the NSP loss for each sentence pair presented to the model. Fig. 11 .7 illustrates the overall NSP training setup. In BERT, the NSP loss was used in conjunction with the MLM training objective to form final loss. Figure 11 .7 An example of the NSP loss calculation.