



"""simple docstring"""







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


a_							=    get_tests_dir("""fixtures/spiece.model""")







@require_sentencepiece
@require_tokenizers
class 					A_(snake_case_   ,   unittest.TestCase      ):







			"""simple docstring"""



			a_       :			List[str]												=			DebertaVaTokenizer
			a_       :			Dict												=			DebertaVaTokenizerFast
			a_       :			Any												=			True
			a_       :			Optional[Any]												=			True
			def    _lowerCAmelCase		(	self							):
						super().setUp()

						# We have a SentencePiece fixture for testing
						_lowerCamelCase					:					List[Any]	       =    DebertaVaTokenizer(A_				,   unk_token='<unk>'							)
						tokenizer.save_pretrained(self.tmpdirname							)
			def    _lowerCAmelCase		(	self				,   A							):
						_lowerCamelCase					:					Optional[int]	       =    'this is a test'
						_lowerCamelCase					:					Dict	       =    'this is a test'
						return input_text, output_text
			def    _lowerCAmelCase		(	self							):
						_lowerCamelCase					:					Union[str, Any]	       =    '<pad>'
						_lowerCamelCase					:					Any	       =    0

						self.assertEqual(self.get_tokenizer()._convert_token_to_id(A_							)				,   A_							)
						self.assertEqual(self.get_tokenizer()._convert_id_to_token(A_							)				,   A_							)
			def    _lowerCAmelCase		(	self							):
						_lowerCamelCase					:					int	       =    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(A_							)				,   3_0001							)
			def    _lowerCAmelCase		(	self							):
						self.assertEqual(self.get_tokenizer().vocab_size				,   3_0000							)
			def    _lowerCAmelCase		(	self							):
						_lowerCamelCase					:					List[Any]	       =    ' \tHeLLo!how  \n Are yoU?  '
						_lowerCamelCase					:					List[str]	       =    ['▁hello', '!', 'how', '▁are', '▁you', '?']
						# fmt: on

						_lowerCamelCase					:					Optional[int]	       =    DebertaVaTokenizer(A_				,   do_lower_case=A_							)
						_lowerCamelCase					:					Dict	       =    tokenizer.convert_ids_to_tokens(tokenizer.encode(A_				,   add_special_tokens=A_							)							)

						self.assertListEqual(A_				,   A_							)

						_lowerCamelCase					:					Tuple	       =    DebertaVaTokenizerFast(A_				,   do_lower_case=A_							)
						_lowerCamelCase					:					Any	       =    rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_				,   add_special_tokens=A_							)							)

						self.assertListEqual(A_				,   A_							)
			@unittest.skip('There is an inconsistency between slow and fast tokenizer due to a bug in the fast one.'							)
			def    _lowerCAmelCase		(	self							):
						pass
			@unittest.skip('There is an inconsistency between slow and fast tokenizer due to a bug in the fast one.'							)
			def    _lowerCAmelCase		(	self							):
						pass
			def    _lowerCAmelCase		(	self							):
						_lowerCamelCase					:					Optional[int]	       =    'I was born in 92000, and this is falsé.'
						_lowerCamelCase					:					int	       =    ['▁', '<unk>', '▁was', '▁born', '▁in', '▁9', '2000', '▁', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '▁', '.', ]
						# fmt: on

						_lowerCamelCase					:					Optional[int]	       =    DebertaVaTokenizer(A_				,   split_by_punct=A_							)
						_lowerCamelCase					:					Dict	       =    tokenizer.convert_ids_to_tokens(tokenizer.encode(A_				,   add_special_tokens=A_							)							)

						self.assertListEqual(A_				,   A_							)

						_lowerCamelCase					:					List[str]	       =    DebertaVaTokenizerFast(A_				,   split_by_punct=A_							)
						_lowerCamelCase					:					List[str]	       =    rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_				,   add_special_tokens=A_							)							)

						self.assertListEqual(A_				,   A_							)
			def    _lowerCAmelCase		(	self							):
						_lowerCamelCase					:					Dict	       =    'I was born in 92000, and this is falsé.'
						_lowerCamelCase					:					int	       =    ['▁i', '▁was', '▁born', '▁in', '▁9', '2000', '▁', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '▁', '.', ]
						# fmt: on

						_lowerCamelCase					:					Optional[int]	       =    DebertaVaTokenizer(A_				,   do_lower_case=A_				,   split_by_punct=A_							)
						_lowerCamelCase					:					Any	       =    tokenizer.convert_ids_to_tokens(tokenizer.encode(A_				,   add_special_tokens=A_							)							)
						self.assertListEqual(A_				,   A_							)

						_lowerCamelCase					:					List[str]	       =    DebertaVaTokenizerFast(A_				,   do_lower_case=A_				,   split_by_punct=A_							)
						_lowerCamelCase					:					str	       =    rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_				,   add_special_tokens=A_							)							)
						self.assertListEqual(A_				,   A_							)
			def    _lowerCAmelCase		(	self							):
						_lowerCamelCase					:					Dict	       =    'I was born in 92000, and this is falsé.'
						_lowerCamelCase					:					Optional[Any]	       =    ['▁i', '▁was', '▁born', '▁in', '▁9', '2000', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '.', ]
						# fmt: on

						_lowerCamelCase					:					Dict	       =    DebertaVaTokenizer(A_				,   do_lower_case=A_				,   split_by_punct=A_							)
						_lowerCamelCase					:					List[Any]	       =    tokenizer.convert_ids_to_tokens(tokenizer.encode(A_				,   add_special_tokens=A_							)							)

						self.assertListEqual(A_				,   A_							)

						_lowerCamelCase					:					Union[str, Any]	       =    DebertaVaTokenizerFast(A_				,   do_lower_case=A_				,   split_by_punct=A_							)
						_lowerCamelCase					:					Union[str, Any]	       =    rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_				,   add_special_tokens=A_							)							)

						self.assertListEqual(A_				,   A_							)
			def    _lowerCAmelCase		(	self							):
						_lowerCamelCase					:					List[str]	       =    'I was born in 92000, and this is falsé.'
						_lowerCamelCase					:					str	       =    ['▁', '<unk>', '▁was', '▁born', '▁in', '▁9', '2000', '▁', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '▁', '.', ]
						# fmt: on

						_lowerCamelCase					:					str	       =    DebertaVaTokenizer(A_				,   do_lower_case=A_				,   split_by_punct=A_							)
						_lowerCamelCase					:					Optional[Any]	       =    tokenizer.convert_ids_to_tokens(tokenizer.encode(A_				,   add_special_tokens=A_							)							)

						self.assertListEqual(A_				,   A_							)

						_lowerCamelCase					:					Union[str, Any]	       =    DebertaVaTokenizerFast(A_				,   do_lower_case=A_				,   split_by_punct=A_							)
						_lowerCamelCase					:					Optional[int]	       =    rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_				,   add_special_tokens=A_							)							)

						self.assertListEqual(A_				,   A_							)
			def    _lowerCAmelCase		(	self							):
						_lowerCamelCase					:					Optional[Any]	       =    ' \tHeLLo!how  \n Are yoU?  '
						_lowerCamelCase					:					int	       =    ['▁', '<unk>', 'e', '<unk>', 'o', '!', 'how', '▁', '<unk>', 're', '▁yo', '<unk>', '?']
						# fmt: on

						_lowerCamelCase					:					int	       =    DebertaVaTokenizer(A_				,   do_lower_case=A_				,   split_by_punct=A_							)
						_lowerCamelCase					:					int	       =    tokenizer.convert_ids_to_tokens(tokenizer.encode(A_				,   add_special_tokens=A_							)							)

						self.assertListEqual(A_				,   A_							)

						_lowerCamelCase					:					Union[str, Any]	       =    DebertaVaTokenizerFast(A_				,   do_lower_case=A_				,   split_by_punct=A_							)
						_lowerCamelCase					:					Tuple	       =    rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_				,   add_special_tokens=A_							)							)

						self.assertListEqual(A_				,   A_							)
			def    _lowerCAmelCase		(	self							):
						_lowerCamelCase					:					Any	       =    self.get_tokenizer()
						_lowerCamelCase					:					Optional[int]	       =    self.get_rust_tokenizer()

						_lowerCamelCase					:					Dict	       =    'I was born in 92000, and this is falsé.'

						_lowerCamelCase					:					Optional[int]	       =    tokenizer.convert_ids_to_tokens(tokenizer.encode(A_				,   add_special_tokens=A_							)							)
						_lowerCamelCase					:					Dict	       =    rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_				,   add_special_tokens=A_							)							)
						self.assertListEqual(A_				,   A_							)

						_lowerCamelCase					:					Union[str, Any]	       =    tokenizer.encode(A_				,   add_special_tokens=A_							)
						_lowerCamelCase					:					Optional[int]	       =    rust_tokenizer.encode(A_				,   add_special_tokens=A_							)
						self.assertListEqual(A_				,   A_							)

						_lowerCamelCase					:					List[Any]	       =    self.get_rust_tokenizer()
						_lowerCamelCase					:					int	       =    tokenizer.encode(A_							)
						_lowerCamelCase					:					Optional[Any]	       =    rust_tokenizer.encode(A_							)
						self.assertListEqual(A_				,   A_							)
			def    _lowerCAmelCase		(	self							):
						_lowerCamelCase					:					Optional[int]	       =    'This is a test'
						_lowerCamelCase					:					Tuple	       =    [13, 1, 4398, 25, 21, 1289]
						_lowerCamelCase					:					Optional[Any]	       =    ['▁', 'T', 'his', '▁is', '▁a', '▁test']
						_lowerCamelCase					:					Optional[Any]	       =    ['▁', '<unk>', 'his', '▁is', '▁a', '▁test']

						_lowerCamelCase					:					Dict	       =    DebertaVaTokenizer(A_				,   keep_accents=A_							)
						_lowerCamelCase					:					Dict	       =    DebertaVaTokenizerFast(A_				,   keep_accents=A_							)

						_lowerCamelCase					:					Dict	       =    tokenizer.encode(A_				,   add_special_tokens=A_							)
						self.assertListEqual(A_				,   A_							)
						_lowerCamelCase					:					List[str]	       =    tokenizer.tokenize(A_							)
						self.assertListEqual(A_				,   A_							)
						_lowerCamelCase					:					List[str]	       =    tokenizer.convert_ids_to_tokens(A_							)
						self.assertListEqual(A_				,   A_							)

						_lowerCamelCase					:					Optional[Any]	       =    rust_tokenizer.encode(A_				,   add_special_tokens=A_							)
						self.assertListEqual(A_				,   A_							)
						_lowerCamelCase					:					Optional[Any]	       =    rust_tokenizer.tokenize(A_							)
						self.assertListEqual(A_				,   A_							)
						_lowerCamelCase					:					List[Any]	       =    rust_tokenizer.convert_ids_to_tokens(A_							)
						self.assertListEqual(A_				,   A_							)

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

						_lowerCamelCase					:					Union[str, Any]	       =    tokenizer.encode(A_				,   add_special_tokens=A_							)
						self.assertListEqual(A_				,   A_							)
						_lowerCamelCase					:					Optional[int]	       =    tokenizer.tokenize(A_							)
						self.assertListEqual(A_				,   A_							)
						_lowerCamelCase					:					int	       =    tokenizer.convert_ids_to_tokens(A_							)
						self.assertListEqual(A_				,   A_							)

						_lowerCamelCase					:					Tuple	       =    rust_tokenizer.encode(A_				,   add_special_tokens=A_							)
						self.assertListEqual(A_				,   A_							)
						_lowerCamelCase					:					List[Any]	       =    rust_tokenizer.tokenize(A_							)
						self.assertListEqual(A_				,   A_							)
						_lowerCamelCase					:					Union[str, Any]	       =    rust_tokenizer.convert_ids_to_tokens(A_							)
						self.assertListEqual(A_				,   A_							)
			def    _lowerCAmelCase		(	self							):
						_lowerCamelCase					:					Optional[Any]	       =    DebertaVaTokenizer(A_							)

						_lowerCamelCase					:					Dict	       =    tokenizer.encode('sequence builders'							)
						_lowerCamelCase					:					List[str]	       =    tokenizer.encode('multi-sequence build'							)

						_lowerCamelCase					:					str	       =    tokenizer.build_inputs_with_special_tokens(A_							)
						_lowerCamelCase					:					int	       =    tokenizer.build_inputs_with_special_tokens(A_				,   A_							)

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

			@slow
			def    _lowerCAmelCase		(	self							):
						_lowerCamelCase					:					Dict	       =    {'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=A_				,   model_name='microsoft/deberta-v2-xlarge'				,   revision='ad6e42c1532ddf3a15c39246b63f5559d558b670'				,   )







'''simple docstring'''
from collections import OrderedDict
from typing import Any, Mapping, Optional, Union

from ...configuration_utils import PretrainedConfig
from ...feature_extraction_utils import FeatureExtractionMixin
from ...onnx import OnnxConfig
from ...onnx.utils import compute_effective_axis_dimension
from ...tokenization_utils_base import PreTrainedTokenizerBase
from ...utils import TensorType, logging


lowerCAmelCase					:    Any           = logging.get_logger(__name__)

lowerCAmelCase					:    Optional[int]           = {
    'deepmind/language-perceiver': 'https://huggingface.co/deepmind/language-perceiver/resolve/main/config.json',
    # See all Perceiver models at https://huggingface.co/models?filter=perceiver
}


class 			SCREAMING_SNAKE_CASE__      (     snake_case_):
				lowerCAmelCase_     			=							"""perceiver"""







				def __init__(       self						,				A_=256						,				A_=1280						,				A_=768						,				A_=1						,				A_=26						,				A_=8						,				A_=8						,				A_=None						,				A_=None						,				A_="kv"						,				A_=1						,				A_=1						,				A_="gelu"						,				A_=0.1						,				A_=0.02						,				A_=1e-12						,				A_=True						,				A_=262						,				A_=2048						,				A_=56						,				A_=[368, 496]						,				A_=16						,				A_=1920						,				A_=16						,				A_=[1, 16, 224, 224]						,				**A_						,				)->		str:







											'''simple docstring'''






											super().__init__(**A_     )

											UpperCamelCase   			=     num_latents
											UpperCamelCase   			=     d_latents
											UpperCamelCase   			=     d_model
											UpperCamelCase   			=     num_blocks
											UpperCamelCase   			=     num_self_attends_per_block
											UpperCamelCase   			=     num_self_attention_heads
											UpperCamelCase   			=     num_cross_attention_heads
											UpperCamelCase   			=     qk_channels
											UpperCamelCase   			=     v_channels
											UpperCamelCase   			=     cross_attention_shape_for_attention
											UpperCamelCase   			=     self_attention_widening_factor
											UpperCamelCase   			=     cross_attention_widening_factor
											UpperCamelCase   			=     hidden_act
											UpperCamelCase   			=     attention_probs_dropout_prob
											UpperCamelCase   			=     initializer_range
											UpperCamelCase   			=     layer_norm_eps
											UpperCamelCase   			=     use_query_residual
											# masked language modeling attributes
											UpperCamelCase   			=     vocab_size
											UpperCamelCase   			=     max_position_embeddings
											# image classification attributes
											UpperCamelCase   			=     image_size
											# flow attributes
											UpperCamelCase   			=     train_size
											# multimodal autoencoding attributes
											UpperCamelCase   			=     num_frames
											UpperCamelCase   			=     audio_samples_per_frame
											UpperCamelCase   			=     samples_per_patch
											UpperCamelCase   			=     output_shape


class 			SCREAMING_SNAKE_CASE__      (     snake_case_):







				@property
				def 						UpperCAmelCase_    (       self     )->		Mapping[str, Mapping[int, str]]:







											'''simple docstring'''






											if self.task == "multiple-choice":
																		UpperCamelCase   			=     {0: 'batch', 1: 'choice', 2: 'sequence'}
											else:
																		UpperCamelCase   			=     {0: 'batch', 1: 'sequence'}
											return OrderedDict(
											    [
											        ('inputs', dynamic_axis),
											        ('attention_mask', dynamic_axis),
											    ]     )







				@property
				def 						UpperCAmelCase_    (       self     )->		float:







											'''simple docstring'''






											return 1e-4







				def 						UpperCAmelCase_    (       self						,				A_						,				A_ = -1						,				A_ = -1						,				A_ = -1						,				A_ = False						,				A_ = None						,				A_ = 3						,				A_ = 40						,				A_ = 40						,				)->		Mapping[str, Any]:







											'''simple docstring'''






											if isinstance(A_						,				A_     ):
																		# If dynamic axis (-1) we forward with a fixed dimension of 2 samples to avoid optimizations made by ONNX
																		UpperCamelCase   			=     compute_effective_axis_dimension(
																		    A_						,				fixed_dimension=OnnxConfig.default_fixed_batch						,				num_token_to_add=0     )
																		# If dynamic axis (-1) we forward with a fixed dimension of 8 tokens to avoid optimizations made by ONNX
																		UpperCamelCase   			=     preprocessor.num_special_tokens_to_add(A_     )
																		UpperCamelCase   			=     compute_effective_axis_dimension(
																		    A_						,				fixed_dimension=OnnxConfig.default_fixed_sequence						,				num_token_to_add=A_     )
																		# Generate dummy inputs according to compute batch and sequence
																		UpperCamelCase   			=     [' '.join(['a']     ) * seq_length] * batch_size
																		UpperCamelCase   			=     dict(preprocessor(A_						,				return_tensors=A_     )     )
																		UpperCamelCase   			=     inputs.pop('input_ids'     )
																		return inputs
											elif isinstance(A_						,				A_     ) and preprocessor.model_input_names[0] == "pixel_values":
																		# If dynamic axis (-1) we forward with a fixed dimension of 2 samples to avoid optimizations made by ONNX
																		UpperCamelCase   			=     compute_effective_axis_dimension(A_						,				fixed_dimension=OnnxConfig.default_fixed_batch     )
																		UpperCamelCase   			=     self._generate_dummy_images(A_						,				A_						,				A_						,				A_     )
																		UpperCamelCase   			=     dict(preprocessor(images=A_						,				return_tensors=A_     )     )
																		UpperCamelCase   			=     inputs.pop('pixel_values'     )
																		return inputs
											else:
																		raise ValueError(
																		    'Unable to generate dummy inputs for the model. Please provide a tokenizer or a preprocessor.'     )




