






'''simple docstring'''







import inspect
import unittest
import warnings

from transformers import DeiTConfig
from transformers.models.auto import get_values
from transformers.testing_utils import (
    require_accelerate,
    require_torch,
    require_torch_gpu,
    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 (
			    MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING,
			    MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING,
			    MODEL_MAPPING,
			    DeiTForImageClassification,
			    DeiTForImageClassificationWithTeacher,
			    DeiTForMaskedImageModeling,
			    DeiTModel,
			)
			from transformers.models.deit.modeling_deit import DEIT_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
			from PIL import Image

			from transformers import DeiTImageProcessor

class _lowercase	:




							def __init__(							self:				List[str]			,							UpperCamelCase__:				Dict			,							UpperCamelCase__:				Dict=13			,							UpperCamelCase__:				int=30			,							UpperCamelCase__:				Tuple=2			,							UpperCamelCase__:				Any=3			,							UpperCamelCase__:				List[str]=True			,							UpperCamelCase__:				Optional[Any]=True			,							UpperCamelCase__:				Optional[int]=32			,							UpperCamelCase__:				Tuple=5			,							UpperCamelCase__:				Any=4			,							UpperCamelCase__:				str=37			,							UpperCamelCase__:				Union[str, Any]="gelu"			,							UpperCamelCase__:				str=0.1			,							UpperCamelCase__:				List[Any]=0.1			,							UpperCamelCase__:				Union[str, Any]=10			,							UpperCamelCase__:				Optional[Any]=0.02			,							UpperCamelCase__:				Optional[Any]=3			,							UpperCamelCase__:				Any=None			,							UpperCamelCase__:				Any=2			,							):
														lowerCamelCase__					:	str         =       parent
														lowerCamelCase__					:	List[str]         =       batch_size
														lowerCamelCase__					:	Tuple         =       image_size
														lowerCamelCase__					:	Any         =       patch_size
														lowerCamelCase__					:	Dict         =       num_channels
														lowerCamelCase__					:	List[str]         =       is_training
														lowerCamelCase__					:	Dict         =       use_labels
														lowerCamelCase__					:	List[str]         =       hidden_size
														lowerCamelCase__					:	str         =       num_hidden_layers
														lowerCamelCase__					:	Any         =       num_attention_heads
														lowerCamelCase__					:	str         =       intermediate_size
														lowerCamelCase__					:	str         =       hidden_act
														lowerCamelCase__					:	int         =       hidden_dropout_prob
														lowerCamelCase__					:	Dict         =       attention_probs_dropout_prob
														lowerCamelCase__					:	int         =       type_sequence_label_size
														lowerCamelCase__					:	Tuple         =       initializer_range
														lowerCamelCase__					:	Optional[int]         =       scope
														lowerCamelCase__					:	Tuple         =       encoder_stride

														# in DeiT, the seq length equals the number of patches + 2 (we add 2 for the [CLS] and distilation tokens)
														lowerCamelCase__					:	str         =       (image_size // patch_size) ** 2
														lowerCamelCase__					:	int         =       num_patches + 2




							def 		lowerCamelCase_				(							self:				List[str]     ):
														lowerCamelCase__					:	Any         =       floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]     )

														lowerCamelCase__					:	Optional[int]         =       None
														if self.use_labels:
																					lowerCamelCase__					:	Tuple         =       ids_tensor([self.batch_size]			,							self.type_sequence_label_size     )

														lowerCamelCase__					:	Optional[int]         =       self.get_config()

														return config, pixel_values, labels




							def 		lowerCamelCase_				(							self:				Dict     ):
														return DeiTConfig(
														    image_size=self.image_size			,							patch_size=self.patch_size			,							num_channels=self.num_channels			,							hidden_size=self.hidden_size			,							num_hidden_layers=self.num_hidden_layers			,							num_attention_heads=self.num_attention_heads			,							intermediate_size=self.intermediate_size			,							hidden_act=self.hidden_act			,							hidden_dropout_prob=self.hidden_dropout_prob			,							attention_probs_dropout_prob=self.attention_probs_dropout_prob			,							is_decoder=UpperCamelCase__			,							initializer_range=self.initializer_range			,							encoder_stride=self.encoder_stride			,							)




							def 		lowerCamelCase_				(							self:				List[str]			,							UpperCamelCase__:				Optional[Any]			,							UpperCamelCase__:				Optional[Any]			,							UpperCamelCase__:				Optional[Any]     ):
														lowerCamelCase__					:	Any         =       DeiTModel(config=UpperCamelCase__     )
														model.to(UpperCamelCase__     )
														model.eval()
														lowerCamelCase__					:	Tuple         =       model(UpperCamelCase__     )
														self.parent.assertEqual(result.last_hidden_state.shape			,							(self.batch_size, self.seq_length, self.hidden_size)     )




							def 		lowerCamelCase_				(							self:				Dict			,							UpperCamelCase__:				Optional[Any]			,							UpperCamelCase__:				Union[str, Any]			,							UpperCamelCase__:				Tuple     ):
														lowerCamelCase__					:	List[str]         =       DeiTForMaskedImageModeling(config=UpperCamelCase__     )
														model.to(UpperCamelCase__     )
														model.eval()
														lowerCamelCase__					:	Any         =       model(UpperCamelCase__     )
														self.parent.assertEqual(
														    result.reconstruction.shape			,							(self.batch_size, self.num_channels, self.image_size, self.image_size)     )

														# test greyscale images
														lowerCamelCase__					:	List[str]         =       1
														lowerCamelCase__					:	Optional[int]         =       DeiTForMaskedImageModeling(UpperCamelCase__     )
														model.to(UpperCamelCase__     )
														model.eval()

														lowerCamelCase__					:	List[str]         =       floats_tensor([self.batch_size, 1, self.image_size, self.image_size]     )
														lowerCamelCase__					:	int         =       model(UpperCamelCase__     )
														self.parent.assertEqual(result.reconstruction.shape			,							(self.batch_size, 1, self.image_size, self.image_size)     )




							def 		lowerCamelCase_				(							self:				Union[str, Any]			,							UpperCamelCase__:				Dict			,							UpperCamelCase__:				Tuple			,							UpperCamelCase__:				List[str]     ):
														lowerCamelCase__					:	str         =       self.type_sequence_label_size
														lowerCamelCase__					:	Union[str, Any]         =       DeiTForImageClassification(UpperCamelCase__     )
														model.to(UpperCamelCase__     )
														model.eval()
														lowerCamelCase__					:	Optional[int]         =       model(UpperCamelCase__			,							labels=UpperCamelCase__     )
														self.parent.assertEqual(result.logits.shape			,							(self.batch_size, self.type_sequence_label_size)     )

														# test greyscale images
														lowerCamelCase__					:	List[Any]         =       1
														lowerCamelCase__					:	List[Any]         =       DeiTForImageClassification(UpperCamelCase__     )
														model.to(UpperCamelCase__     )
														model.eval()

														lowerCamelCase__					:	int         =       floats_tensor([self.batch_size, 1, self.image_size, self.image_size]     )
														lowerCamelCase__					:	Optional[Any]         =       model(UpperCamelCase__			,							labels=UpperCamelCase__     )
														self.parent.assertEqual(result.logits.shape			,							(self.batch_size, self.type_sequence_label_size)     )




							def 		lowerCamelCase_				(							self:				Any     ):
														lowerCamelCase__					:	List[str]         =       self.prepare_config_and_inputs()
														(
														    (
														    lowerCamelCase__
														)  ,		(
														    lowerCamelCase__
														)  ,		(
														    lowerCamelCase__
														)  ,		
														)					:	Union[str, Any]         =       config_and_inputs
														lowerCamelCase__					:	List[Any]         =       {"""pixel_values""": pixel_values}
														return config, inputs_dict



