paddlenlp/transformers/bigbird/tokenizer.py
def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None):
        """
        Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
        adding special tokens.

        A BigBird sequence has the following format:

        - single sequence:      ``[CLS] X [SEP]``
        - pair of sequences:        ``[CLS] A [SEP] B [SEP]``

        Args:
            token_ids_0 (List[int]):
                List of IDs to which the special tokens will be added.
            token_ids_1 (List[int], optional):
                Optional second list of IDs for sequence pairs. Defaults to None.

        Returns:
            List[int]: List of input_id with the appropriate special tokens.
        """
        if token_ids_1 is None:
            return [self.cls_id] + token_ids_0 + [self.sep_id]
        _cls = [self.cls_id]
        _sep = [self.sep_id]
        return _cls + token_ids_0 + _sep + token_ids_1 + _sep

        Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
        adding special tokens.

        A BigBird sequence has the following format:

        - single sequence:      ``[CLS] X [SEP]``
        - pair of sequences:        ``[CLS] A [SEP] B [SEP]``

        Args:
            token_ids_0 (List[int]):
                List of IDs to which the special tokens will be added.
            token_ids_1 (List[int], optional):
                Optional second list of IDs for sequence pairs. Defaults to None.

        Returns:
            List[int]: List of input_id with the appropriate special tokens.
        
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens.

A BigBird sequence has the following format.


Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens . A BigBird sequence has the following format .
def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None):
        if token_ids_1 is None:
            return [self.cls_id] + token_ids_0 + [self.sep_id]
        _cls = [self.cls_id]
        _sep = [self.sep_id]
        return _cls + token_ids_0 + _sep + token_ids_1 + _sep
def build_inputs_with_special_tokens ( self , token_ids_0 , token_ids_1 = None ) : if token_ids_1 is None : return [ self . cls_id ] + token_ids_0 + [ self . sep_id ] _cls = [ self . cls_id ] _sep = [ self . sep_id ] return _cls + token_ids_0 + _sep + token_ids_1 + _sep
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens.
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens .
"""
        Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
        adding special tokens.

        A BigBird sequence has the following format:

        - single sequence:      ``[CLS] X [SEP]``
        - pair of sequences:        ``[CLS] A [SEP] B [SEP]``

        Args:
            token_ids_0 (List[int]):
                List of IDs to which the special tokens will be added.
            token_ids_1 (List[int], optional):
                Optional second list of IDs for sequence pairs. Defaults to None.

        Returns:
            List[int]: List of input_id with the appropriate special tokens.
        """
List of input_id with the appropriate special tokens.
List of input_id with the appropriate special tokens .
List[int]
self
token_ids_0
List of IDs to which the special tokens will be added.
List of IDs to which the special tokens will be added .
token_ids_1
Optional second list of IDs for sequence pairs. Defaults to None.
Optional second list of IDs for sequence pairs . Defaults to None .
None