Dataset preparation for fine-tuning RoBERTa using triplet loss function

Hello, I would like to fine-tune RoBERTa using a triplet loss function, following what was described in the SBERT paper (sec. 3). What is the best way for building a fine-tuning dataset? My plan is to modify the Trainer class.