






import collections
import inspect
import unittest

from transformers import FocalNetConfig
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_backbone_common import BackboneTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, _config_zero_init, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
       import torch
       from torch import nn

       from transformers import (
           FocalNetBackbone,
           FocalNetForImageClassification,
           FocalNetForMaskedImageModeling,
           FocalNetModel,
       )
       from transformers.models.focalnet.modeling_focalnet import FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST

if is_vision_available():
       from PIL import Image

       from transformers import AutoImageProcessor





class 					A__     :

     '''simple docstring'''






     def __init__( self      :    Dict   ,						_SCREAMING_SNAKE_CASE      :    Union[str, Any]   ,						_SCREAMING_SNAKE_CASE      :    str=13   ,						_SCREAMING_SNAKE_CASE      :    Any=32   ,						_SCREAMING_SNAKE_CASE      :    Any=2   ,						_SCREAMING_SNAKE_CASE      :    Union[str, Any]=3   ,						_SCREAMING_SNAKE_CASE      :    Dict=16   ,						_SCREAMING_SNAKE_CASE      :    List[Any]=[32, 64, 128]   ,						_SCREAMING_SNAKE_CASE      :    Union[str, Any]=[1, 2, 1]   ,						_SCREAMING_SNAKE_CASE      :    Optional[int]=[2, 2, 4]   ,						_SCREAMING_SNAKE_CASE      :    int=2   ,						_SCREAMING_SNAKE_CASE      :    Dict=2.0   ,						_SCREAMING_SNAKE_CASE      :    Optional[Any]=True   ,						_SCREAMING_SNAKE_CASE      :    Dict=0.0   ,						_SCREAMING_SNAKE_CASE      :    Optional[int]=0.0   ,						_SCREAMING_SNAKE_CASE      :    Any=0.1   ,						_SCREAMING_SNAKE_CASE      :    List[str]="gelu"   ,						_SCREAMING_SNAKE_CASE      :    Tuple=False   ,						_SCREAMING_SNAKE_CASE      :    Optional[Any]=True   ,						_SCREAMING_SNAKE_CASE      :    Union[str, Any]=0.0_2   ,						_SCREAMING_SNAKE_CASE      :    Optional[Any]=1E-5   ,						_SCREAMING_SNAKE_CASE      :    Optional[int]=True   ,						_SCREAMING_SNAKE_CASE      :    List[Any]=None   ,						_SCREAMING_SNAKE_CASE      :    int=True   ,						_SCREAMING_SNAKE_CASE      :    List[str]=10   ,						_SCREAMING_SNAKE_CASE      :    Optional[int]=8   ,						_SCREAMING_SNAKE_CASE      :    Optional[int]=["stage1", "stage2"]   ,						_SCREAMING_SNAKE_CASE      :    List[str]=[1, 2]   ,						):






           """simple docstring"""




           UpperCamelCase					       =  parent
           UpperCamelCase					       =  batch_size
           UpperCamelCase					       =  image_size
           UpperCamelCase					       =  patch_size
           UpperCamelCase					       =  num_channels
           UpperCamelCase					       =  embed_dim
           UpperCamelCase					       =  hidden_sizes
           UpperCamelCase					       =  depths
           UpperCamelCase					       =  num_heads
           UpperCamelCase					       =  window_size
           UpperCamelCase					       =  mlp_ratio
           UpperCamelCase					       =  qkv_bias
           UpperCamelCase					       =  hidden_dropout_prob
           UpperCamelCase					       =  attention_probs_dropout_prob
           UpperCamelCase					       =  drop_path_rate
           UpperCamelCase					       =  hidden_act
           UpperCamelCase					       =  use_absolute_embeddings
           UpperCamelCase					       =  patch_norm
           UpperCamelCase					       =  layer_norm_eps
           UpperCamelCase					       =  initializer_range
           UpperCamelCase					       =  is_training
           UpperCamelCase					       =  scope
           UpperCamelCase					       =  use_labels
           UpperCamelCase					       =  type_sequence_label_size
           UpperCamelCase					       =  encoder_stride
           UpperCamelCase					       =  out_features
           UpperCamelCase					       =  out_indices







     def   _SCREAMING_SNAKE_CASE     ( self      :    int ):






           """simple docstring"""




           UpperCamelCase					       =  floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size] )

           UpperCamelCase					       =  None
           if self.use_labels:
                 UpperCamelCase					       =  ids_tensor([self.batch_size]   ,						self.type_sequence_label_size )

           UpperCamelCase					       =  self.get_config()

           return config, pixel_values, labels







     def   _SCREAMING_SNAKE_CASE     ( self      :    List[Any] ):






           """simple docstring"""




           return FocalNetConfig(
               image_size=self.image_size   ,						patch_size=self.patch_size   ,						num_channels=self.num_channels   ,						embed_dim=self.embed_dim   ,						hidden_sizes=self.hidden_sizes   ,						depths=self.depths   ,						num_heads=self.num_heads   ,						window_size=self.window_size   ,						mlp_ratio=self.mlp_ratio   ,						qkv_bias=self.qkv_bias   ,						hidden_dropout_prob=self.hidden_dropout_prob   ,						attention_probs_dropout_prob=self.attention_probs_dropout_prob   ,						drop_path_rate=self.drop_path_rate   ,						hidden_act=self.hidden_act   ,						use_absolute_embeddings=self.use_absolute_embeddings   ,						path_norm=self.patch_norm   ,						layer_norm_eps=self.layer_norm_eps   ,						initializer_range=self.initializer_range   ,						encoder_stride=self.encoder_stride   ,						out_features=self.out_features   ,						out_indices=self.out_indices   ,						)







     def   _SCREAMING_SNAKE_CASE     ( self      :    List[str]   ,						_SCREAMING_SNAKE_CASE      :    int   ,						_SCREAMING_SNAKE_CASE      :    List[str]   ,						_SCREAMING_SNAKE_CASE      :    Any ):






           """simple docstring"""




           UpperCamelCase					       =  FocalNetModel(config=_SCREAMING_SNAKE_CASE )
           model.to(_SCREAMING_SNAKE_CASE )
           model.eval()
           UpperCamelCase					       =  model(_SCREAMING_SNAKE_CASE )

           UpperCamelCase					       =  ((config.image_size // config.patch_size) ** 2) // (4 ** (len(config.depths ) - 1))
           UpperCamelCase					       =  int(config.embed_dim * 2 ** (len(config.depths ) - 1) )

           self.parent.assertEqual(result.last_hidden_state.shape   ,						(self.batch_size, expected_seq_len, expected_dim) )







     def   _SCREAMING_SNAKE_CASE     ( self      :    Union[str, Any]   ,						_SCREAMING_SNAKE_CASE      :    Dict   ,						_SCREAMING_SNAKE_CASE      :    List[Any]   ,						_SCREAMING_SNAKE_CASE      :    Tuple ):






           """simple docstring"""




           UpperCamelCase					       =  FocalNetBackbone(config=_SCREAMING_SNAKE_CASE )
           model.to(_SCREAMING_SNAKE_CASE )
           model.eval()
           UpperCamelCase					       =  model(_SCREAMING_SNAKE_CASE )

           # verify feature maps
           self.parent.assertEqual(len(result.feature_maps )   ,						len(config.out_features ) )
           self.parent.assertListEqual(list(result.feature_maps[0].shape )   ,						[self.batch_size, self.image_size, 8, 8] )

           # verify channels
           self.parent.assertEqual(len(model.channels )   ,						len(config.out_features ) )
           self.parent.assertListEqual(model.channels   ,						config.hidden_sizes[:-1] )

           # verify backbone works with out_features=None
           UpperCamelCase					       =  None
           UpperCamelCase					       =  FocalNetBackbone(config=_SCREAMING_SNAKE_CASE )
           model.to(_SCREAMING_SNAKE_CASE )
           model.eval()
           UpperCamelCase					       =  model(_SCREAMING_SNAKE_CASE )

           # verify feature maps
           self.parent.assertEqual(len(result.feature_maps )   ,						1 )
           self.parent.assertListEqual(list(result.feature_maps[0].shape )   ,						[self.batch_size, self.image_size * 2, 4, 4] )

           # verify channels
           self.parent.assertEqual(len(model.channels )   ,						1 )
           self.parent.assertListEqual(model.channels   ,						[config.hidden_sizes[-1]] )







     def   _SCREAMING_SNAKE_CASE     ( self      :    Union[str, Any]   ,						_SCREAMING_SNAKE_CASE      :    Tuple   ,						_SCREAMING_SNAKE_CASE      :    Dict   ,						_SCREAMING_SNAKE_CASE      :    int ):






           """simple docstring"""




           UpperCamelCase					       =  FocalNetForMaskedImageModeling(config=_SCREAMING_SNAKE_CASE )
           model.to(_SCREAMING_SNAKE_CASE )
           model.eval()
           UpperCamelCase					       =  model(_SCREAMING_SNAKE_CASE )
           self.parent.assertEqual(
               result.reconstruction.shape   ,						(self.batch_size, self.num_channels, self.image_size, self.image_size) )

           # test greyscale images
           UpperCamelCase					       =  1
           UpperCamelCase					       =  FocalNetForMaskedImageModeling(_SCREAMING_SNAKE_CASE )
           model.to(_SCREAMING_SNAKE_CASE )
           model.eval()

           UpperCamelCase					       =  floats_tensor([self.batch_size, 1, self.image_size, self.image_size] )
           UpperCamelCase					       =  model(_SCREAMING_SNAKE_CASE )
           self.parent.assertEqual(result.reconstruction.shape   ,						(self.batch_size, 1, self.image_size, self.image_size) )







     def   _SCREAMING_SNAKE_CASE     ( self      :    str   ,						_SCREAMING_SNAKE_CASE      :    Tuple   ,						_SCREAMING_SNAKE_CASE      :    Tuple   ,						_SCREAMING_SNAKE_CASE      :    Tuple ):






           """simple docstring"""




           UpperCamelCase					       =  self.type_sequence_label_size
           UpperCamelCase					       =  FocalNetForImageClassification(_SCREAMING_SNAKE_CASE )
           model.to(_SCREAMING_SNAKE_CASE )
           model.eval()
           UpperCamelCase					       =  model(_SCREAMING_SNAKE_CASE   ,						labels=_SCREAMING_SNAKE_CASE )
           self.parent.assertEqual(result.logits.shape   ,						(self.batch_size, self.type_sequence_label_size) )

           # test greyscale images
           UpperCamelCase					       =  1
           UpperCamelCase					       =  FocalNetForImageClassification(_SCREAMING_SNAKE_CASE )
           model.to(_SCREAMING_SNAKE_CASE )
           model.eval()

           UpperCamelCase					       =  floats_tensor([self.batch_size, 1, self.image_size, self.image_size] )
           UpperCamelCase					       =  model(_SCREAMING_SNAKE_CASE )
           self.parent.assertEqual(result.logits.shape   ,						(self.batch_size, self.type_sequence_label_size) )







     def   _SCREAMING_SNAKE_CASE     ( self      :    Union[str, Any] ):






           """simple docstring"""




           UpperCamelCase					       =  self.prepare_config_and_inputs()

           UpperCamelCase       ,  UpperCamelCase       ,  UpperCamelCase					       =  config_and_inputs
           UpperCamelCase					       =  {'pixel_values': pixel_values}
           return config, inputs_dict





@require_torch
class 					A__     (     __snake_case   ,    __snake_case   ,    unittest.TestCase ):

     '''simple docstring'''






     snake_case__					=					(
         (
             FocalNetModel,
             FocalNetForImageClassification,
             FocalNetForMaskedImageModeling,
             FocalNetBackbone,
         )
         if is_torch_available()
         else ()
     )
     snake_case__					=					(
         {"""feature-extraction""": FocalNetModel, """image-classification""": FocalNetForImageClassification}
         if is_torch_available()
         else {}
     )
     snake_case__					=					False

     snake_case__					=					False
     snake_case__					=					False
     snake_case__					=					False
     snake_case__					=					False







     def   _SCREAMING_SNAKE_CASE     ( self      :    int ):






           """simple docstring"""




           UpperCamelCase					       =  FocalNetModelTester(self )
           UpperCamelCase					       =  ConfigTester(self   ,						config_class=_SCREAMING_SNAKE_CASE   ,						embed_dim=37   ,						has_text_modality=_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    Union[str, Any] ):






           """simple docstring"""




           self.create_and_test_config_common_properties()
           self.config_tester.create_and_test_config_to_json_string()
           self.config_tester.create_and_test_config_to_json_file()
           self.config_tester.create_and_test_config_from_and_save_pretrained()
           self.config_tester.create_and_test_config_with_num_labels()
           self.config_tester.check_config_can_be_init_without_params()
           self.config_tester.check_config_arguments_init()







     def   _SCREAMING_SNAKE_CASE     ( self      :    Optional[Any] ):






           """simple docstring"""




           return







     def   _SCREAMING_SNAKE_CASE     ( self      :    Any ):






           """simple docstring"""




           UpperCamelCase					       =  self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_model(*_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    List[Any] ):






           """simple docstring"""




           UpperCamelCase					       =  self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_backbone(*_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    int ):






           """simple docstring"""




           UpperCamelCase					       =  self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_for_masked_image_modeling(*_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    List[str] ):






           """simple docstring"""




           UpperCamelCase					       =  self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_for_image_classification(*_SCREAMING_SNAKE_CASE )







     @unittest.skip(reason='FocalNet does not use inputs_embeds' )
     def   _SCREAMING_SNAKE_CASE     ( self      :    List[Any] ):






           """simple docstring"""




           pass







     @unittest.skip(reason='FocalNet does not use feedforward chunking' )
     def   _SCREAMING_SNAKE_CASE     ( self      :    Any ):






           """simple docstring"""




           pass







     def   _SCREAMING_SNAKE_CASE     ( self      :    Optional[int] ):






           """simple docstring"""




           UpperCamelCase       ,  UpperCamelCase					       =  self.model_tester.prepare_config_and_inputs_for_common()

           for model_class in self.all_model_classes[:-1]:
                 UpperCamelCase					       =  model_class(_SCREAMING_SNAKE_CASE )
                 self.assertIsInstance(model.get_input_embeddings()   ,						(nn.Module) )
                 UpperCamelCase					       =  model.get_output_embeddings()
                 self.assertTrue(x is None or isinstance(_SCREAMING_SNAKE_CASE   ,						nn.Linear ) )







     def   _SCREAMING_SNAKE_CASE     ( self      :    List[Any] ):






           """simple docstring"""




           UpperCamelCase       ,  UpperCamelCase					       =  self.model_tester.prepare_config_and_inputs_for_common()

           for model_class in self.all_model_classes[:-1]:
                 UpperCamelCase					       =  model_class(_SCREAMING_SNAKE_CASE )
                 UpperCamelCase					       =  inspect.signature(model.forward )
                 # signature.parameters is an OrderedDict => so arg_names order is deterministic
                 UpperCamelCase					       =  [*signature.parameters.keys()]

                 UpperCamelCase					       =  ['pixel_values']
                 self.assertListEqual(arg_names[:1]   ,						_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    Optional[Any]   ,						_SCREAMING_SNAKE_CASE      :    Any   ,						_SCREAMING_SNAKE_CASE      :    List[Any]   ,						_SCREAMING_SNAKE_CASE      :    Dict   ,						_SCREAMING_SNAKE_CASE      :    Dict ):






           """simple docstring"""




           UpperCamelCase					       =  model_class(_SCREAMING_SNAKE_CASE )
           model.to(_SCREAMING_SNAKE_CASE )
           model.eval()

           with torch.no_grad():
                 UpperCamelCase					       =  model(**self._prepare_for_class(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE ) )

           UpperCamelCase					       =  outputs.hidden_states

           UpperCamelCase					       =  getattr(
               self.model_tester   ,						'expected_num_hidden_layers'   ,						len(self.model_tester.depths ) + 1 )
           self.assertEqual(len(_SCREAMING_SNAKE_CASE )   ,						_SCREAMING_SNAKE_CASE )

           # FocalNet has a different seq_length
           UpperCamelCase					       =  (
               config.patch_size
               if isinstance(config.patch_size   ,						collections.abc.Iterable )
               else (config.patch_size, config.patch_size)
           )

           UpperCamelCase					       =  (image_size[1] // patch_size[1]) * (image_size[0] // patch_size[0])

           self.assertListEqual(
               list(hidden_states[0].shape[-2:] )   ,						[num_patches, self.model_tester.embed_dim]   ,						)

           UpperCamelCase					       =  outputs.reshaped_hidden_states
           self.assertEqual(len(_SCREAMING_SNAKE_CASE )   ,						_SCREAMING_SNAKE_CASE )

           UpperCamelCase       ,  UpperCamelCase       ,  UpperCamelCase       ,  UpperCamelCase					       =  reshaped_hidden_states[0].shape
           UpperCamelCase					       =  (
               reshaped_hidden_states[0].view(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						height * width ).permute(0   ,						2   ,						1 )
           )
           self.assertListEqual(
               list(reshaped_hidden_states.shape[-2:] )   ,						[num_patches, self.model_tester.embed_dim]   ,						)







     def   _SCREAMING_SNAKE_CASE     ( self      :    Optional[int] ):






           """simple docstring"""




           UpperCamelCase       ,  UpperCamelCase					       =  self.model_tester.prepare_config_and_inputs_for_common()

           UpperCamelCase					       =  (
               self.model_tester.image_size
               if isinstance(self.model_tester.image_size   ,						collections.abc.Iterable )
               else (self.model_tester.image_size, self.model_tester.image_size)
           )

           for model_class in self.all_model_classes[:-1]:
                 UpperCamelCase					       =  True
                 self.check_hidden_states_output(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )

                 # check that output_hidden_states also work using config
                 del inputs_dict["output_hidden_states"]
                 UpperCamelCase					       =  True

                 self.check_hidden_states_output(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    int ):






           """simple docstring"""




           UpperCamelCase       ,  UpperCamelCase					       =  self.model_tester.prepare_config_and_inputs_for_common()
           UpperCamelCase					       =  3

           UpperCamelCase					       =  (
               self.model_tester.image_size
               if isinstance(self.model_tester.image_size   ,						collections.abc.Iterable )
               else (self.model_tester.image_size, self.model_tester.image_size)
           )
           UpperCamelCase					       =  (
               config.patch_size
               if isinstance(config.patch_size   ,						collections.abc.Iterable )
               else (config.patch_size, config.patch_size)
           )

           UpperCamelCase					       =  image_size[0] + patch_size[0] - (image_size[0] % patch_size[0])
           UpperCamelCase					       =  image_size[1] + patch_size[1] - (image_size[1] % patch_size[1])

           for model_class in self.all_model_classes[:-1]:
                 UpperCamelCase					       =  True
                 self.check_hidden_states_output(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						(padded_height, padded_width) )

                 # check that output_hidden_states also work using config
                 del inputs_dict["output_hidden_states"]
                 UpperCamelCase					       =  True
                 self.check_hidden_states_output(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE   ,						(padded_height, padded_width) )







     @slow
     def   _SCREAMING_SNAKE_CASE     ( self      :    Tuple ):






           """simple docstring"""




           for model_name in FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
                 UpperCamelCase					       =  FocalNetModel.from_pretrained(_SCREAMING_SNAKE_CASE )
                 self.assertIsNotNone(_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    Tuple ):






           """simple docstring"""




           UpperCamelCase       ,  UpperCamelCase					       =  self.model_tester.prepare_config_and_inputs_for_common()

           UpperCamelCase					       =  _config_zero_init(_SCREAMING_SNAKE_CASE )
           for model_class in self.all_model_classes:
                 UpperCamelCase					       =  model_class(config=_SCREAMING_SNAKE_CASE )
                 for name, param in model.named_parameters():
                       if "embeddings" not in name and param.requires_grad:
                             self.assertIn(
                                 ((param.data.mean() * 1E9).round() / 1E9).item()   ,						[0.0, 1.0]   ,						msg=f'Parameter {name} of model {model_class} seems not properly initialized'   ,						)





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

     '''simple docstring'''






     @cached_property
     def   _SCREAMING_SNAKE_CASE     ( self      :    str ):






           """simple docstring"""




           return AutoImageProcessor.from_pretrained('microsoft/focalnet-tiny' ) if is_vision_available() else None







     @slow
     def   _SCREAMING_SNAKE_CASE     ( self      :    int ):






           """simple docstring"""




           UpperCamelCase					       =  FocalNetForImageClassification.from_pretrained('microsoft/focalnet-tiny' ).to(_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  self.default_image_processor

           UpperCamelCase					       =  Image.open('./tests/fixtures/tests_samples/COCO/000000039769.png' )
           UpperCamelCase					       =  image_processor(images=_SCREAMING_SNAKE_CASE   ,						return_tensors='pt' ).to(_SCREAMING_SNAKE_CASE )

           # forward pass
           with torch.no_grad():
                 UpperCamelCase					       =  model(**_SCREAMING_SNAKE_CASE )

           # verify the logits
           UpperCamelCase					       =  torch.Size((1, 1000) )
           self.assertEqual(outputs.logits.shape   ,						_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  torch.tensor([0.2_1_6_6, -0.4_3_6_8, 0.2_1_9_1] ).to(_SCREAMING_SNAKE_CASE )
           self.assertTrue(torch.allclose(outputs.logits[0, :3]   ,						_SCREAMING_SNAKE_CASE   ,						atol=1E-4 ) )
           self.assertTrue(outputs.logits.argmax(dim=-1 ).item()   ,						281 )





@require_torch
class 					A__     (     __snake_case   ,    unittest.TestCase ):

     '''simple docstring'''






     snake_case__					=					(FocalNetBackbone,) if is_torch_available() else ()
     snake_case__					=					FocalNetConfig

     snake_case__					=					False







     def   _SCREAMING_SNAKE_CASE     ( self      :    Union[str, Any] ):






           """simple docstring"""




           UpperCamelCase					       =  FocalNetModelTester(self )











import unittest

from transformers import DebertaVaTokenizer, DebertaVaTokenizerFast
from transformers.testing_utils import get_tests_dir, require_sentencepiece, require_tokenizers, slow

from ...test_tokenization_common import TokenizerTesterMixin


__magic_name__   :  Optional[int]        =							get_tests_dir('''fixtures/spiece.model''')





@require_sentencepiece
@require_tokenizers
class 					A__     (     __snake_case   ,    unittest.TestCase ):

     '''simple docstring'''






     snake_case__					=					DebertaVaTokenizer
     snake_case__					=					DebertaVaTokenizerFast
     snake_case__					=					True
     snake_case__					=					True







     def   _SCREAMING_SNAKE_CASE     ( self      :    Tuple ):






           """simple docstring"""




           super().setUp()

           # We have a SentencePiece fixture for testing
           UpperCamelCase					       =  DebertaVaTokenizer(_SCREAMING_SNAKE_CASE   ,						unk_token='<unk>' )
           tokenizer.save_pretrained(self.tmpdirname )







     def   _SCREAMING_SNAKE_CASE     ( self      :    List[Any]   ,						_SCREAMING_SNAKE_CASE      :    Optional[Any] ):






           """simple docstring"""




           UpperCamelCase					       =  'this is a test'
           UpperCamelCase					       =  'this is a test'
           return input_text, output_text







     def   _SCREAMING_SNAKE_CASE     ( self      :    Optional[Any] ):






           """simple docstring"""




           UpperCamelCase					       =  '<pad>'
           UpperCamelCase					       =  0

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







     def   _SCREAMING_SNAKE_CASE     ( self      :    Dict ):






           """simple docstring"""




           UpperCamelCase					       =  list(self.get_tokenizer().get_vocab().keys() )
           self.assertEqual(vocab_keys[0]   ,						'<pad>' )
           self.assertEqual(vocab_keys[1]   ,						'<unk>' )
           self.assertEqual(vocab_keys[-1]   ,						'[PAD]' )
           self.assertEqual(len(_SCREAMING_SNAKE_CASE )   ,						3_0001 )







     def   _SCREAMING_SNAKE_CASE     ( self      :    str ):






           """simple docstring"""




           self.assertEqual(self.get_tokenizer().vocab_size   ,						3_0000 )







     def   _SCREAMING_SNAKE_CASE     ( self      :    int ):






           """simple docstring"""




           UpperCamelCase					       =  ' \tHeLLo!how  \n Are yoU?  '
           UpperCamelCase					       =  ['▁hello', '!', 'how', '▁are', '▁you', '?']
           # fmt: on

           UpperCamelCase					       =  DebertaVaTokenizer(_SCREAMING_SNAKE_CASE   ,						do_lower_case=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  tokenizer.convert_ids_to_tokens(tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )

           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )

           UpperCamelCase					       =  DebertaVaTokenizerFast(_SCREAMING_SNAKE_CASE   ,						do_lower_case=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )

           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )







     @unittest.skip('There is an inconsistency between slow and fast tokenizer due to a bug in the fast one.' )
     def   _SCREAMING_SNAKE_CASE     ( self      :    int ):






           """simple docstring"""




           pass







     @unittest.skip('There is an inconsistency between slow and fast tokenizer due to a bug in the fast one.' )
     def   _SCREAMING_SNAKE_CASE     ( self      :    Any ):






           """simple docstring"""




           pass







     def   _SCREAMING_SNAKE_CASE     ( self      :    int ):






           """simple docstring"""




           UpperCamelCase					       =  'I was born in 92000, and this is falsé.'
           UpperCamelCase					       =  ['▁', '<unk>', '▁was', '▁born', '▁in', '▁9', '2000', '▁', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '▁', '.', ]
           # fmt: on

           UpperCamelCase					       =  DebertaVaTokenizer(_SCREAMING_SNAKE_CASE   ,						split_by_punct=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  tokenizer.convert_ids_to_tokens(tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )

           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )

           UpperCamelCase					       =  DebertaVaTokenizerFast(_SCREAMING_SNAKE_CASE   ,						split_by_punct=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )

           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    str ):






           """simple docstring"""




           UpperCamelCase					       =  'I was born in 92000, and this is falsé.'
           UpperCamelCase					       =  ['▁i', '▁was', '▁born', '▁in', '▁9', '2000', '▁', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '▁', '.', ]
           # fmt: on

           UpperCamelCase					       =  DebertaVaTokenizer(_SCREAMING_SNAKE_CASE   ,						do_lower_case=_SCREAMING_SNAKE_CASE   ,						split_by_punct=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  tokenizer.convert_ids_to_tokens(tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )

           UpperCamelCase					       =  DebertaVaTokenizerFast(_SCREAMING_SNAKE_CASE   ,						do_lower_case=_SCREAMING_SNAKE_CASE   ,						split_by_punct=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    Tuple ):






           """simple docstring"""




           UpperCamelCase					       =  'I was born in 92000, and this is falsé.'
           UpperCamelCase					       =  ['▁i', '▁was', '▁born', '▁in', '▁9', '2000', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '.', ]
           # fmt: on

           UpperCamelCase					       =  DebertaVaTokenizer(_SCREAMING_SNAKE_CASE   ,						do_lower_case=_SCREAMING_SNAKE_CASE   ,						split_by_punct=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  tokenizer.convert_ids_to_tokens(tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )

           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )

           UpperCamelCase					       =  DebertaVaTokenizerFast(_SCREAMING_SNAKE_CASE   ,						do_lower_case=_SCREAMING_SNAKE_CASE   ,						split_by_punct=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )

           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    List[Any] ):






           """simple docstring"""




           UpperCamelCase					       =  'I was born in 92000, and this is falsé.'
           UpperCamelCase					       =  ['▁', '<unk>', '▁was', '▁born', '▁in', '▁9', '2000', '▁', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '▁', '.', ]
           # fmt: on

           UpperCamelCase					       =  DebertaVaTokenizer(_SCREAMING_SNAKE_CASE   ,						do_lower_case=_SCREAMING_SNAKE_CASE   ,						split_by_punct=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  tokenizer.convert_ids_to_tokens(tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )

           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )

           UpperCamelCase					       =  DebertaVaTokenizerFast(_SCREAMING_SNAKE_CASE   ,						do_lower_case=_SCREAMING_SNAKE_CASE   ,						split_by_punct=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )

           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    Tuple ):






           """simple docstring"""




           UpperCamelCase					       =  ' \tHeLLo!how  \n Are yoU?  '
           UpperCamelCase					       =  ['▁', '<unk>', 'e', '<unk>', 'o', '!', 'how', '▁', '<unk>', 're', '▁yo', '<unk>', '?']
           # fmt: on

           UpperCamelCase					       =  DebertaVaTokenizer(_SCREAMING_SNAKE_CASE   ,						do_lower_case=_SCREAMING_SNAKE_CASE   ,						split_by_punct=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  tokenizer.convert_ids_to_tokens(tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )

           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )

           UpperCamelCase					       =  DebertaVaTokenizerFast(_SCREAMING_SNAKE_CASE   ,						do_lower_case=_SCREAMING_SNAKE_CASE   ,						split_by_punct=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )

           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    Optional[int] ):






           """simple docstring"""




           UpperCamelCase					       =  self.get_tokenizer()
           UpperCamelCase					       =  self.get_rust_tokenizer()

           UpperCamelCase					       =  'I was born in 92000, and this is falsé.'

           UpperCamelCase					       =  tokenizer.convert_ids_to_tokens(tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )
           UpperCamelCase					       =  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE ) )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )

           UpperCamelCase					       =  tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  rust_tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )

           UpperCamelCase					       =  self.get_rust_tokenizer()
           UpperCamelCase					       =  tokenizer.encode(_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  rust_tokenizer.encode(_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    Optional[int] ):






           """simple docstring"""




           UpperCamelCase					       =  'This is a test'
           UpperCamelCase					       =  [13, 1, 4398, 25, 21, 1289]
           UpperCamelCase					       =  ['▁', 'T', 'his', '▁is', '▁a', '▁test']
           UpperCamelCase					       =  ['▁', '<unk>', 'his', '▁is', '▁a', '▁test']

           UpperCamelCase					       =  DebertaVaTokenizer(_SCREAMING_SNAKE_CASE   ,						keep_accents=_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  DebertaVaTokenizerFast(_SCREAMING_SNAKE_CASE   ,						keep_accents=_SCREAMING_SNAKE_CASE )

           UpperCamelCase					       =  tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  tokenizer.tokenize(_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  tokenizer.convert_ids_to_tokens(_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )

           UpperCamelCase					       =  rust_tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  rust_tokenizer.tokenize(_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  rust_tokenizer.convert_ids_to_tokens(_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )

           # fmt: off
           UpperCamelCase					       =  'I was born in 92000, and this is falsé.'
           UpperCamelCase					       =  [13, 1, 23, 386, 19, 561, 3050, 15, 17, 48, 25, 8256, 18, 1, 9]
           UpperCamelCase					       =  ['▁', 'I', '▁was', '▁born', '▁in', '▁9', '2000', ',', '▁and', '▁this', '▁is', '▁fal', 's', 'é', '.', ]
           UpperCamelCase					       =  ['▁', '<unk>', '▁was', '▁born', '▁in', '▁9', '2000', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '.', ]
           # fmt: on

           UpperCamelCase					       =  tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  tokenizer.tokenize(_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  tokenizer.convert_ids_to_tokens(_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )

           UpperCamelCase					       =  rust_tokenizer.encode(_SCREAMING_SNAKE_CASE   ,						add_special_tokens=_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  rust_tokenizer.tokenize(_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  rust_tokenizer.convert_ids_to_tokens(_SCREAMING_SNAKE_CASE )
           self.assertListEqual(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )







     def   _SCREAMING_SNAKE_CASE     ( self      :    Any ):






           """simple docstring"""




           UpperCamelCase					       =  DebertaVaTokenizer(_SCREAMING_SNAKE_CASE )

           UpperCamelCase					       =  tokenizer.encode('sequence builders' )
           UpperCamelCase					       =  tokenizer.encode('multi-sequence build' )

           UpperCamelCase					       =  tokenizer.build_inputs_with_special_tokens(_SCREAMING_SNAKE_CASE )
           UpperCamelCase					       =  tokenizer.build_inputs_with_special_tokens(_SCREAMING_SNAKE_CASE   ,						_SCREAMING_SNAKE_CASE )

           self.assertEqual([tokenizer.cls_token_id] + text + [tokenizer.sep_token_id]   ,						_SCREAMING_SNAKE_CASE )
           self.assertEqual(
               [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_a + [tokenizer.sep_token_id]   ,						_SCREAMING_SNAKE_CASE   ,						)







     @slow
     def   _SCREAMING_SNAKE_CASE     ( self      :    List[Any] ):






           """simple docstring"""




           UpperCamelCase					       =  {'input_ids': [[1, 3_9867, 36, 1_9390, 486, 27, 3_5052, 8_1436, 18, 6_0685, 1225, 7, 3_5052, 8_1436, 18, 9367, 1_6899, 18, 1_5937, 53, 594, 773, 18, 1_6287, 3_0465, 36, 1_5937, 6, 4_1139, 38, 3_6979, 6_0763, 191, 6, 3_4132, 99, 6, 5_0538, 390, 4_3230, 6, 3_4132, 2779, 2_0850, 14, 699, 1072, 1194, 36, 382, 1_0901, 53, 7, 699, 1072, 2084, 36, 2_0422, 630, 53, 19, 105, 3049, 1896, 1053, 1_6899, 1506, 11, 3_7978, 4243, 7, 1237, 3_1869, 200, 1_6566, 654, 6, 3_5052, 8_1436, 7, 5_5630, 1_3593, 4, 2], [1, 26, 1_5011, 13, 667, 8, 1053, 18, 2_3611, 1237, 7_2356, 1_2820, 34, 10_4134, 1209, 35, 1_3313, 6627, 21, 202, 347, 7, 164, 2399, 11, 46, 4485, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5, 1232, 2864, 1_5785, 1_4951, 105, 5, 8581, 1250, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], 'token_type_ids': [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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]]}  # noqa: E501
           # fmt: on

           self.tokenizer_integration_test_util(
               expected_encoding=_SCREAMING_SNAKE_CASE   ,						model_name='microsoft/deberta-v2-xlarge'   ,						revision='ad6e42c1532ddf3a15c39246b63f5559d558b670'   ,						)



