Hi,
I’ve coded a domain adapter for further pretraining a BERT model (Portuguese language) in a specific domain. I used the article Fine-tuning a masked language model - Hugging Face Course as a guide, but it doesn’t focus on next sentence prediction, only masked language model.
I’d like to know what is necessary to change the code to add support for next sentence prediction. I know I should use BertForPreTraining instead of AutoModelForMaskedLM, but my question is how to add the data and abels for NSP.
Thanks in advance.