





"""simple docstring"""





import unittest

from parameterized import parameterized

from transformers import OpenLlamaConfig, is_torch_available, set_seed
from transformers.testing_utils import require_torch, torch_device

from ...generation.test_utils import GenerationTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
       import torch

       from transformers import OpenLlamaForCausalLM, OpenLlamaForSequenceClassification, OpenLlamaModel

class 		lowercase					:





      def __init__(       self      ,						lowercase      ,						lowercase=13      ,						lowercase=7      ,						lowercase=True      ,						lowercase=True      ,						lowercase=False      ,						lowercase=True      ,						lowercase=99      ,						lowercase=32      ,						lowercase=5      ,						lowercase=4      ,						lowercase=37      ,						lowercase="gelu"      ,						lowercase=0.1      ,						lowercase=0.1      ,						lowercase=512      ,						lowercase=16      ,						lowercase=2      ,						lowercase=0.02      ,						lowercase=3      ,						lowercase=4      ,						lowercase=None      ,						)		->     Tuple:
            lowerCAmelCase  						=       parent
            lowerCAmelCase  						=       batch_size
            lowerCAmelCase  						=       seq_length
            lowerCAmelCase  						=       is_training
            lowerCAmelCase  						=       use_input_mask
            lowerCAmelCase  						=       use_token_type_ids
            lowerCAmelCase  						=       use_labels
            lowerCAmelCase  						=       vocab_size
            lowerCAmelCase  						=       hidden_size
            lowerCAmelCase  						=       num_hidden_layers
            lowerCAmelCase  						=       num_attention_heads
            lowerCAmelCase  						=       intermediate_size
            lowerCAmelCase  						=       hidden_act
            lowerCAmelCase  						=       hidden_dropout_prob
            lowerCAmelCase  						=       attention_probs_dropout_prob
            lowerCAmelCase  						=       max_position_embeddings
            lowerCAmelCase  						=       type_vocab_size
            lowerCAmelCase  						=       type_sequence_label_size
            lowerCAmelCase  						=       initializer_range
            lowerCAmelCase  						=       num_labels
            lowerCAmelCase  						=       num_choices
            lowerCAmelCase  						=       scope





      def     _snake_case			(       self )		->     List[str]:
            lowerCAmelCase  						=       ids_tensor([self.batch_size, self.seq_length]      ,						self.vocab_size )

            lowerCAmelCase  						=       None
            if self.use_input_mask:
                  lowerCAmelCase  						=       random_attention_mask([self.batch_size, self.seq_length] )

            lowerCAmelCase  						=       None
            if self.use_token_type_ids:
                  lowerCAmelCase  						=       ids_tensor([self.batch_size, self.seq_length]      ,						self.type_vocab_size )

            lowerCAmelCase  						=       None
            lowerCAmelCase  						=       None
            lowerCAmelCase  						=       None
            if self.use_labels:
                  lowerCAmelCase  						=       ids_tensor([self.batch_size]      ,						self.type_sequence_label_size )
                  lowerCAmelCase  						=       ids_tensor([self.batch_size, self.seq_length]      ,						self.num_labels )
                  lowerCAmelCase  						=       ids_tensor([self.batch_size]      ,						self.num_choices )

            lowerCAmelCase  						=       self.get_config()

            return config, input_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels





      def     _snake_case			(       self )		->     List[Any]:
            return OpenLlamaConfig(
                vocab_size=self.vocab_size      ,						hidden_size=self.hidden_size      ,						num_hidden_layers=self.num_hidden_layers      ,						num_attention_heads=self.num_attention_heads      ,						intermediate_size=self.intermediate_size      ,						hidden_act=self.hidden_act      ,						hidden_dropout_prob=self.hidden_dropout_prob      ,						attention_probs_dropout_prob=self.attention_probs_dropout_prob      ,						max_position_embeddings=self.max_position_embeddings      ,						type_vocab_size=self.type_vocab_size      ,						is_decoder=lowercase      ,						initializer_range=self.initializer_range      ,						use_stable_embedding=lowercase      ,						)





      def     _snake_case			(       self      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase )		->     Any:
            lowerCAmelCase  						=       OpenLlamaModel(config=lowercase )
            model.to(lowercase )
            model.eval()
            lowerCAmelCase  						=       model(lowercase      ,						attention_mask=lowercase )
            lowerCAmelCase  						=       model(lowercase )
            self.parent.assertEqual(result.last_hidden_state.shape      ,						(self.batch_size, self.seq_length, self.hidden_size) )





      def     _snake_case			(       self      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						)		->     Dict:
            lowerCAmelCase  						=       True
            lowerCAmelCase  						=       OpenLlamaModel(lowercase )
            model.to(lowercase )
            model.eval()
            lowerCAmelCase  						=       model(
                lowercase      ,						attention_mask=lowercase      ,						encoder_hidden_states=lowercase      ,						encoder_attention_mask=lowercase      ,						)
            lowerCAmelCase  						=       model(
                lowercase      ,						attention_mask=lowercase      ,						encoder_hidden_states=lowercase      ,						)
            lowerCAmelCase  						=       model(lowercase      ,						attention_mask=lowercase )
            self.parent.assertEqual(result.last_hidden_state.shape      ,						(self.batch_size, self.seq_length, self.hidden_size) )





      def     _snake_case			(       self      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						)		->     int:
            lowerCAmelCase  						=       OpenLlamaForCausalLM(config=lowercase )
            model.to(lowercase )
            model.eval()
            lowerCAmelCase  						=       model(lowercase      ,						attention_mask=lowercase      ,						labels=lowercase )
            self.parent.assertEqual(result.logits.shape      ,						(self.batch_size, self.seq_length, self.vocab_size) )





      def     _snake_case			(       self      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						lowercase      ,						)		->     List[str]:
            lowerCAmelCase  						=       True
            lowerCAmelCase  						=       True
            lowerCAmelCase  						=       OpenLlamaForCausalLM(config=lowercase )
            model.to(lowercase )
            model.eval()

            # first forward pass
            lowerCAmelCase  						=       model(
                lowercase      ,						attention_mask=lowercase      ,						encoder_hidden_states=lowercase      ,						encoder_attention_mask=lowercase      ,						use_cache=lowercase      ,						)
            lowerCAmelCase  						=       outputs.past_key_values

            # create hypothetical multiple next token and extent to next_input_ids
            lowerCAmelCase  						=       ids_tensor((self.batch_size, 3)      ,						config.vocab_size )
            lowerCAmelCase  						=       ids_tensor((self.batch_size, 3)      ,						vocab_size=2 )

            # append to next input_ids and
            lowerCAmelCase  						=       torch.cat([input_ids, next_tokens]      ,						dim=-1 )
            lowerCAmelCase  						=       torch.cat([input_mask, next_mask]      ,						dim=-1 )

            lowerCAmelCase  						=       model(
                lowercase      ,						attention_mask=lowercase      ,						encoder_hidden_states=lowercase      ,						encoder_attention_mask=lowercase      ,						output_hidden_states=lowercase      ,						)["""hidden_states"""][0]
            lowerCAmelCase  						=       model(
                lowercase      ,						attention_mask=lowercase      ,						encoder_hidden_states=lowercase      ,						encoder_attention_mask=lowercase      ,						past_key_values=lowercase      ,						output_hidden_states=lowercase      ,						)["""hidden_states"""][0]

            # select random slice
            lowerCAmelCase  						=       ids_tensor((1,)      ,						output_from_past.shape[-1] ).item()
            lowerCAmelCase  						=       output_from_no_past[:, -3:, random_slice_idx].detach()
            lowerCAmelCase  						=       output_from_past[:, :, random_slice_idx].detach()

            self.parent.assertTrue(output_from_past_slice.shape[1] == next_tokens.shape[1] )

            # test that outputs are equal for slice
            self.parent.assertTrue(torch.allclose(lowercase      ,						lowercase      ,						atol=1e-3 ) )





      def     _snake_case			(       self )		->     Tuple:
            lowerCAmelCase  						=       self.prepare_config_and_inputs()
            (
                (
                lowerCAmelCase
            )						,		(
                lowerCAmelCase
            )						,		(
                lowerCAmelCase
            )						,		(
                lowerCAmelCase
            )						,		(
                lowerCAmelCase
            )						,		(
                lowerCAmelCase
            )						,		(
                lowerCAmelCase
            )						,		
            )  						=       config_and_inputs
            lowerCAmelCase  						=       {"""input_ids""": input_ids, """attention_mask""": input_mask}
            return config, inputs_dict