@require_torch
class _lowercase	(				_lowercase				,      _lowercase				,      unittest.TestCase		):
							a				      =       (
							    (
							        DeiTModel,
							        DeiTForImageClassification,
							        DeiTForImageClassificationWithTeacher,
							        DeiTForMaskedImageModeling,
							    )
							    if is_torch_available()
							    else ()
							)
							a				      =       (
							    {
							        """feature-extraction""": DeiTModel,
							        """image-classification""": (DeiTForImageClassification, DeiTForImageClassificationWithTeacher),
							    }
							    if is_torch_available()
							    else {}
							)

							a				      =       False
							a				      =       False
							a				      =       False




							def 		lowerCamelCase_				(							self:				Optional[int]     ):
														lowerCamelCase__					:	List[str]         =       DeiTModelTester(self     )
														lowerCamelCase__					:	List[Any]         =       ConfigTester(self			,							config_class=UpperCamelCase__			,							has_text_modality=UpperCamelCase__			,							hidden_size=37     )




							def 		lowerCamelCase_				(							self:				int     ):
														self.config_tester.run_common_tests()




							@unittest.skip(reason="""DeiT does not use inputs_embeds"""     )
							def 		lowerCamelCase_				(							self:				Optional[Any]     ):
														pass




							def 		lowerCamelCase_				(							self:				Union[str, Any]     ):
														lowerCamelCase__  ,		lowerCamelCase__					:	Any         =       self.model_tester.prepare_config_and_inputs_for_common()

														for model_class in self.all_model_classes:
																					lowerCamelCase__					:	Optional[int]         =       model_class(UpperCamelCase__     )
																					self.assertIsInstance(model.get_input_embeddings()			,							(nn.Module)     )
																					lowerCamelCase__					:	Any         =       model.get_output_embeddings()
																					self.assertTrue(x is None or isinstance(UpperCamelCase__			,							nn.Linear     )     )




							def 		lowerCamelCase_				(							self:				Any     ):
														lowerCamelCase__  ,		lowerCamelCase__					:	Dict         =       self.model_tester.prepare_config_and_inputs_for_common()

														for model_class in self.all_model_classes:
																					lowerCamelCase__					:	Optional[Any]         =       model_class(UpperCamelCase__     )
																					lowerCamelCase__					:	List[str]         =       inspect.signature(model.forward     )
																					# signature.parameters is an OrderedDict => so arg_names order is deterministic
																					lowerCamelCase__					:	Tuple         =       [*signature.parameters.keys()]

																					lowerCamelCase__					:	Dict         =       ["""pixel_values"""]
																					self.assertListEqual(arg_names[:1]			,							UpperCamelCase__     )




							def 		lowerCamelCase_				(							self:				Tuple     ):
														lowerCamelCase__					:	List[Any]         =       self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_model(*UpperCamelCase__     )




							def 		lowerCamelCase_				(							self:				List[str]     ):
														lowerCamelCase__					:	List[str]         =       self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_for_masked_image_modeling(*UpperCamelCase__     )




							def 		lowerCamelCase_				(							self:				List[Any]     ):
														lowerCamelCase__					:	int         =       self.model_tester.prepare_config_and_inputs()
														self.model_tester.create_and_check_for_image_classification(*UpperCamelCase__     )




							def 		lowerCamelCase_				(							self:				List[Any]			,							UpperCamelCase__:				Dict			,							UpperCamelCase__:				List[str]			,							UpperCamelCase__:				Dict=False     ):
														lowerCamelCase__					:	List[Any]         =       super()._prepare_for_class(UpperCamelCase__			,							UpperCamelCase__			,							return_labels=UpperCamelCase__     )

														if return_labels:
																					if model_class.__name__ == "DeiTForImageClassificationWithTeacher":
																												del inputs_dict["labels"]

														return inputs_dict




							def 		lowerCamelCase_				(							self:				Dict     ):
														if not self.model_tester.is_training:
																					return

														lowerCamelCase__  ,		lowerCamelCase__					:	List[Any]         =       self.model_tester.prepare_config_and_inputs_for_common()
														lowerCamelCase__					:	List[str]         =       True

														for model_class in self.all_model_classes:
																					# DeiTForImageClassificationWithTeacher supports inference-only
																					if (
																					    model_class in get_values(UpperCamelCase__     )
																					    or model_class.__name__ == "DeiTForImageClassificationWithTeacher"
																					):
																												continue
																					lowerCamelCase__					:	Optional[int]         =       model_class(UpperCamelCase__     )
																					model.to(UpperCamelCase__     )
																					model.train()
																					lowerCamelCase__					:	Any         =       self._prepare_for_class(UpperCamelCase__			,							UpperCamelCase__			,							return_labels=UpperCamelCase__     )
																					lowerCamelCase__					:	str         =       model(**UpperCamelCase__     ).loss
																					loss.backward()




							def 		lowerCamelCase_				(							self:				Optional[Any]     ):
														lowerCamelCase__  ,		lowerCamelCase__					:	List[str]         =       self.model_tester.prepare_config_and_inputs_for_common()
														if not self.model_tester.is_training:
																					return

														lowerCamelCase__					:	Tuple         =       False
														lowerCamelCase__					:	Any         =       True

														for model_class in self.all_model_classes:
																					if model_class in get_values(UpperCamelCase__     ) or not model_class.supports_gradient_checkpointing:
																												continue
																					# DeiTForImageClassificationWithTeacher supports inference-only
																					if model_class.__name__ == "DeiTForImageClassificationWithTeacher":
																												continue
																					lowerCamelCase__					:	Optional[int]         =       model_class(UpperCamelCase__     )
																					model.gradient_checkpointing_enable()
																					model.to(UpperCamelCase__     )
																					model.train()
																					lowerCamelCase__					:	Optional[int]         =       self._prepare_for_class(UpperCamelCase__			,							UpperCamelCase__			,							return_labels=UpperCamelCase__     )
																					lowerCamelCase__					:	int         =       model(**UpperCamelCase__     ).loss
																					loss.backward()




							def 		lowerCamelCase_				(							self:				Optional[int]     ):
														lowerCamelCase__  ,		lowerCamelCase__					:	List[str]         =       self.model_tester.prepare_config_and_inputs_for_common()

														lowerCamelCase__					:	str         =       [
														    {"""title""": """multi_label_classification""", """num_labels""": 2, """dtype""": torch.float},
														    {"""title""": """single_label_classification""", """num_labels""": 1, """dtype""": torch.long},
														    {"""title""": """regression""", """num_labels""": 1, """dtype""": torch.float},
														]

														for model_class in self.all_model_classes:
																					if (
																					    model_class
																					    not in [
																					        *get_values(UpperCamelCase__     ),
																					        *get_values(UpperCamelCase__     ),
																					    ]
																					    or model_class.__name__ == "DeiTForImageClassificationWithTeacher"
																					):
																												continue

																					for problem_type in problem_types:
																												with self.subTest(msg=F'''Testing {model_class} with {problem_type['title']}'''     ):
																																			lowerCamelCase__					:	int         =       problem_type["""title"""]
																																			lowerCamelCase__					:	Any         =       problem_type["""num_labels"""]

																																			lowerCamelCase__					:	List[Any]         =       model_class(UpperCamelCase__     )
																																			model.to(UpperCamelCase__     )
																																			model.train()

																																			lowerCamelCase__					:	Dict         =       self._prepare_for_class(UpperCamelCase__			,							UpperCamelCase__			,							return_labels=UpperCamelCase__     )

																																			if problem_type["num_labels"] > 1:
																																										lowerCamelCase__					:	List[Any]         =       inputs["""labels"""].unsqueeze(1     ).repeat(1			,							problem_type["""num_labels"""]     )

																																			lowerCamelCase__					:	List[Any]         =       inputs["""labels"""].to(problem_type["""dtype"""]     )

																																			# This tests that we do not trigger the warning form PyTorch "Using a target size that is different
																																			# to the input size. This will likely lead to incorrect results due to broadcasting. Please ensure
																																			# they have the same size." which is a symptom something in wrong for the regression problem.
																																			# See https://github.com/huggingface/transformers/issues/11780
																																			with warnings.catch_warnings(record=UpperCamelCase__     ) as warning_list:
																																										lowerCamelCase__					:	List[Any]         =       model(**UpperCamelCase__     ).loss
																																			for w in warning_list:
																																										if "Using a target size that is different to the input size" in str(w.message     ):
																																																	raise ValueError(
																																																	    F'''Something is going wrong in the regression problem: intercepted {w.message}'''     )

																																			loss.backward()




							@slow
							def 		lowerCamelCase_				(							self:				Union[str, Any]     ):
														for model_name in DEIT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
																					lowerCamelCase__					:	Optional[Any]         =       DeiTModel.from_pretrained(UpperCamelCase__     )
																					self.assertIsNotNone(UpperCamelCase__     )





