






"""simple docstring"""



import itertools
import json
import os
import unittest

from transformers import AddedToken, RobertaTokenizer, RobertaTokenizerFast
from transformers.models.roberta.tokenization_roberta import VOCAB_FILES_NAMES
from transformers.testing_utils import require_tokenizers, slow

from ...test_tokenization_common import TokenizerTesterMixin







@require_tokenizers
class   lowercase__     (				__SCREAMING_SNAKE_CASE,  unittest.TestCase  ):
			_UpperCAmelCase						:Optional[int]       =					RobertaTokenizer
			_UpperCAmelCase						:Union[str, Any]       =					RobertaTokenizerFast
			_UpperCAmelCase						:Union[str, Any]       =					True
			_UpperCAmelCase						:List[str]       =					{"cls_token": "<s>"}


			def       UpperCAmelCase__		( self	:    List[str]   ):
										super().setUp()

										# Adapted from Sennrich et al. 2015 and https://github.com/rsennrich/subword-nmt
										lowerCamelCase_			:				Optional[Any]										=[
										    "l",
										    "o",
										    "w",
										    "e",
										    "r",
										    "s",
										    "t",
										    "i",
										    "d",
										    "n",
										    "\u0120",
										    "\u0120l",
										    "\u0120n",
										    "\u0120lo",
										    "\u0120low",
										    "er",
										    "\u0120lowest",
										    "\u0120newer",
										    "\u0120wider",
										    "<unk>",
										]
										lowerCamelCase_			:				List[str]										=dict(zip(_SCREAMING_SNAKE_CASE  ,			range(len(_SCREAMING_SNAKE_CASE   )   )   )   )
										lowerCamelCase_			:				Any										=["#version: 0.2", "\u0120 l", "\u0120l o", "\u0120lo w", "e r", ""]
										lowerCamelCase_			:				Tuple										={"unk_token": "<unk>"}

										lowerCamelCase_			:				int										=os.path.join(self.tmpdirname  ,			VOCAB_FILES_NAMES["vocab_file"]   )
										lowerCamelCase_			:				Union[str, Any]										=os.path.join(self.tmpdirname  ,			VOCAB_FILES_NAMES["merges_file"]   )
										with open(self.vocab_file  ,			"w"  ,			encoding="utf-8"   ) as fp:
																	fp.write(json.dumps(_SCREAMING_SNAKE_CASE   ) + "\n"   )
										with open(self.merges_file  ,			"w"  ,			encoding="utf-8"   ) as fp:
																	fp.write("\n".join(_SCREAMING_SNAKE_CASE   )   )


			def       UpperCAmelCase__		( self	:    Any  ,			**snake_case__	:    Any   ):
										kwargs.update(self.special_tokens_map   )
										return self.tokenizer_class.from_pretrained(self.tmpdirname  ,			**_SCREAMING_SNAKE_CASE   )


			def       UpperCAmelCase__		( self	:    Optional[int]  ,			**snake_case__	:    Any   ):
										kwargs.update(self.special_tokens_map   )
										return RobertaTokenizerFast.from_pretrained(self.tmpdirname  ,			**_SCREAMING_SNAKE_CASE   )


			def       UpperCAmelCase__		( self	:    List[Any]  ,			snake_case__	:    List[str]   ):
										lowerCamelCase_			:				Optional[Any]										="lower newer"
										lowerCamelCase_			:				Optional[int]										="lower newer"
										return input_text, output_text


			def       UpperCAmelCase__		( self	:    Any   ):
										lowerCamelCase_			:				Dict										=self.tokenizer_class(self.vocab_file  ,			self.merges_file  ,			**self.special_tokens_map   )
										lowerCamelCase_			:				Optional[int]										="lower newer"
										lowerCamelCase_			:				Optional[int]										=["l", "o", "w", "er", "\u0120", "n", "e", "w", "er"]
										lowerCamelCase_			:				int										=tokenizer.tokenize(_SCREAMING_SNAKE_CASE   )  # , add_prefix_space=True)
										self.assertListEqual(_SCREAMING_SNAKE_CASE  ,			_SCREAMING_SNAKE_CASE   )

										lowerCamelCase_			:				Optional[Any]										=tokens + [tokenizer.unk_token]
										lowerCamelCase_			:				Tuple										=[0, 1, 2, 15, 10, 9, 3, 2, 15, 19]
										self.assertListEqual(tokenizer.convert_tokens_to_ids(_SCREAMING_SNAKE_CASE   )  ,			_SCREAMING_SNAKE_CASE   )


			def       UpperCAmelCase__		( self	:    Tuple   ):
										lowerCamelCase_			:				List[Any]										=self.get_tokenizer()

										self.assertListEqual(tokenizer.encode("Hello world!"  ,			add_special_tokens=_SCREAMING_SNAKE_CASE   )  ,			[0, 3_1414, 232, 328, 2]   )
										self.assertListEqual(
										    tokenizer.encode("Hello world! cécé herlolip 418"  ,			add_special_tokens=_SCREAMING_SNAKE_CASE   )  ,			[0, 3_1414, 232, 328, 740, 1140, 1_2695, 69, 4_6078, 1588, 2]  ,			)


			@slow
			def       UpperCAmelCase__		( self	:    Dict   ):
										lowerCamelCase_			:				List[Any]										=self.tokenizer_class.from_pretrained("roberta-base"   )

										lowerCamelCase_			:				Union[str, Any]										=tokenizer.encode("sequence builders"  ,			add_special_tokens=_SCREAMING_SNAKE_CASE   )
										lowerCamelCase_			:				Optional[int]										=tokenizer.encode("multi-sequence build"  ,			add_special_tokens=_SCREAMING_SNAKE_CASE   )

										lowerCamelCase_			:				Optional[Any]										=tokenizer.encode(
										    "sequence builders"  ,			add_special_tokens=_SCREAMING_SNAKE_CASE  ,			add_prefix_space=_SCREAMING_SNAKE_CASE   )
										lowerCamelCase_			:				Tuple										=tokenizer.encode(
										    "sequence builders"  ,			"multi-sequence build"  ,			add_special_tokens=_SCREAMING_SNAKE_CASE  ,			add_prefix_space=_SCREAMING_SNAKE_CASE   )

										lowerCamelCase_			:				Any										=tokenizer.build_inputs_with_special_tokens(_SCREAMING_SNAKE_CASE   )
										lowerCamelCase_			:				Tuple										=tokenizer.build_inputs_with_special_tokens(_SCREAMING_SNAKE_CASE  ,			_SCREAMING_SNAKE_CASE   )

										assert encoded_sentence == encoded_text_from_decode
										assert encoded_pair == encoded_pair_from_decode


			def       UpperCAmelCase__		( self	:    List[Any]   ):
										lowerCamelCase_			:				Any										=self.get_tokenizer()

										lowerCamelCase_			:				Dict										="Encode this sequence."
										lowerCamelCase_			:				Dict										=tokenizer.byte_encoder[" ".encode("utf-8"   )[0]]

										# Testing encoder arguments
										lowerCamelCase_			:				int										=tokenizer.encode(_SCREAMING_SNAKE_CASE  ,			add_special_tokens=_SCREAMING_SNAKE_CASE  ,			add_prefix_space=_SCREAMING_SNAKE_CASE   )
										lowerCamelCase_			:				Dict										=tokenizer.convert_ids_to_tokens(encoded[0]   )[0]
										self.assertNotEqual(_SCREAMING_SNAKE_CASE  ,			_SCREAMING_SNAKE_CASE   )

										lowerCamelCase_			:				Any										=tokenizer.encode(_SCREAMING_SNAKE_CASE  ,			add_special_tokens=_SCREAMING_SNAKE_CASE  ,			add_prefix_space=_SCREAMING_SNAKE_CASE   )
										lowerCamelCase_			:				Union[str, Any]										=tokenizer.convert_ids_to_tokens(encoded[0]   )[0]
										self.assertEqual(_SCREAMING_SNAKE_CASE  ,			_SCREAMING_SNAKE_CASE   )

										tokenizer.add_special_tokens({"bos_token": "<s>"}   )
										lowerCamelCase_			:				int										=tokenizer.encode(_SCREAMING_SNAKE_CASE  ,			add_special_tokens=_SCREAMING_SNAKE_CASE   )
										lowerCamelCase_			:				Optional[int]										=tokenizer.convert_ids_to_tokens(encoded[1]   )[0]
										self.assertNotEqual(_SCREAMING_SNAKE_CASE  ,			_SCREAMING_SNAKE_CASE   )

										# Testing spaces after special tokens
										lowerCamelCase_			:				Optional[int]										="<mask>"
										tokenizer.add_special_tokens(
										    {"mask_token": AddedToken(_SCREAMING_SNAKE_CASE  ,			lstrip=_SCREAMING_SNAKE_CASE  ,			rstrip=_SCREAMING_SNAKE_CASE   )}   )  # mask token has a left space
										lowerCamelCase_			:				Dict										=tokenizer.convert_tokens_to_ids(_SCREAMING_SNAKE_CASE   )

										lowerCamelCase_			:				Optional[int]										="Encode <mask> sequence"
										lowerCamelCase_			:				Any										="Encode <mask>sequence"

										lowerCamelCase_			:				Tuple										=tokenizer.encode(_SCREAMING_SNAKE_CASE   )
										lowerCamelCase_			:				int										=encoded.index(_SCREAMING_SNAKE_CASE   )
										lowerCamelCase_			:				int										=tokenizer.convert_ids_to_tokens(encoded[mask_loc + 1]   )[0]
										self.assertEqual(_SCREAMING_SNAKE_CASE  ,			_SCREAMING_SNAKE_CASE   )

										lowerCamelCase_			:				Optional[int]										=tokenizer.encode(_SCREAMING_SNAKE_CASE   )
										lowerCamelCase_			:				Tuple										=encoded.index(_SCREAMING_SNAKE_CASE   )
										lowerCamelCase_			:				int										=tokenizer.convert_ids_to_tokens(encoded[mask_loc + 1]   )[0]
										self.assertNotEqual(_SCREAMING_SNAKE_CASE  ,			_SCREAMING_SNAKE_CASE   )


			def       UpperCAmelCase__		( self	:    Optional[Any]   ):
										pass


			def       UpperCAmelCase__		( self	:    List[Any]   ):

										for tokenizer, pretrained_name, kwargs in self.tokenizers_list:
																	with self.subTest(F"""{tokenizer.__class__.__name__} ({pretrained_name})"""   ):
																								lowerCamelCase_			:				List[Any]										=self.rust_tokenizer_class.from_pretrained(_SCREAMING_SNAKE_CASE  ,			**_SCREAMING_SNAKE_CASE   )
																								lowerCamelCase_			:				Tuple										=self.tokenizer_class.from_pretrained(_SCREAMING_SNAKE_CASE  ,			**_SCREAMING_SNAKE_CASE   )
																								lowerCamelCase_			:				Dict										="A, <mask> AllenNLP sentence."
																								lowerCamelCase_			:				Tuple										=tokenizer_r.encode_plus(_SCREAMING_SNAKE_CASE  ,			add_special_tokens=_SCREAMING_SNAKE_CASE  ,			return_token_type_ids=_SCREAMING_SNAKE_CASE   )
																								lowerCamelCase_			:				Optional[int]										=tokenizer_p.encode_plus(_SCREAMING_SNAKE_CASE  ,			add_special_tokens=_SCREAMING_SNAKE_CASE  ,			return_token_type_ids=_SCREAMING_SNAKE_CASE   )

																								# token_type_ids should put 0 everywhere
																								self.assertEqual(sum(tokens_r["token_type_ids"]   )  ,			sum(tokens_p["token_type_ids"]   )   )

																								# attention_mask should put 1 everywhere, so sum over length should be 1
																								self.assertEqual(
																								    sum(tokens_r["attention_mask"]   ) / len(tokens_r["attention_mask"]   )  ,			sum(tokens_p["attention_mask"]   ) / len(tokens_p["attention_mask"]   )  ,			)

																								lowerCamelCase_			:				str										=tokenizer_r.convert_ids_to_tokens(tokens_r["input_ids"]   )
																								lowerCamelCase_			:				Optional[int]										=tokenizer_p.convert_ids_to_tokens(tokens_p["input_ids"]   )

																								# Rust correctly handles the space before the mask while python doesnt
																								self.assertSequenceEqual(tokens_p["input_ids"]  ,			[0, 250, 6, 5_0264, 3823, 487, 2_1992, 3645, 4, 2]   )
																								self.assertSequenceEqual(tokens_r["input_ids"]  ,			[0, 250, 6, 5_0264, 3823, 487, 2_1992, 3645, 4, 2]   )

																								self.assertSequenceEqual(
																								    _SCREAMING_SNAKE_CASE  ,			["<s>", "A", ",", "<mask>", "ĠAllen", "N", "LP", "Ġsentence", ".", "</s>"]   )
																								self.assertSequenceEqual(
																								    _SCREAMING_SNAKE_CASE  ,			["<s>", "A", ",", "<mask>", "ĠAllen", "N", "LP", "Ġsentence", ".", "</s>"]   )


			def       UpperCAmelCase__		( self	:    Optional[Any]   ):

										for trim_offsets, add_prefix_space in itertools.product([True, False]  ,			repeat=2   ):
																	lowerCamelCase_			:				int										=self.rust_tokenizer_class.from_pretrained(
																	    self.tmpdirname  ,			use_fast=_SCREAMING_SNAKE_CASE  ,			add_prefix_space=_SCREAMING_SNAKE_CASE  ,			trim_offsets=_SCREAMING_SNAKE_CASE   )

																	lowerCamelCase_			:				List[str]										=json.loads(tokenizer_r.backend_tokenizer.pre_tokenizer.__getstate__()   )
																	lowerCamelCase_			:				Tuple										=json.loads(tokenizer_r.backend_tokenizer.post_processor.__getstate__()   )

																	self.assertEqual(pre_tokenizer_state["add_prefix_space"]  ,			_SCREAMING_SNAKE_CASE   )

																	self.assertEqual(post_processor_state["add_prefix_space"]  ,			_SCREAMING_SNAKE_CASE   )
																	self.assertEqual(post_processor_state["trim_offsets"]  ,			_SCREAMING_SNAKE_CASE   )


			def       UpperCAmelCase__		( self	:    List[Any]   ):

										for tokenizer, pretrained_name, kwargs in self.tokenizers_list:
																	with self.subTest(F"""{tokenizer.__class__.__name__} ({pretrained_name})"""   ):
																								lowerCamelCase_			:				Union[str, Any]										="hello"  # `hello` is a token in the vocabulary of `pretrained_name`
																								lowerCamelCase_			:				Union[str, Any]										=F"""{text_of_1_token} {text_of_1_token}"""

																								lowerCamelCase_			:				Any										=self.rust_tokenizer_class.from_pretrained(
																								    _SCREAMING_SNAKE_CASE  ,			use_fast=_SCREAMING_SNAKE_CASE  ,			add_prefix_space=_SCREAMING_SNAKE_CASE  ,			trim_offsets=_SCREAMING_SNAKE_CASE   )
																								lowerCamelCase_			:				List[str]										=tokenizer_r(_SCREAMING_SNAKE_CASE  ,			return_offsets_mapping=_SCREAMING_SNAKE_CASE  ,			add_special_tokens=_SCREAMING_SNAKE_CASE   )
																								self.assertEqual(encoding.offset_mapping[0]  ,			(0, len(_SCREAMING_SNAKE_CASE   ))   )
																								self.assertEqual(
																								    encoding.offset_mapping[1]  ,			(len(_SCREAMING_SNAKE_CASE   ) + 1, len(_SCREAMING_SNAKE_CASE   ) + 1 + len(_SCREAMING_SNAKE_CASE   ))  ,			)

																								lowerCamelCase_			:				Dict										=self.rust_tokenizer_class.from_pretrained(
																								    _SCREAMING_SNAKE_CASE  ,			use_fast=_SCREAMING_SNAKE_CASE  ,			add_prefix_space=_SCREAMING_SNAKE_CASE  ,			trim_offsets=_SCREAMING_SNAKE_CASE   )
																								lowerCamelCase_			:				Optional[int]										=tokenizer_r(_SCREAMING_SNAKE_CASE  ,			return_offsets_mapping=_SCREAMING_SNAKE_CASE  ,			add_special_tokens=_SCREAMING_SNAKE_CASE   )
																								self.assertEqual(encoding.offset_mapping[0]  ,			(0, len(_SCREAMING_SNAKE_CASE   ))   )
																								self.assertEqual(
																								    encoding.offset_mapping[1]  ,			(len(_SCREAMING_SNAKE_CASE   ) + 1, len(_SCREAMING_SNAKE_CASE   ) + 1 + len(_SCREAMING_SNAKE_CASE   ))  ,			)

																								lowerCamelCase_			:				Union[str, Any]										=self.rust_tokenizer_class.from_pretrained(
																								    _SCREAMING_SNAKE_CASE  ,			use_fast=_SCREAMING_SNAKE_CASE  ,			add_prefix_space=_SCREAMING_SNAKE_CASE  ,			trim_offsets=_SCREAMING_SNAKE_CASE   )
																								lowerCamelCase_			:				Any										=tokenizer_r(_SCREAMING_SNAKE_CASE  ,			return_offsets_mapping=_SCREAMING_SNAKE_CASE  ,			add_special_tokens=_SCREAMING_SNAKE_CASE   )
																								self.assertEqual(encoding.offset_mapping[0]  ,			(0, len(_SCREAMING_SNAKE_CASE   ))   )
																								self.assertEqual(
																								    encoding.offset_mapping[1]  ,			(len(_SCREAMING_SNAKE_CASE   ), len(_SCREAMING_SNAKE_CASE   ) + 1 + len(_SCREAMING_SNAKE_CASE   ))  ,			)

																								lowerCamelCase_			:				Optional[int]										=self.rust_tokenizer_class.from_pretrained(
																								    _SCREAMING_SNAKE_CASE  ,			use_fast=_SCREAMING_SNAKE_CASE  ,			add_prefix_space=_SCREAMING_SNAKE_CASE  ,			trim_offsets=_SCREAMING_SNAKE_CASE   )
																								lowerCamelCase_			:				List[Any]										=tokenizer_r(_SCREAMING_SNAKE_CASE  ,			return_offsets_mapping=_SCREAMING_SNAKE_CASE  ,			add_special_tokens=_SCREAMING_SNAKE_CASE   )
																								self.assertEqual(encoding.offset_mapping[0]  ,			(0, len(_SCREAMING_SNAKE_CASE   ))   )
																								self.assertEqual(
																								    encoding.offset_mapping[1]  ,			(len(_SCREAMING_SNAKE_CASE   ), len(_SCREAMING_SNAKE_CASE   ) + 1 + len(_SCREAMING_SNAKE_CASE   ))  ,			)

																								lowerCamelCase_			:				Dict										=F""" {text}"""

																								# tokenizer_r = self.rust_tokenizer_class.from_pretrained(
																								#     pretrained_name, use_fast=True, add_prefix_space=True, trim_offsets=True
																								# )
																								# encoding = tokenizer_r(text, return_offsets_mapping=True, add_special_tokens=False)
																								# self.assertEqual(encoding.offset_mapping[0], (1, 1 + len(text_of_1_token)))
																								# self.assertEqual(
																								#     encoding.offset_mapping[1],
																								#     (1 + len(text_of_1_token) + 1, 1 + len(text_of_1_token) + 1 + len(text_of_1_token)),
																								# )

																								lowerCamelCase_			:				str										=self.rust_tokenizer_class.from_pretrained(
																								    _SCREAMING_SNAKE_CASE  ,			use_fast=_SCREAMING_SNAKE_CASE  ,			add_prefix_space=_SCREAMING_SNAKE_CASE  ,			trim_offsets=_SCREAMING_SNAKE_CASE   )
																								lowerCamelCase_			:				Union[str, Any]										=tokenizer_r(_SCREAMING_SNAKE_CASE  ,			return_offsets_mapping=_SCREAMING_SNAKE_CASE  ,			add_special_tokens=_SCREAMING_SNAKE_CASE   )
																								self.assertEqual(encoding.offset_mapping[0]  ,			(1, 1 + len(_SCREAMING_SNAKE_CASE   ))   )
																								self.assertEqual(
																								    encoding.offset_mapping[1]  ,			(1 + len(_SCREAMING_SNAKE_CASE   ) + 1, 1 + len(_SCREAMING_SNAKE_CASE   ) + 1 + len(_SCREAMING_SNAKE_CASE   ))  ,			)

																								lowerCamelCase_			:				Dict										=self.rust_tokenizer_class.from_pretrained(
																								    _SCREAMING_SNAKE_CASE  ,			use_fast=_SCREAMING_SNAKE_CASE  ,			add_prefix_space=_SCREAMING_SNAKE_CASE  ,			trim_offsets=_SCREAMING_SNAKE_CASE   )
																								lowerCamelCase_			:				Any										=tokenizer_r(_SCREAMING_SNAKE_CASE  ,			return_offsets_mapping=_SCREAMING_SNAKE_CASE  ,			add_special_tokens=_SCREAMING_SNAKE_CASE   )
																								self.assertEqual(encoding.offset_mapping[0]  ,			(0, 1 + len(_SCREAMING_SNAKE_CASE   ))   )
																								self.assertEqual(
																								    encoding.offset_mapping[1]  ,			(1 + len(_SCREAMING_SNAKE_CASE   ), 1 + len(_SCREAMING_SNAKE_CASE   ) + 1 + len(_SCREAMING_SNAKE_CASE   ))  ,			)

																								lowerCamelCase_			:				Tuple										=self.rust_tokenizer_class.from_pretrained(
																								    _SCREAMING_SNAKE_CASE  ,			use_fast=_SCREAMING_SNAKE_CASE  ,			add_prefix_space=_SCREAMING_SNAKE_CASE  ,			trim_offsets=_SCREAMING_SNAKE_CASE   )
																								lowerCamelCase_			:				Optional[int]										=tokenizer_r(_SCREAMING_SNAKE_CASE  ,			return_offsets_mapping=_SCREAMING_SNAKE_CASE  ,			add_special_tokens=_SCREAMING_SNAKE_CASE   )
																								self.assertEqual(encoding.offset_mapping[0]  ,			(0, 1 + len(_SCREAMING_SNAKE_CASE   ))   )
																								self.assertEqual(
																								    encoding.offset_mapping[1]  ,			(1 + len(_SCREAMING_SNAKE_CASE   ), 1 + len(_SCREAMING_SNAKE_CASE   ) + 1 + len(_SCREAMING_SNAKE_CASE   ))  ,			)








