

"""simple docstring"""
import copy
import inspect
import unittest

from transformers import PretrainedConfig, SwiftFormerConfig
from transformers.testing_utils import (
    require_torch,
    require_vision,
    slow,
    torch_device,
)
from transformers.utils import cached_property, is_torch_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
    import torch
    from torch import nn

    from transformers import SwiftFormerForImageClassification, SwiftFormerModel
    from transformers.models.swiftformer.modeling_swiftformer import SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
    from PIL import Image

    from transformers import ViTImageProcessor

class       lowerCamelCase	:


  '''simple docstring'''







  def __init__(self							,       _lowerCamelCase							,       _lowerCamelCase=13							,       _lowerCamelCase=3							,       _lowerCamelCase=True							,       _lowerCamelCase=True							,       _lowerCamelCase=0.1							,       _lowerCamelCase=0.1							,       _lowerCamelCase=224							,       _lowerCamelCase=1000							,       _lowerCamelCase=[3, 3, 6, 4]							,       _lowerCamelCase=[48, 56, 112, 220]							,       ):


        """simple docstring"""

        UpperCAmelCase__			:							int							=    parent
        UpperCAmelCase__			:							List[Any]							=    batch_size
        UpperCAmelCase__			:							Optional[int]							=    num_channels
        UpperCAmelCase__			:							int							=    is_training
        UpperCAmelCase__			:							Optional[Any]							=    use_labels
        UpperCAmelCase__			:							str							=    hidden_dropout_prob
        UpperCAmelCase__			:							int							=    attention_probs_dropout_prob
        UpperCAmelCase__			:							List[Any]							=    num_labels
        UpperCAmelCase__			:							List[Any]							=    image_size
        UpperCAmelCase__			:							Optional[Any]							=    layer_depths
        UpperCAmelCase__			:							Optional[int]							=    embed_dims



  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__			:							List[Any]							=    floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]	)

        UpperCAmelCase__			:							Tuple							=    None
        if self.use_labels:
              UpperCAmelCase__			:							Optional[Any]							=    ids_tensor([self.batch_size]							,       self.num_labels	)

        UpperCAmelCase__			:							Dict							=    self.get_config()

        return config, pixel_values, labels



  def  _a      (self	):


        """simple docstring"""

        return SwiftFormerConfig(
            depths=self.layer_depths							,       embed_dims=self.embed_dims							,       mlp_ratio=4							,       downsamples=[True, True, True, True]							,       hidden_act="""gelu"""							,       num_labels=self.num_labels							,       down_patch_size=3							,       down_stride=2							,       down_pad=1							,       drop_rate=0.0							,       drop_path_rate=0.0							,       use_layer_scale=_lowerCamelCase							,       layer_scale_init_value=1e-5							,       )



  def  _a      (self							,       _lowerCamelCase							,       _lowerCamelCase							,       _lowerCamelCase	):


        """simple docstring"""

        UpperCAmelCase__			:							int							=    SwiftFormerModel(config=_lowerCamelCase	)
        model.to(_lowerCamelCase	)
        model.eval()
        UpperCAmelCase__			:							str							=    model(_lowerCamelCase	)
        self.parent.assertEqual(result.last_hidden_state.shape							,       (self.batch_size, self.embed_dims[-1], 7, 7)	)



  def  _a      (self							,       _lowerCamelCase							,       _lowerCamelCase							,       _lowerCamelCase	):


        """simple docstring"""

        UpperCAmelCase__			:							Union[str, Any]							=    self.num_labels
        UpperCAmelCase__			:							Any							=    SwiftFormerForImageClassification(_lowerCamelCase	)
        model.to(_lowerCamelCase	)
        model.eval()
        UpperCAmelCase__			:							int							=    model(_lowerCamelCase							,       labels=_lowerCamelCase	)
        self.parent.assertEqual(result.logits.shape							,       (self.batch_size, self.num_labels)	)

        UpperCAmelCase__			:							Optional[Any]							=    SwiftFormerForImageClassification(_lowerCamelCase	)
        model.to(_lowerCamelCase	)
        model.eval()

        UpperCAmelCase__			:							List[str]							=    floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]	)
        UpperCAmelCase__			:							Optional[Any]							=    model(_lowerCamelCase	)
        self.parent.assertEqual(result.logits.shape							,       (self.batch_size, self.num_labels)	)




  def  _a      (self	):


        """simple docstring"""

        ((UpperCAmelCase__)					,		(UpperCAmelCase__)					,		(UpperCAmelCase__))			:							int							=    self.prepare_config_and_inputs()
        UpperCAmelCase__			:							str							=    {"""pixel_values""": pixel_values}
        return config, inputs_dict