def  SCREAMING_SNAKE_CASE_       ()      ->       List[str]:
							lowerCamelCase__					:	List[Any]         =       Image.open("""./tests/fixtures/tests_samples/COCO/000000039769.png"""      )
							return image



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




							@cached_property
							def 		lowerCamelCase_				(							self:				List[Any]     ):
														return (
														    DeiTImageProcessor.from_pretrained("""facebook/deit-base-distilled-patch16-224"""     )
														    if is_vision_available()
														    else None
														)




							@slow
							def 		lowerCamelCase_				(							self:				Union[str, Any]     ):
														lowerCamelCase__					:	Optional[int]         =       DeiTForImageClassificationWithTeacher.from_pretrained("""facebook/deit-base-distilled-patch16-224"""     ).to(
														    UpperCamelCase__     )

														lowerCamelCase__					:	Dict         =       self.default_image_processor
														lowerCamelCase__					:	Optional[int]         =       prepare_img()
														lowerCamelCase__					:	str         =       image_processor(images=UpperCamelCase__			,							return_tensors="""pt"""     ).to(UpperCamelCase__     )

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

														# verify the logits
														lowerCamelCase__					:	Union[str, Any]         =       torch.Size((1, 1_000)     )
														self.assertEqual(outputs.logits.shape			,							UpperCamelCase__     )

														lowerCamelCase__					:	Any         =       torch.tensor([-1.0_266, 0.1_912, -1.2_861]     ).to(UpperCamelCase__     )

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




							@slow
							@require_accelerate
							@require_torch_gpu
							def 		lowerCamelCase_				(							self:				int     ):
														lowerCamelCase__					:	Optional[Any]         =       DeiTModel.from_pretrained(
														    """facebook/deit-base-distilled-patch16-224"""			,							torch_dtype=torch.floataa			,							device_map="""auto"""     )
														lowerCamelCase__					:	List[Any]         =       self.default_image_processor

														lowerCamelCase__					:	List[str]         =       prepare_img()
														lowerCamelCase__					:	Tuple         =       image_processor(images=UpperCamelCase__			,							return_tensors="""pt"""     )
														lowerCamelCase__					:	Optional[Any]         =       inputs.pixel_values.to(UpperCamelCase__     )

														# forward pass to make sure inference works in fp16
														with torch.no_grad():
																					lowerCamelCase__					:	int         =       model(UpperCamelCase__     )






