cerebras.modelzoo.data_preparation.nlp.bert.sentence_pair_processor.SentencePairInstance#
- class cerebras.modelzoo.data_preparation.nlp.bert.sentence_pair_processor.SentencePairInstance(tokens, segment_ids, masked_lm_positions, masked_lm_labels, is_random_next)[source]#
Bases:
object
A single training (sentence-pair) instance. :param list tokens: List of tokens for sentence pair :param list segment_ids: List of segment ids for sentence pair :param list masked_lm_positions: List of masked lm positions for sentence pair :param list masked_lm_labels: List of masked lm labels for sentence pair :param bool is_random_next: Specifies whether the second element in the pair is random
Methods