"""simple docstring"""






from ...configuration_utils import PretrainedConfig
from ...utils import logging


__snake_case				:  Dict =       logging.get_logger(__name__)

__snake_case				:  int =       {
    'uclanlp/visualbert-vqa': 'https://huggingface.co/uclanlp/visualbert-vqa/resolve/main/config.json',
    'uclanlp/visualbert-vqa-pre': 'https://huggingface.co/uclanlp/visualbert-vqa-pre/resolve/main/config.json',
    'uclanlp/visualbert-vqa-coco-pre': (
        'https://huggingface.co/uclanlp/visualbert-vqa-coco-pre/resolve/main/config.json'
    ),
    'uclanlp/visualbert-vcr': 'https://huggingface.co/uclanlp/visualbert-vcr/resolve/main/config.json',
    'uclanlp/visualbert-vcr-pre': 'https://huggingface.co/uclanlp/visualbert-vcr-pre/resolve/main/config.json',
    'uclanlp/visualbert-vcr-coco-pre': (
        'https://huggingface.co/uclanlp/visualbert-vcr-coco-pre/resolve/main/config.json'
    ),
    'uclanlp/visualbert-nlvr2': 'https://huggingface.co/uclanlp/visualbert-nlvr2/resolve/main/config.json',
    'uclanlp/visualbert-nlvr2-pre': 'https://huggingface.co/uclanlp/visualbert-nlvr2-pre/resolve/main/config.json',
    'uclanlp/visualbert-nlvr2-coco-pre': (
        'https://huggingface.co/uclanlp/visualbert-nlvr2-coco-pre/resolve/main/config.json'
    )
    # See all VisualBERT models at https://huggingface.co/models?filter=visual_bert
}