from collections import OrderedDict
from typing import TYPE_CHECKING, Any, Mapping, Optional, Union

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


if TYPE_CHECKING:
 from ... import FeatureExtractionMixin, PreTrainedTokenizerBase, TensorType


a_   :Tuple        =      logging.get_logger(__name__)

a_   :Union[str, Any]        =      {
    "microsoft/deberta-v2-xlarge": "https://huggingface.co/microsoft/deberta-v2-xlarge/resolve/main/config.json",
    "microsoft/deberta-v2-xxlarge": "https://huggingface.co/microsoft/deberta-v2-xxlarge/resolve/main/config.json",
    "microsoft/deberta-v2-xlarge-mnli": (
        "https://huggingface.co/microsoft/deberta-v2-xlarge-mnli/resolve/main/config.json"
    ),
    "microsoft/deberta-v2-xxlarge-mnli": (
        "https://huggingface.co/microsoft/deberta-v2-xxlarge-mnli/resolve/main/config.json"
    ),
}




class 					snake_case__						(       lowerCAmelCase_     ):






     """simple docstring"""


     _SCREAMING_SNAKE_CASE						=	"""deberta-v2"""






     def __init__(       self  :  Union[str, Any], _snake_case  :  Dict=1_2_8_1_0_0, _snake_case  :  Any=1_5_3_6, _snake_case  :  Tuple=2_4, _snake_case  :  int=2_4, _snake_case  :  Optional[int]=6_1_4_4, _snake_case  :  Optional[int]="gelu", _snake_case  :  Optional[int]=0.1, _snake_case  :  List[str]=0.1, _snake_case  :  str=5_1_2, _snake_case  :  Optional[int]=0, _snake_case  :  Optional[int]=0.0_2, _snake_case  :  Dict=1e-7, _snake_case  :  int=False, _snake_case  :  Any=-1, _snake_case  :  List[str]=0, _snake_case  :  Tuple=True, _snake_case  :  Any=None, _snake_case  :  Union[str, Any]=0, _snake_case  :  Tuple="gelu", **_snake_case  :  Union[str, Any], )   ->Optional[int]:
            super().__init__(**_snake_case					)

            snake_case__							:	Dict   	=	hidden_size
            snake_case__							:	Optional[int]   	=	num_hidden_layers
            snake_case__							:	Any   	=	num_attention_heads
            snake_case__							:	List[Any]   	=	intermediate_size
            snake_case__							:	List[Any]   	=	hidden_act
            snake_case__							:	Union[str, Any]   	=	hidden_dropout_prob
            snake_case__							:	Dict   	=	attention_probs_dropout_prob
            snake_case__							:	List[str]   	=	max_position_embeddings
            snake_case__							:	List[str]   	=	type_vocab_size
            snake_case__							:	Optional[Any]   	=	initializer_range
            snake_case__							:	Optional[int]   	=	relative_attention
            snake_case__							:	Tuple   	=	max_relative_positions
            snake_case__							:	Union[str, Any]   	=	pad_token_id
            snake_case__							:	Optional[int]   	=	position_biased_input

            # Backwards compatibility
            if type(_snake_case					) == str:
                   snake_case__							:	int   	=	[x.strip() for x in pos_att_type.lower().split('|'					)]

            snake_case__							:	List[str]   	=	pos_att_type
            snake_case__							:	Union[str, Any]   	=	vocab_size
            snake_case__							:	Optional[int]   	=	layer_norm_eps

            snake_case__							:	Optional[int]   	=	kwargs.get('pooler_hidden_size', _snake_case					)
            snake_case__							:	int   	=	pooler_dropout
            snake_case__							:	str   	=	pooler_hidden_act




