



import inspect
import unittest

from transformers import MobileViTConfig
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 transformers import MobileViTForImageClassification, MobileViTForSemanticSegmentation, MobileViTModel
       from transformers.models.mobilevit.modeling_mobilevit import MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
       from PIL import Image

       from transformers import MobileViTImageProcessor



class    UpperCAmelCase__(				lowerCamelCase						):

   '''simple docstring'''




   def       UpperCAmelCase		(    self	:      Dict)						->					Tuple:




         """simple docstring"""

         lowercase__  =	self.config_class(**self.inputs_dict)
         self.parent.assertTrue(hasattr(lowerCAmelCase      ,					'hidden_sizes'))
         self.parent.assertTrue(hasattr(lowerCAmelCase      ,					'neck_hidden_sizes'))
         self.parent.assertTrue(hasattr(lowerCAmelCase      ,					'num_attention_heads'))



class    UpperCAmelCase__:

   '''simple docstring'''




   def __init__(    self	:      Dict      ,					lowerCAmelCase	:      Dict      ,					lowerCAmelCase	:      Tuple=13      ,					lowerCAmelCase	:      Tuple=32      ,					lowerCAmelCase	:      Dict=2      ,					lowerCAmelCase	:      Dict=3      ,					lowerCAmelCase	:      List[Any]=6_40      ,					lowerCAmelCase	:      List[str]=4      ,					lowerCAmelCase	:      Optional[Any]="silu"      ,					lowerCAmelCase	:      str=3      ,					lowerCAmelCase	:      int=32      ,					lowerCAmelCase	:      Tuple=0.1      ,					lowerCAmelCase	:      List[str]=0.1      ,					lowerCAmelCase	:      Union[str, Any]=0.1      ,					lowerCAmelCase	:      List[str]=0.02      ,					lowerCAmelCase	:      Any=True      ,					lowerCAmelCase	:      str=True      ,					lowerCAmelCase	:      Dict=10      ,					lowerCAmelCase	:      Tuple=None      ,					)						->					Any:




         """simple docstring"""

         lowercase__  =	parent
         lowercase__  =	batch_size
         lowercase__  =	image_size
         lowercase__  =	patch_size
         lowercase__  =	num_channels
         lowercase__  =	last_hidden_size
         lowercase__  =	num_attention_heads
         lowercase__  =	hidden_act
         lowercase__  =	conv_kernel_size
         lowercase__  =	output_stride
         lowercase__  =	hidden_dropout_prob
         lowercase__  =	attention_probs_dropout_prob
         lowercase__  =	classifier_dropout_prob
         lowercase__  =	use_labels
         lowercase__  =	is_training
         lowercase__  =	num_labels
         lowercase__  =	initializer_range
         lowercase__  =	scope


   def       UpperCAmelCase		(    self	:      Optional[Any])						->					Any:




         """simple docstring"""

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

         lowercase__  =	None
         lowercase__  =	None
         if self.use_labels:
               lowercase__  =	ids_tensor([self.batch_size]      ,					self.num_labels)
               lowercase__  =	ids_tensor([self.batch_size, self.image_size, self.image_size]      ,					self.num_labels)

         lowercase__  =	self.get_config()

         return config, pixel_values, labels, pixel_labels


   def       UpperCAmelCase		(    self	:      Union[str, Any])						->					Optional[Any]:




         """simple docstring"""

         return MobileViTConfig(
             image_size=self.image_size      ,					patch_size=self.patch_size      ,					num_channels=self.num_channels      ,					num_attention_heads=self.num_attention_heads      ,					hidden_act=self.hidden_act      ,					conv_kernel_size=self.conv_kernel_size      ,					output_stride=self.output_stride      ,					hidden_dropout_prob=self.hidden_dropout_prob      ,					attention_probs_dropout_prob=self.attention_probs_dropout_prob      ,					classifier_dropout_prob=self.classifier_dropout_prob      ,					initializer_range=self.initializer_range      ,					)


   def       UpperCAmelCase		(    self	:      Optional[Any]      ,					lowerCAmelCase	:      Any      ,					lowerCAmelCase	:      Optional[Any]      ,					lowerCAmelCase	:      Any      ,					lowerCAmelCase	:      Optional[Any])						->					Dict:




         """simple docstring"""

         lowercase__  =	MobileViTModel(config=lowerCAmelCase)
         model.to(lowerCAmelCase)
         model.eval()
         lowercase__  =	model(lowerCAmelCase)
         self.parent.assertEqual(
             result.last_hidden_state.shape      ,					(
                 self.batch_size,
                 self.last_hidden_size,
                 self.image_size // self.output_stride,
                 self.image_size // self.output_stride,
             )      ,					)


   def       UpperCAmelCase		(    self	:      Optional[int]      ,					lowerCAmelCase	:      Any      ,					lowerCAmelCase	:      Tuple      ,					lowerCAmelCase	:      List[str]      ,					lowerCAmelCase	:      List[Any])						->					Tuple:




         """simple docstring"""

         lowercase__  =	self.num_labels
         lowercase__  =	MobileViTForImageClassification(lowerCAmelCase)
         model.to(lowerCAmelCase)
         model.eval()
         lowercase__  =	model(lowerCAmelCase      ,					labels=lowerCAmelCase)
         self.parent.assertEqual(result.logits.shape      ,					(self.batch_size, self.num_labels))


   def       UpperCAmelCase		(    self	:      Optional[int]      ,					lowerCAmelCase	:      List[Any]      ,					lowerCAmelCase	:      Optional[Any]      ,					lowerCAmelCase	:      Optional[Any]      ,					lowerCAmelCase	:      Dict)						->					Optional[Any]:




         """simple docstring"""

         lowercase__  =	self.num_labels
         lowercase__  =	MobileViTForSemanticSegmentation(lowerCAmelCase)
         model.to(lowerCAmelCase)
         model.eval()
         lowercase__  =	model(lowerCAmelCase)
         self.parent.assertEqual(
             result.logits.shape      ,					(
                 self.batch_size,
                 self.num_labels,
                 self.image_size // self.output_stride,
                 self.image_size // self.output_stride,
             )      ,					)
         lowercase__  =	model(lowerCAmelCase      ,					labels=lowerCAmelCase)
         self.parent.assertEqual(
             result.logits.shape      ,					(
                 self.batch_size,
                 self.num_labels,
                 self.image_size // self.output_stride,
                 self.image_size // self.output_stride,
             )      ,					)



   def       UpperCAmelCase		(    self	:      List[str])						->					Union[str, Any]:




         """simple docstring"""

         lowercase__  =	self.prepare_config_and_inputs()
         lowercase__,						lowercase__,						lowercase__,						lowercase__  =	config_and_inputs
         lowercase__  =	{'pixel_values': pixel_values}
         return config, inputs_dict



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

   '''simple docstring'''




   A     :	Tuple												=     (
       (MobileViTModel, MobileViTForImageClassification, MobileViTForSemanticSegmentation)
       if is_torch_available()
       else ()
   )
   A     :	Dict												=     (
       {
           "feature-extraction": MobileViTModel,
           "image-classification": MobileViTForImageClassification,
           "image-segmentation": MobileViTForSemanticSegmentation,
       }
       if is_torch_available()
       else {}
   )

   A     :	List[str]												=     False
   A     :	str												=     False
   A     :	Dict												=     False
   A     :	List[str]												=     False


   def       UpperCAmelCase		(    self	:      Optional[Any])						->					Optional[int]:




         """simple docstring"""

         lowercase__  =	MobileViTModelTester(self)
         lowercase__  =	MobileViTConfigTester(self      ,					config_class=lowerCAmelCase      ,					has_text_modality=lowerCAmelCase)


   def       UpperCAmelCase		(    self	:      Optional[int])						->					Any:




         """simple docstring"""

         self.config_tester.run_common_tests()


   @unittest.skip(reason='MobileViT does not use inputs_embeds')
   def       UpperCAmelCase		(    self	:      Optional[int])						->					Any:




         """simple docstring"""

         pass


   @unittest.skip(reason='MobileViT does not support input and output embeddings')
   def       UpperCAmelCase		(    self	:      List[Any])						->					Any:




         """simple docstring"""

         pass


   @unittest.skip(reason='MobileViT does not output attentions')
   def       UpperCAmelCase		(    self	:      Any)						->					str:




         """simple docstring"""

         pass


   def       UpperCAmelCase		(    self	:      Dict)						->					List[Any]:




         """simple docstring"""

         lowercase__,						lowercase__  =	self.model_tester.prepare_config_and_inputs_for_common()

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

               lowercase__  =	['pixel_values']
               self.assertListEqual(arg_names[:1]      ,					lowerCAmelCase)


   @unittest.skip('Will be fixed soon by reducing the size of the model used for common tests.')
   def       UpperCAmelCase		(    self	:      Tuple)						->					Optional[Any]:




         """simple docstring"""

         pass


   def       UpperCAmelCase		(    self	:      List[str])						->					List[Any]:




         """simple docstring"""

         lowercase__  =	self.model_tester.prepare_config_and_inputs()
         self.model_tester.create_and_check_model(*lowerCAmelCase)


   def       UpperCAmelCase		(    self	:      str)						->					Dict:




         """simple docstring"""

         def check_hidden_states_output(lowerCAmelCase	:      str      ,					lowerCAmelCase	:      Any      ,					lowerCAmelCase	:      Optional[Any]):
               lowercase__  =	model_class(lowerCAmelCase)
               model.to(lowerCAmelCase)
               model.eval()

               with torch.no_grad():
                     lowercase__  =	model(**self._prepare_for_class(lowerCAmelCase      ,					lowerCAmelCase))

               lowercase__  =	outputs.hidden_states

               lowercase__  =	5
               self.assertEqual(len(lowerCAmelCase)      ,					lowerCAmelCase)

               # MobileViT's feature maps are of shape (batch_size, num_channels, height, width)
               # with the width and height being successively divided by 2.
               lowercase__  =	2
               for i in range(len(lowerCAmelCase)):
                     self.assertListEqual(
                         list(hidden_states[i].shape[-2:])      ,					[self.model_tester.image_size // divisor, self.model_tester.image_size // divisor]      ,					)
                     divisor *= 2

               self.assertEqual(self.model_tester.output_stride      ,					divisor // 2)

         lowercase__,						lowercase__  =	self.model_tester.prepare_config_and_inputs_for_common()

         for model_class in self.all_model_classes:
               lowercase__  =	True
               check_hidden_states_output(lowerCAmelCase      ,					lowerCAmelCase      ,					lowerCAmelCase)

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

               check_hidden_states_output(lowerCAmelCase      ,					lowerCAmelCase      ,					lowerCAmelCase)


   def       UpperCAmelCase		(    self	:      List[str])						->					int:




         """simple docstring"""

         lowercase__  =	self.model_tester.prepare_config_and_inputs()
         self.model_tester.create_and_check_for_image_classification(*lowerCAmelCase)


   def       UpperCAmelCase		(    self	:      Tuple)						->					Tuple:




         """simple docstring"""

         lowercase__  =	self.model_tester.prepare_config_and_inputs()
         self.model_tester.create_and_check_for_semantic_segmentation(*lowerCAmelCase)



   @slow
   def       UpperCAmelCase		(    self	:      Optional[Any])						->					List[str]:




         """simple docstring"""

         for model_name in MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
               lowercase__  =	MobileViTModel.from_pretrained(lowerCAmelCase)
               self.assertIsNotNone(lowerCAmelCase)

def 	_lowerCAmelCase (    ):
      lowercase__  =	Image.open('./tests/fixtures/tests_samples/COCO/000000039769.png'						)
      return image



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

   '''simple docstring'''




   @cached_property
   def       UpperCAmelCase		(    self	:      Tuple)						->					str:




         """simple docstring"""

         return MobileViTImageProcessor.from_pretrained('apple/mobilevit-xx-small') if is_vision_available() else None


   @slow
   def       UpperCAmelCase		(    self	:      List[str])						->					Union[str, Any]:




         """simple docstring"""

         lowercase__  =	MobileViTForImageClassification.from_pretrained('apple/mobilevit-xx-small').to(lowerCAmelCase)

         lowercase__  =	self.default_image_processor
         lowercase__  =	prepare_img()
         lowercase__  =	image_processor(images=lowerCAmelCase      ,					return_tensors='pt').to(lowerCAmelCase)

         # forward pass
         with torch.no_grad():
               lowercase__  =	model(**lowerCAmelCase)

         # verify the logits
         lowercase__  =	torch.Size((1, 10_00))
         self.assertEqual(outputs.logits.shape      ,					lowerCAmelCase)

         lowercase__  =	torch.tensor([-1.93_64, -1.23_27, -0.46_53]).to(lowerCAmelCase)

         self.assertTrue(torch.allclose(outputs.logits[0, :3]      ,					lowerCAmelCase      ,					atol=1E-4))


   @slow
   def       UpperCAmelCase		(    self	:      Tuple)						->					str:




         """simple docstring"""

         lowercase__  =	MobileViTForSemanticSegmentation.from_pretrained('apple/deeplabv3-mobilevit-xx-small')
         lowercase__  =	model.to(lowerCAmelCase)

         lowercase__  =	MobileViTImageProcessor.from_pretrained('apple/deeplabv3-mobilevit-xx-small')

         lowercase__  =	prepare_img()
         lowercase__  =	image_processor(images=lowerCAmelCase      ,					return_tensors='pt').to(lowerCAmelCase)

         # forward pass
         with torch.no_grad():
               lowercase__  =	model(**lowerCAmelCase)
         lowercase__  =	outputs.logits

         # verify the logits
         lowercase__  =	torch.Size((1, 21, 32, 32))
         self.assertEqual(logits.shape      ,					lowerCAmelCase)

         lowercase__  =	torch.tensor(
             [
                 [[6.97_13, 6.97_86, 7.24_22], [7.28_93, 7.28_25, 7.44_46], [7.65_80, 7.87_97, 7.94_20]],
                 [[-10.68_69, -10.32_50, -10.34_71], [-10.42_28, -9.98_68, -9.71_32], [-11.04_05, -11.02_21, -10.73_18]],
                 [[-3.30_89, -2.85_39, -2.67_40], [-3.27_06, -2.56_21, -2.51_08], [-3.25_34, -2.66_15, -2.66_51]],
             ]      ,					device=lowerCAmelCase      ,					)

         self.assertTrue(torch.allclose(logits[0, :3, :3, :3]      ,					lowerCAmelCase      ,					atol=1E-4))



   @slow
   def       UpperCAmelCase		(    self	:      int)						->					Union[str, Any]:




         """simple docstring"""

         lowercase__  =	MobileViTForSemanticSegmentation.from_pretrained('apple/deeplabv3-mobilevit-xx-small')
         lowercase__  =	model.to(lowerCAmelCase)

         lowercase__  =	MobileViTImageProcessor.from_pretrained('apple/deeplabv3-mobilevit-xx-small')

         lowercase__  =	prepare_img()
         lowercase__  =	image_processor(images=lowerCAmelCase      ,					return_tensors='pt').to(lowerCAmelCase)

         # forward pass
         with torch.no_grad():
               lowercase__  =	model(**lowerCAmelCase)

         lowercase__  =	outputs.logits.detach().cpu()

         lowercase__  =	image_processor.post_process_semantic_segmentation(outputs=lowerCAmelCase      ,					target_sizes=[(50, 60)])
         lowercase__  =	torch.Size((50, 60))
         self.assertEqual(segmentation[0].shape      ,					lowerCAmelCase)

         lowercase__  =	image_processor.post_process_semantic_segmentation(outputs=lowerCAmelCase)
         lowercase__  =	torch.Size((32, 32))
         self.assertEqual(segmentation[0].shape      ,					lowerCAmelCase)





import unittest

from transformers.models.xlm_prophetnet.tokenization_xlm_prophetnet import SPIECE_UNDERLINE, XLMProphetNetTokenizer
from transformers.testing_utils import get_tests_dir, require_sentencepiece, slow
from transformers.utils import cached_property

from ...test_tokenization_common import TokenizerTesterMixin


a__   :					List[Any] 						=      get_tests_dir("fixtures/test_sentencepiece.model")



@require_sentencepiece
class    UpperCAmelCase__(				lowerCamelCase  ,				unittest.TestCase						):

   '''simple docstring'''




   A     :	Tuple												=     XLMProphetNetTokenizer
   A     :	List[str]												=     False
   A     :	Union[str, Any]												=     True


   def       UpperCAmelCase		(    self	:      Any)						->					int:




         """simple docstring"""

         super().setUp()

         # We have a SentencePiece fixture for testing
         lowercase__  =	XLMProphetNetTokenizer(lowerCAmelCase      ,					keep_accents=lowerCAmelCase)
         tokenizer.save_pretrained(self.tmpdirname)


   def       UpperCAmelCase		(    self	:      Optional[int])						->					Optional[Any]:




         """simple docstring"""

         lowercase__  =	'[PAD]'
         lowercase__  =	0

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


   def       UpperCAmelCase		(    self	:      Dict)						->					List[Any]:




         """simple docstring"""

         lowercase__  =	list(self.get_tokenizer().get_vocab().keys())

         self.assertEqual(vocab_keys[0]      ,					'[PAD]')
         self.assertEqual(vocab_keys[1]      ,					'[CLS]')
         self.assertEqual(vocab_keys[-1]      ,					'j')
         self.assertEqual(len(lowerCAmelCase)      ,					10_12)


   def       UpperCAmelCase		(    self	:      Union[str, Any])						->					str:




         """simple docstring"""

         self.assertEqual(self.get_tokenizer().vocab_size      ,					10_12)


   def       UpperCAmelCase		(    self	:      Tuple)						->					Optional[int]:




         """simple docstring"""

         lowercase__  =	XLMProphetNetTokenizer(lowerCAmelCase      ,					keep_accents=lowerCAmelCase)

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

         self.assertListEqual(
             tokenizer.convert_tokens_to_ids(lowerCAmelCase)      ,					[value + tokenizer.fairseq_offset for value in [2_85, 46, 10, 1_70, 3_82]]      ,					)

         lowercase__  =	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',
                 'é',
                 '.',
             ]      ,					)
         lowercase__  =	tokenizer.convert_tokens_to_ids(lowerCAmelCase)
         self.assertListEqual(
             lowerCAmelCase      ,					[
                 value + tokenizer.fairseq_offset
                 for value in [8, 21, 84, 55, 24, 19, 7, -9, 6_02, 3_47, 3_47, 3_47, 3, 12, 66, 46, 72, 80, 6, -9, 4]
             ]      ,					)

         lowercase__  =	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       UpperCAmelCase		(    self	:      str)						->					List[Any]:




         """simple docstring"""

         return XLMProphetNetTokenizer.from_pretrained('microsoft/xprophetnet-large-wiki100-cased')


   @slow
   def       UpperCAmelCase		(    self	:      List[Any])						->					List[str]:




         """simple docstring"""

         lowercase__  =	'Hello World!'
         lowercase__  =	[3_53_89, 66_72, 49, 2]
         self.assertListEqual(lowerCAmelCase      ,					self.big_tokenizer.encode(lowerCAmelCase))



   @slow
   def       UpperCAmelCase		(    self	:      Tuple)						->					str:




         """simple docstring"""

         lowercase__  =	{'input_ids': [[1_10_73, 8_27_83, 18, 26, 8_27_83, 5_49, 5_15_40, 2_48, 1_72_09, 13_01, 2_17, 20, 21_51_86, 13_25, 1_47, 1_72_09, 13_01, 2_17, 20, 5_63_70, 53, 12_20_20, 20, 1_64_77, 27, 8_73_55, 45_48, 20, 47_28, 7_83_92, 17, 15_99_69, 18, 26, 2_44_91, 6_29, 15, 5_38, 2_27_04, 54_39, 15, 27_88, 2_44_91, 98_85, 15, 4_35_34, 6_05, 15, 8_14, 1_84_03, 3_32_00, 29, 15, 4_35_34, 2_44_58, 1_24_10, 1_11, 2_49_66, 8_36_69, 96_37, 14_40_68, 26, 8_50, 2_23_46, 27, 1_47, 2_49_66, 8_36_69, 8_34_90, 26, 3_91_13, 7_35, 27, 6_89, 6_56, 28_00, 13_39, 46_00, 53, 12_20_20, 11_57_85, 34, 8_16, 13_39, 4_68_87, 18, 1_47, 5_39_05, 19_51, 4_22_38, 4_11_70, 1_77_32, 8_34, 4_36, 15, 2_75_23, 9_87_33, 2_17, 1_47, 55_42, 49_81, 9_30, 1_73_47, 16, 2], [2_00_91, 6_29, 94, 8_27_86, 58, 4_90, 20, 15_28, 84, 5_39_05, 3_44, 8_05_92, 11_01_28, 1_88_22, 52_67, 13_06, 62, 15_25_37, 3_08, 79_97, 4_01, 12_44_27, 5_49, 3_54_42, 2_25, 1_09, 1_50_55, 2_57_48, 1_47, 71_19, 4_37_12, 34, 7_67, 13_53_66, 18, 16, 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], [5_92, 6_37_84, 11_94_66, 17, 14_78_08, 8_82_14, 18, 6_56, 81, 32, 32_96, 1_02_80, 16, 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, 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, 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, 0, 0, 0, 0, 0], [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, 0, 0, 0, 0, 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='microsoft/xprophetnet-large-wiki100-cased'      ,					revision='1acad1643ddd54a44df6a1b797ada8373685d90e'      ,					)