class      A__  (    __SCREAMING_SNAKE_CASE				):




	'''simple docstring'''





	SCREAMING_SNAKE_CASE        =      'visual_bert'

	def __init__(	self:						int			,     _SCREAMING_SNAKE_CASE:						Dict=3_0522			,     _SCREAMING_SNAKE_CASE:						Union[str, Any]=768			,     _SCREAMING_SNAKE_CASE:						List[str]=512			,     _SCREAMING_SNAKE_CASE:						Optional[int]=12			,     _SCREAMING_SNAKE_CASE:						List[str]=12			,     _SCREAMING_SNAKE_CASE:						Tuple=3072			,     _SCREAMING_SNAKE_CASE:						Union[str, Any]="gelu"			,     _SCREAMING_SNAKE_CASE:						Tuple=0.1			,     _SCREAMING_SNAKE_CASE:						str=0.1			,     _SCREAMING_SNAKE_CASE:						List[Any]=512			,     _SCREAMING_SNAKE_CASE:						Any=2			,     _SCREAMING_SNAKE_CASE:						Optional[int]=0.02			,     _SCREAMING_SNAKE_CASE:						Union[str, Any]=1e-12			,     _SCREAMING_SNAKE_CASE:						List[str]=False			,     _SCREAMING_SNAKE_CASE:						int=True			,     _SCREAMING_SNAKE_CASE:						str=1			,     _SCREAMING_SNAKE_CASE:						Tuple=0			,     _SCREAMING_SNAKE_CASE:						Any=2			,     **_SCREAMING_SNAKE_CASE:						List[str]			,     )							->			str:

				"""simple docstring"""

				super().__init__(pad_token_id=_SCREAMING_SNAKE_CASE			,     bos_token_id=_SCREAMING_SNAKE_CASE			,     eos_token_id=_SCREAMING_SNAKE_CASE			,     **_SCREAMING_SNAKE_CASE)

				__lowerCAmelCase :    str				=			vocab_size
				__lowerCAmelCase :    Tuple				=			max_position_embeddings
				__lowerCAmelCase :    Any				=			hidden_size
				__lowerCAmelCase :    Union[str, Any]				=			visual_embedding_dim
				__lowerCAmelCase :    List[str]				=			num_hidden_layers
				__lowerCAmelCase :    Optional[int]				=			num_attention_heads
				__lowerCAmelCase :    str				=			intermediate_size
				__lowerCAmelCase :    int				=			hidden_act
				__lowerCAmelCase :    Union[str, Any]				=			hidden_dropout_prob
				__lowerCAmelCase :    int				=			attention_probs_dropout_prob
				__lowerCAmelCase :    List[Any]				=			initializer_range
				__lowerCAmelCase :    Dict				=			type_vocab_size
				__lowerCAmelCase :    Optional[int]				=			layer_norm_eps
				__lowerCAmelCase :    Union[str, Any]				=			bypass_transformer
				__lowerCAmelCase :    List[str]				=			special_visual_initialize