class 					snake_case__						(       lowerCAmelCase_     ):






     """simple docstring"""


     @property
     def    lowercase_   (       self  :  Optional[int]					)   ->Mapping[str, Mapping[int, str]]:
            if self.task == "multiple-choice":
                   snake_case__							:	List[Any]   	=	{0: 'batch', 1: 'choice', 2: 'sequence'}
            else:
                   snake_case__							:	int   	=	{0: 'batch', 1: 'sequence'}
            if self._config.type_vocab_size > 0:
                   return OrderedDict(
                       [('input_ids', dynamic_axis), ('attention_mask', dynamic_axis), ('token_type_ids', dynamic_axis)]					)
            else:
                   return OrderedDict([('input_ids', dynamic_axis), ('attention_mask', dynamic_axis)]					)






     @property
     def    lowercase_   (       self  :  Dict					)   ->int:
            return 1_2






     def    lowercase_   (       self  :  Tuple, _snake_case  :  Union["PreTrainedTokenizerBase", "FeatureExtractionMixin"], _snake_case  :  int = -1, _snake_case  :  int = -1, _snake_case  :  int = -1, _snake_case  :  bool = False, _snake_case  :  Optional["TensorType"] = None, _snake_case  :  int = 3, _snake_case  :  int = 4_0, _snake_case  :  int = 4_0, _snake_case  :  "PreTrainedTokenizerBase" = None, )   ->Mapping[str, Any]:
            snake_case__							:	Union[str, Any]   	=	super().generate_dummy_inputs(preprocessor=_snake_case, framework=_snake_case					)
            if self._config.type_vocab_size == 0 and "token_type_ids" in dummy_inputs:
                   del dummy_inputs["token_type_ids"]
            return dummy_inputs