@require_torch
class 		lowercase					(					_UpperCAmelCase     ,  _UpperCAmelCase     ,  _UpperCAmelCase     ,  unittest.TestCase					):
      _SCREAMING_SNAKE_CASE					=      (
          (OpenLlamaModel, OpenLlamaForCausalLM, OpenLlamaForSequenceClassification) if is_torch_available() else ()
      )
      _SCREAMING_SNAKE_CASE					=      (OpenLlamaForCausalLM,) if is_torch_available() else ()
      _SCREAMING_SNAKE_CASE					=      (
          {
              'feature-extraction': OpenLlamaModel,
              'text-classification': OpenLlamaForSequenceClassification,
              'text-generation': OpenLlamaForCausalLM,
              'zero-shot': OpenLlamaForSequenceClassification,
          }
          if is_torch_available()
          else {}
      )
      _SCREAMING_SNAKE_CASE					=      False
      _SCREAMING_SNAKE_CASE					=      False





      def     _snake_case			(       self )		->     Any:
            lowerCAmelCase  						=       OpenLlamaModelTester(self )
            lowerCAmelCase  						=       ConfigTester(self      ,						config_class=lowercase      ,						hidden_size=37 )





      def     _snake_case			(       self )		->     Tuple:
            self.config_tester.run_common_tests()





      def     _snake_case			(       self )		->     Optional[Any]:
            lowerCAmelCase  						=       self.model_tester.prepare_config_and_inputs()
            self.model_tester.create_and_check_model(*lowercase )





      def     _snake_case			(       self )		->     Dict:
            lowerCAmelCase  						=       self.model_tester.prepare_config_and_inputs()
            for type in ["absolute", "relative_key", "relative_key_query"]:
                  lowerCAmelCase  						=       type
                  self.model_tester.create_and_check_model(*lowercase )





      def     _snake_case			(       self )		->     Tuple:
            lowerCAmelCase						,		lowerCAmelCase  						=       self.model_tester.prepare_config_and_inputs_for_common()
            lowerCAmelCase  						=       3
            lowerCAmelCase  						=       input_dict["""input_ids"""]
            lowerCAmelCase  						=       input_ids.ne(1 ).to(lowercase )
            lowerCAmelCase  						=       ids_tensor([self.model_tester.batch_size]      ,						self.model_tester.type_sequence_label_size )
            lowerCAmelCase  						=       OpenLlamaForSequenceClassification(lowercase )
            model.to(lowercase )
            model.eval()
            lowerCAmelCase  						=       model(lowercase      ,						attention_mask=lowercase      ,						labels=lowercase )
            self.assertEqual(result.logits.shape      ,						(self.model_tester.batch_size, self.model_tester.num_labels) )





      def     _snake_case			(       self )		->     List[str]:
            lowerCAmelCase						,		lowerCAmelCase  						=       self.model_tester.prepare_config_and_inputs_for_common()
            lowerCAmelCase  						=       3
            lowerCAmelCase  						=       """single_label_classification"""
            lowerCAmelCase  						=       input_dict["""input_ids"""]
            lowerCAmelCase  						=       input_ids.ne(1 ).to(lowercase )
            lowerCAmelCase  						=       ids_tensor([self.model_tester.batch_size]      ,						self.model_tester.type_sequence_label_size )
            lowerCAmelCase  						=       OpenLlamaForSequenceClassification(lowercase )
            model.to(lowercase )
            model.eval()
            lowerCAmelCase  						=       model(lowercase      ,						attention_mask=lowercase      ,						labels=lowercase )
            self.assertEqual(result.logits.shape      ,						(self.model_tester.batch_size, self.model_tester.num_labels) )





      def     _snake_case			(       self )		->     Any:
            lowerCAmelCase						,		lowerCAmelCase  						=       self.model_tester.prepare_config_and_inputs_for_common()
            lowerCAmelCase  						=       3
            lowerCAmelCase  						=       """multi_label_classification"""
            lowerCAmelCase  						=       input_dict["""input_ids"""]
            lowerCAmelCase  						=       input_ids.ne(1 ).to(lowercase )
            lowerCAmelCase  						=       ids_tensor(
                [self.model_tester.batch_size, config.num_labels]      ,						self.model_tester.type_sequence_label_size ).to(torch.float )
            lowerCAmelCase  						=       OpenLlamaForSequenceClassification(lowercase )
            model.to(lowercase )
            model.eval()
            lowerCAmelCase  						=       model(lowercase      ,						attention_mask=lowercase      ,						labels=lowercase )
            self.assertEqual(result.logits.shape      ,						(self.model_tester.batch_size, self.model_tester.num_labels) )





      @unittest.skip("""Open-Llama buffers include complex numbers, which breaks this test""" )
      def     _snake_case			(       self )		->     str:
            pass





      @parameterized.expand([("""linear""",), ("""dynamic""",)] )
      def     _snake_case			(       self      ,						lowercase )		->     str:
            lowerCAmelCase						,		lowerCAmelCase  						=       self.model_tester.prepare_config_and_inputs_for_common()
            lowerCAmelCase  						=       ids_tensor([1, 10]      ,						config.vocab_size )
            lowerCAmelCase  						=       ids_tensor([1, int(config.max_position_embeddings * 1.5 )]      ,						config.vocab_size )

            set_seed(42 )  # Fixed seed at init time so the two models get the same random weights
            lowerCAmelCase  						=       OpenLlamaModel(lowercase )
            original_model.to(lowercase )
            original_model.eval()
            lowerCAmelCase  						=       original_model(lowercase ).last_hidden_state
            lowerCAmelCase  						=       original_model(lowercase ).last_hidden_state

            set_seed(42 )  # Fixed seed at init time so the two models get the same random weights
            lowerCAmelCase  						=       {"""type""": scaling_type, """factor""": 10.0}
            lowerCAmelCase  						=       OpenLlamaModel(lowercase )
            scaled_model.to(lowercase )
            scaled_model.eval()
            lowerCAmelCase  						=       scaled_model(lowercase ).last_hidden_state
            lowerCAmelCase  						=       scaled_model(lowercase ).last_hidden_state

            # Dynamic scaling does not change the RoPE embeddings until it receives an input longer than the original
            # maximum sequence length, so the outputs for the short input should match.
            if scaling_type == "dynamic":
                  self.assertTrue(torch.allclose(lowercase      ,						lowercase      ,						atol=1e-5 ) )
            else:
                  self.assertFalse(torch.allclose(lowercase      ,						lowercase      ,						atol=1e-5 ) )

            # The output should be different for long inputs
            self.assertFalse(torch.allclose(lowercase      ,						lowercase      ,						atol=1e-5 ) )