@require_torch
class       lowerCamelCase	(       lowerCAmelCase__					,					lowerCAmelCase__					,					unittest.TestCase   ):


  '''simple docstring'''







  SCREAMING_SNAKE_CASE					      =  (SwiftFormerModel, SwiftFormerForImageClassification) if is_torch_available() else ()
  SCREAMING_SNAKE_CASE					      =  (
      {'feature-extraction': SwiftFormerModel, 'image-classification': SwiftFormerForImageClassification}
      if is_torch_available()
      else {}
  )

  SCREAMING_SNAKE_CASE					      =  False
  SCREAMING_SNAKE_CASE					      =  False
  SCREAMING_SNAKE_CASE					      =  False
  SCREAMING_SNAKE_CASE					      =  False
  SCREAMING_SNAKE_CASE					      =  False



  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__			:							Dict							=    SwiftFormerModelTester(self	)
        UpperCAmelCase__			:							Tuple							=    ConfigTester(
            self							,       config_class=_lowerCamelCase							,       has_text_modality=_lowerCamelCase							,       hidden_size=37							,       num_attention_heads=12							,       num_hidden_layers=12							,       )



  def  _a      (self	):


        """simple docstring"""

        self.config_tester.run_common_tests()



  @unittest.skip(reason="""SwiftFormer does not use inputs_embeds"""	)
  def  _a      (self	):


        """simple docstring"""

        pass



  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__					,		UpperCAmelCase__			:							List[str]							=    self.model_tester.prepare_config_and_inputs_for_common()

        for model_class in self.all_model_classes:
              UpperCAmelCase__			:							Any							=    model_class(_lowerCamelCase	)
              UpperCAmelCase__			:							Tuple							=    model.get_output_embeddings()
              self.assertTrue(x is None or isinstance(_lowerCamelCase							,       nn.Linear	)	)



  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__					,		UpperCAmelCase__			:							str							=    self.model_tester.prepare_config_and_inputs_for_common()

        for model_class in self.all_model_classes:
              UpperCAmelCase__			:							Optional[int]							=    model_class(_lowerCamelCase	)
              UpperCAmelCase__			:							Optional[Any]							=    inspect.signature(model.forward	)
              # signature.parameters is an OrderedDict => so arg_names order is deterministic
              UpperCAmelCase__			:							Optional[int]							=    [*signature.parameters.keys()]

              UpperCAmelCase__			:							Any							=    ["""pixel_values"""]
              self.assertListEqual(arg_names[:1]							,       _lowerCamelCase	)



  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__			:							List[str]							=    self.model_tester.prepare_config_and_inputs()
        self.model_tester.create_and_check_model(*_lowerCamelCase	)



  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__			:							Union[str, Any]							=    self.model_tester.prepare_config_and_inputs()
        self.model_tester.create_and_check_for_image_classification(*_lowerCamelCase	)



  @slow
  def  _a      (self	):


        """simple docstring"""

        for model_name in SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
              UpperCAmelCase__			:							str							=    SwiftFormerModel.from_pretrained(_lowerCamelCase	)
              self.assertIsNotNone(_lowerCamelCase	)



  @unittest.skip(reason="""SwiftFormer does not output attentions"""	)
  def  _a      (self	):


        """simple docstring"""

        pass



  def  _a      (self	):


        """simple docstring"""

        def check_hidden_states_output(_lowerCamelCase							,       _lowerCamelCase							,       _lowerCamelCase	):
              UpperCAmelCase__			:							List[str]							=    model_class(_lowerCamelCase	)
              model.to(_lowerCamelCase	)
              model.eval()

              with torch.no_grad():
                    UpperCAmelCase__			:							Optional[Any]							=    model(**self._prepare_for_class(_lowerCamelCase							,       _lowerCamelCase	)	)

              UpperCAmelCase__			:							Any							=    outputs.hidden_states

              UpperCAmelCase__			:							Dict							=    8
              self.assertEqual(len(_lowerCamelCase	)							,       _lowerCamelCase	)  # TODO

              # SwiftFormer's feature maps are of shape (batch_size, embed_dims, height, width)
              # with the width and height being successively divided by 2, after every 2 blocks
              for i in range(len(_lowerCamelCase	)	):
                    self.assertEqual(
                        hidden_states[i].shape							,       torch.Size(
                            [
                                self.model_tester.batch_size,
                                self.model_tester.embed_dims[i // 2],
                                (self.model_tester.image_size // 4) // 2 ** (i // 2),
                                (self.model_tester.image_size // 4) // 2 ** (i // 2),
                            ]	)							,       )

        UpperCAmelCase__					,		UpperCAmelCase__			:							int							=    self.model_tester.prepare_config_and_inputs_for_common()

        for model_class in self.all_model_classes:
              UpperCAmelCase__			:							int							=    True
              check_hidden_states_output(_lowerCamelCase							,       _lowerCamelCase							,       _lowerCamelCase	)

              # check that output_hidden_states also work using config
              del inputs_dict["output_hidden_states"]
              UpperCAmelCase__			:							List[Any]							=    True

              check_hidden_states_output(_lowerCamelCase							,       _lowerCamelCase							,       _lowerCamelCase	)



  def  _a      (self	):


        """simple docstring"""

        def _config_zero_init(_lowerCamelCase	):
              UpperCAmelCase__			:							str							=    copy.deepcopy(_lowerCamelCase	)
              for key in configs_no_init.__dict__.keys():
                    if "_range" in key or "_std" in key or "initializer_factor" in key or "layer_scale" in key:
                          setattr(_lowerCamelCase							,       _lowerCamelCase							,       1e-10	)
                    if isinstance(getattr(_lowerCamelCase							,       _lowerCamelCase							,       _lowerCamelCase	)							,       _lowerCamelCase	):
                          UpperCAmelCase__			:							Union[str, Any]							=    _config_zero_init(getattr(_lowerCamelCase							,       _lowerCamelCase	)	)
                          setattr(_lowerCamelCase							,       _lowerCamelCase							,       _lowerCamelCase	)
              return configs_no_init

        UpperCAmelCase__					,		UpperCAmelCase__			:							str							=    self.model_tester.prepare_config_and_inputs_for_common()

        UpperCAmelCase__			:							Optional[int]							=    _config_zero_init(_lowerCamelCase	)
        for model_class in self.all_model_classes:
              UpperCAmelCase__			:							Union[str, Any]							=    model_class(config=_lowerCamelCase	)
              for name, param in model.named_parameters():
                    if param.requires_grad:
                          self.assertIn(
                              ((param.data.mean() * 1e9) / 1e9).round().item()							,       [0.0, 1.0]							,       msg=F"""Parameter {name} of model {model_class} seems not properly initialized"""							,       )




  @unittest.skip("""Will be fixed soon by reducing the size of the model used for common tests."""	)
  def  _a      (self	):


        """simple docstring"""

        pass




def 					a__						(						)	-> Dict:
      UpperCAmelCase__			:							Tuple							=    Image.open("""./tests/fixtures/tests_samples/COCO/000000039769.png"""    )
      return image





@require_torch
@require_vision
class       lowerCamelCase	(       unittest.TestCase   ):


  '''simple docstring'''







  @cached_property
  def  _a      (self	):


        """simple docstring"""

        return ViTImageProcessor.from_pretrained("""MBZUAI/swiftformer-xs"""	) if is_vision_available() else None




  @slow
  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__			:							Optional[int]							=    SwiftFormerForImageClassification.from_pretrained("""MBZUAI/swiftformer-xs"""	).to(_lowerCamelCase	)

        UpperCAmelCase__			:							Dict							=    self.default_image_processor
        UpperCAmelCase__			:							Tuple							=    prepare_img()
        UpperCAmelCase__			:							int							=    image_processor(images=_lowerCamelCase							,       return_tensors="""pt"""	).to(_lowerCamelCase	)

        # forward pass
        with torch.no_grad():
              UpperCAmelCase__			:							List[str]							=    model(**_lowerCamelCase	)

        # verify the logits
        UpperCAmelCase__			:							List[str]							=    torch.Size((1, 1000)	)
        self.assertEqual(outputs.logits.shape							,       _lowerCamelCase	)

        UpperCAmelCase__			:							Any							=    torch.tensor([[-2.17_03e00, 2.11_07e00, -2.08_11e00]]	).to(_lowerCamelCase	)
        self.assertTrue(torch.allclose(outputs.logits[0, :3]							,       _lowerCamelCase							,       atol=1e-4	)	)




"""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


_A							=  """▁"""

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

@require_sentencepiece
@require_tokenizers
class       lowerCamelCase	(       lowerCAmelCase__					,					unittest.TestCase   ):


  '''simple docstring'''







  SCREAMING_SNAKE_CASE					      =  BigBirdTokenizer
  SCREAMING_SNAKE_CASE					      =  BigBirdTokenizerFast
  SCREAMING_SNAKE_CASE					      =  True
  SCREAMING_SNAKE_CASE					      =  True



  def  _a      (self	):


        """simple docstring"""

        super().setUp()

        UpperCAmelCase__			:							Any							=    self.tokenizer_class(_lowerCamelCase							,       keep_accents=_lowerCamelCase	)
        tokenizer.save_pretrained(self.tmpdirname	)



  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__			:							Union[str, Any]							=    """<s>"""
        UpperCAmelCase__			:							Optional[int]							=    1

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



  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__			:							List[Any]							=    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(_lowerCamelCase	)							,       1004	)



  def  _a      (self	):


        """simple docstring"""

        self.assertEqual(self.get_tokenizer().vocab_size							,       1000	)



  def  _a      (self	):


        """simple docstring"""

        if not self.test_rust_tokenizer:
              return

        UpperCAmelCase__			:							List[Any]							=    self.get_tokenizer()
        UpperCAmelCase__			:							Optional[Any]							=    self.get_rust_tokenizer()

        UpperCAmelCase__			:							Dict							=    """I was born in 92000, and this is falsé."""

        UpperCAmelCase__			:							Dict							=    tokenizer.tokenize(_lowerCamelCase	)
        UpperCAmelCase__			:							int							=    rust_tokenizer.tokenize(_lowerCamelCase	)
        self.assertListEqual(_lowerCamelCase							,       _lowerCamelCase	)

        UpperCAmelCase__			:							int							=    tokenizer.encode(_lowerCamelCase							,       add_special_tokens=_lowerCamelCase	)
        UpperCAmelCase__			:							str							=    rust_tokenizer.encode(_lowerCamelCase							,       add_special_tokens=_lowerCamelCase	)
        self.assertListEqual(_lowerCamelCase							,       _lowerCamelCase	)

        UpperCAmelCase__			:							Any							=    self.get_rust_tokenizer()
        UpperCAmelCase__			:							List[Any]							=    tokenizer.encode(_lowerCamelCase	)
        UpperCAmelCase__			:							Union[str, Any]							=    rust_tokenizer.encode(_lowerCamelCase	)
        self.assertListEqual(_lowerCamelCase							,       _lowerCamelCase	)



  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__			:							str							=    BigBirdTokenizer(_lowerCamelCase							,       keep_accents=_lowerCamelCase	)

        UpperCAmelCase__			:							Union[str, Any]							=    tokenizer.tokenize("""This is a test"""	)
        self.assertListEqual(_lowerCamelCase							,       ["""▁This""", """▁is""", """▁a""", """▁t""", """est"""]	)

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

        UpperCAmelCase__			:							Dict							=    tokenizer.tokenize("""I was born in 92000, and this is falsé."""	)
        self.assertListEqual(
            _lowerCamelCase							,       [
                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""",
                """é""",
                """.""",
            ]							,       )
        UpperCAmelCase__			:							Tuple							=    tokenizer.convert_tokens_to_ids(_lowerCamelCase	)
        self.assertListEqual(
            _lowerCamelCase							,       [8, 21, 84, 55, 24, 19, 7, 0, 602, 347, 347, 347, 3, 12, 66, 46, 72, 80, 6, 0, 4]							,       )

        UpperCAmelCase__			:							Tuple							=    tokenizer.convert_ids_to_tokens(_lowerCamelCase	)
        self.assertListEqual(
            _lowerCamelCase							,       [
                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  _a      (self	):


        """simple docstring"""

        return BigBirdTokenizer.from_pretrained("""google/bigbird-roberta-base"""	)



  @slow
  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__			:							Tuple							=    """Hello World!"""
        UpperCAmelCase__			:							Union[str, Any]							=    [65, 18536, 2260, 101, 66]

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



  @slow
  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__			:							Union[str, Any]							=    (
            """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
        UpperCAmelCase__			:							Dict							=    [65, 871, 419, 358, 946, 991, 2521, 452, 358, 1357, 387, 7751, 3536, 112, 985, 456, 126, 865, 938, 5400, 5734, 458, 1368, 467, 786, 2462, 5246, 1159, 633, 865, 4519, 457, 582, 852, 2557, 427, 916, 508, 405, 34324, 497, 391, 408, 11342, 1244, 385, 100, 938, 985, 456, 574, 362, 12597, 3200, 3129, 1172, 66]  # noqa: E231
        # fmt: on
        self.assertListEqual(_lowerCamelCase							,       self.big_tokenizer.encode(_lowerCamelCase	)	)



  @require_torch
  @slow
  def  _a      (self	):


        """simple docstring"""

        import torch

        from transformers import BigBirdConfig, BigBirdModel

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

        UpperCAmelCase__			:							Optional[int]							=    BigBirdConfig(attention_type="""original_full"""	)
        UpperCAmelCase__			:							Optional[int]							=    BigBirdModel(_lowerCamelCase	)

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

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



  @slow
  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__			:							Union[str, Any]							=    BigBirdTokenizer.from_pretrained("""google/bigbird-roberta-base"""	)
        UpperCAmelCase__			:							int							=    tokenizer.decode(tokenizer("""Paris is the [MASK]."""	).input_ids	)

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




  @slow
  def  _a      (self	):


        """simple docstring"""

        UpperCAmelCase__			:							List[str]							=    {"""input_ids""": [[65, 39286, 458, 36335, 2001, 456, 13073, 13266, 455, 113, 7746, 1741, 11157, 391, 13073, 13266, 455, 113, 3967, 35412, 113, 4936, 109, 3870, 2377, 113, 30084, 45720, 458, 134, 17496, 112, 503, 11672, 113, 118, 112, 5665, 13347, 38687, 112, 1496, 31389, 112, 3268, 47264, 134, 962, 112, 16377, 8035, 23130, 430, 12169, 15518, 28592, 458, 146, 41697, 109, 391, 12169, 15518, 16689, 458, 146, 41358, 109, 452, 726, 4034, 111, 763, 35412, 5082, 388, 1903, 111, 9051, 391, 2870, 48918, 1900, 1123, 550, 998, 112, 9586, 15985, 455, 391, 410, 22955, 37636, 114, 66], [65, 448, 17496, 419, 3663, 385, 763, 113, 27533, 2870, 3283, 13043, 1639, 24713, 523, 656, 24013, 18550, 2521, 517, 27014, 21244, 420, 1212, 1465, 391, 927, 4833, 388, 578, 11786, 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, 2169, 7687, 21932, 18146, 726, 363, 17032, 3391, 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=_lowerCamelCase							,       model_name="""google/bigbird-roberta-base"""							,       revision="""215c99f1600e06f83acce68422f2035b2b5c3510"""							,       )