"""simple docstring"""





import unittest

from transformers import BigBirdTokenizer, BigBirdTokenizerFast
from transformers.testing_utils import get_tests_dir, require_sentencepiece, require_tokenizers, require_torch, slow
from transformers.utils import cached_property

from ...test_tokenization_common import TokenizerTesterMixin


SCREAMING_SNAKE_CASE__					=   "▁"

SCREAMING_SNAKE_CASE__					=   get_tests_dir("fixtures/test_sentencepiece.model")

@require_sentencepiece
@require_tokenizers
class 		lowercase					(					_UpperCAmelCase     ,  unittest.TestCase					):
      _SCREAMING_SNAKE_CASE					=      BigBirdTokenizer
      _SCREAMING_SNAKE_CASE					=      BigBirdTokenizerFast
      _SCREAMING_SNAKE_CASE					=      True
      _SCREAMING_SNAKE_CASE					=      True





      def     _snake_case			(       self )		->     List[str]:
            super().setUp()

            lowerCAmelCase  						=       self.tokenizer_class(lowercase      ,						keep_accents=lowercase )
            tokenizer.save_pretrained(self.tmpdirname )





      def     _snake_case			(       self )		->     List[Any]:
            lowerCAmelCase  						=       """<s>"""
            lowerCAmelCase  						=       1

            self.assertEqual(self.get_tokenizer()._convert_token_to_id(lowercase )      ,						lowercase )
            self.assertEqual(self.get_tokenizer()._convert_id_to_token(lowercase )      ,						lowercase )





      def     _snake_case			(       self )		->     List[str]:
            lowerCAmelCase  						=       list(self.get_tokenizer().get_vocab().keys() )

            self.assertEqual(vocab_keys[0]      ,						"""<unk>""" )
            self.assertEqual(vocab_keys[1]      ,						"""<s>""" )
            self.assertEqual(vocab_keys[-1]      ,						"""[MASK]""" )
            self.assertEqual(len(lowercase )      ,						1_004 )





      def     _snake_case			(       self )		->     Union[str, Any]:
            self.assertEqual(self.get_tokenizer().vocab_size      ,						1_000 )





      def     _snake_case			(       self )		->     List[str]:
            if not self.test_rust_tokenizer:
                  return

            lowerCAmelCase  						=       self.get_tokenizer()
            lowerCAmelCase  						=       self.get_rust_tokenizer()

            lowerCAmelCase  						=       """I was born in 92000, and this is falsé."""

            lowerCAmelCase  						=       tokenizer.tokenize(lowercase )
            lowerCAmelCase  						=       rust_tokenizer.tokenize(lowercase )
            self.assertListEqual(lowercase      ,						lowercase )

            lowerCAmelCase  						=       tokenizer.encode(lowercase      ,						add_special_tokens=lowercase )
            lowerCAmelCase  						=       rust_tokenizer.encode(lowercase      ,						add_special_tokens=lowercase )
            self.assertListEqual(lowercase      ,						lowercase )

            lowerCAmelCase  						=       self.get_rust_tokenizer()
            lowerCAmelCase  						=       tokenizer.encode(lowercase )
            lowerCAmelCase  						=       rust_tokenizer.encode(lowercase )
            self.assertListEqual(lowercase      ,						lowercase )





      def     _snake_case			(       self )		->     int:
            lowerCAmelCase  						=       BigBirdTokenizer(lowercase      ,						keep_accents=lowercase )

            lowerCAmelCase  						=       tokenizer.tokenize("""This is a test""" )
            self.assertListEqual(lowercase      ,						["""▁This""", """▁is""", """▁a""", """▁t""", """est"""] )

            self.assertListEqual(
                tokenizer.convert_tokens_to_ids(lowercase )      ,						[285, 46, 10, 170, 382]      ,						)

            lowerCAmelCase  						=       tokenizer.tokenize("""I was born in 92000, and this is falsé.""" )
            self.assertListEqual(
                lowercase      ,						[
                    SPIECE_UNDERLINE + """I""",
                    SPIECE_UNDERLINE + """was""",
                    SPIECE_UNDERLINE + """b""",
                    """or""",
                    """n""",
                    SPIECE_UNDERLINE + """in""",
                    SPIECE_UNDERLINE + """""",
                    """9""",
                    """2""",
                    """0""",
                    """0""",
                    """0""",
                    """,""",
                    SPIECE_UNDERLINE + """and""",
                    SPIECE_UNDERLINE + """this""",
                    SPIECE_UNDERLINE + """is""",
                    SPIECE_UNDERLINE + """f""",
                    """al""",
                    """s""",
                    """é""",
                    """.""",
                ]      ,						)
            lowerCAmelCase  						=       tokenizer.convert_tokens_to_ids(lowercase )
            self.assertListEqual(
                lowercase      ,						[8, 21, 84, 55, 24, 19, 7, 0, 602, 347, 347, 347, 3, 12, 66, 46, 72, 80, 6, 0, 4]      ,						)

            lowerCAmelCase  						=       tokenizer.convert_ids_to_tokens(lowercase )
            self.assertListEqual(
                lowercase      ,						[
                    SPIECE_UNDERLINE + """I""",
                    SPIECE_UNDERLINE + """was""",
                    SPIECE_UNDERLINE + """b""",
                    """or""",
                    """n""",
                    SPIECE_UNDERLINE + """in""",
                    SPIECE_UNDERLINE + """""",
                    """<unk>""",
                    """2""",
                    """0""",
                    """0""",
                    """0""",
                    """,""",
                    SPIECE_UNDERLINE + """and""",
                    SPIECE_UNDERLINE + """this""",
                    SPIECE_UNDERLINE + """is""",
                    SPIECE_UNDERLINE + """f""",
                    """al""",
                    """s""",
                    """<unk>""",
                    """.""",
                ]      ,						)





      @cached_property
      def     _snake_case			(       self )		->     Tuple:
            return BigBirdTokenizer.from_pretrained("""google/bigbird-roberta-base""" )





      @slow
      def     _snake_case			(       self )		->     Tuple:
            lowerCAmelCase  						=       """Hello World!"""
            lowerCAmelCase  						=       [65, 18_536, 2_260, 101, 66]

            self.assertListEqual(lowercase      ,						self.big_tokenizer.encode(lowercase ) )





      @slow
      def     _snake_case			(       self )		->     int:
            lowerCAmelCase  						=       (
                """This is a very long text with a lot of weird characters, such as: . , ~ ? ( ) \" [ ] ! : - . Also we will"""
                """ add words that should not exsist and be tokenized to <unk>, such as saoneuhaoesuth"""
            )
            # fmt: off
            lowerCAmelCase  						=       [65, 871, 419, 358, 946, 991, 2_521, 452, 358, 1_357, 387, 7_751, 3_536, 112, 985, 456, 126, 865, 938, 5_400, 5_734, 458, 1_368, 467, 786, 2_462, 5_246, 1_159, 633, 865, 4_519, 457, 582, 852, 2_557, 427, 916, 508, 405, 34_324, 497, 391, 408, 11_342, 1_244, 385, 100, 938, 985, 456, 574, 362, 12_597, 3_200, 3_129, 1_172, 66]  # noqa: E231
            # fmt: on
            self.assertListEqual(lowercase      ,						self.big_tokenizer.encode(lowercase ) )





      @require_torch
      @slow
      def     _snake_case			(       self )		->     Tuple:
            import torch

            from transformers import BigBirdConfig, BigBirdModel

            # Build sequence
            lowerCAmelCase  						=       list(self.big_tokenizer.get_vocab().keys() )[:10]
            lowerCAmelCase  						=       """ """.join(lowercase )
            lowerCAmelCase  						=       self.big_tokenizer.encode_plus(lowercase      ,						return_tensors="""pt"""      ,						return_token_type_ids=lowercase )
            lowerCAmelCase  						=       self.big_tokenizer.batch_encode_plus(
                [sequence + """ """ + sequence]      ,						return_tensors="""pt"""      ,						return_token_type_ids=lowercase )

            lowerCAmelCase  						=       BigBirdConfig(attention_type="""original_full""" )
            lowerCAmelCase  						=       BigBirdModel(lowercase )

            assert model.get_input_embeddings().weight.shape[0] >= self.big_tokenizer.vocab_size

            with torch.no_grad():
                  model(**lowercase )
                  model(**lowercase )





      @slow
      def     _snake_case			(       self )		->     List[str]:
            lowerCAmelCase  						=       BigBirdTokenizer.from_pretrained("""google/bigbird-roberta-base""" )
            lowerCAmelCase  						=       tokenizer.decode(tokenizer("""Paris is the [MASK].""" ).input_ids )

            self.assertTrue(decoded_text == """[CLS] Paris is the[MASK].[SEP]""" )





      @slow
      def     _snake_case			(       self )		->     Optional[int]:
            # fmt: off
            lowerCAmelCase  						=       {"""input_ids""": [[65, 39_286, 458, 36_335, 2_001, 456, 13_073, 13_266, 455, 113, 7_746, 1_741, 11_157, 391, 13_073, 13_266, 455, 113, 3_967, 35_412, 113, 4_936, 109, 3_870, 2_377, 113, 30_084, 45_720, 458, 134, 17_496, 112, 503, 11_672, 113, 118, 112, 5_665, 13_347, 38_687, 112, 1_496, 31_389, 112, 3_268, 47_264, 134, 962, 112, 16_377, 8_035, 23_130, 430, 12_169, 15_518, 28_592, 458, 146, 41_697, 109, 391, 12_169, 15_518, 16_689, 458, 146, 41_358, 109, 452, 726, 4_034, 111, 763, 35_412, 5_082, 388, 1_903, 111, 9_051, 391, 2_870, 48_918, 1_900, 1_123, 550, 998, 112, 9_586, 15_985, 455, 391, 410, 22_955, 37_636, 114, 66], [65, 448, 17_496, 419, 3_663, 385, 763, 113, 27_533, 2_870, 3_283, 13_043, 1_639, 24_713, 523, 656, 24_013, 18_550, 2_521, 517, 27_014, 21_244, 420, 1_212, 1_465, 391, 927, 4_833, 388, 578, 11_786, 114, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [65, 484, 2_169, 7_687, 21_932, 18_146, 726, 363, 17_032, 3_391, 114, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], """attention_mask""": [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]}  # noqa: E501
            # fmt: on

            self.tokenizer_integration_test_util(
                expected_encoding=lowercase      ,						model_name="""google/bigbird-roberta-base"""      ,						revision="""215c99f1600e06f83acce68422f2035b2b5c3510"""      ,						)






