"""simple docstring"""




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__lowerCamelCase									=	{"configuration_umt5": ["UMT5Config", "UMT5OnnxConfig"]}


try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				__lowerCamelCase									=	[
				    "UMT5EncoderModel",
				    "UMT5ForConditionalGeneration",
				    "UMT5ForQuestionAnswering",
				    "UMT5Model",
				    "UMT5PreTrainedModel",
				]

if TYPE_CHECKING:
				from .configuration_umta import UMTaConfig, UMTaOnnxConfig

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_umta import (
								    UMTaEncoderModel,
								    UMTaForConditionalGeneration,
								    UMTaForQuestionAnswering,
								    UMTaModel,
								    UMTaPreTrainedModel,
								)
else:
				import sys

				__lowerCamelCase									=	_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)






"""simple docstring"""




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


__lowerCamelCase									=	logging.get_logger(__name__)

__lowerCamelCase									=	{
    "dandelin/vilt-b32-mlm": "https://huggingface.co/dandelin/vilt-b32-mlm/blob/main/config.json"
}
class      UpperCamelCase__(      __A			):
						lowerCAmelCase__	:    str    				=		'vilt'





						def __init__(							self		,__UpperCAmelCase=3_05_22		,__UpperCAmelCase=2		,__UpperCAmelCase=2		,__UpperCAmelCase=40		,__UpperCAmelCase=7_68		,__UpperCAmelCase=12		,__UpperCAmelCase=12		,__UpperCAmelCase=30_72		,__UpperCAmelCase="gelu"		,__UpperCAmelCase=0.0		,__UpperCAmelCase=0.0		,__UpperCAmelCase=0.0_2		,__UpperCAmelCase=1e-12		,__UpperCAmelCase=3_84		,__UpperCAmelCase=32		,__UpperCAmelCase=3		,__UpperCAmelCase=True		,__UpperCAmelCase=-1		,__UpperCAmelCase=False		,__UpperCAmelCase=-1		,**__UpperCAmelCase		,)       ->					Tuple:
													super().__init__(tie_word_embeddings=__UpperCAmelCase		,**__UpperCAmelCase  )

													A__						  =				vocab_size
													A__						  =				type_vocab_size
													A__						  =				modality_type_vocab_size
													A__						  =				max_position_embeddings

													A__						  =				hidden_size
													A__						  =				num_hidden_layers
													A__						  =				num_attention_heads
													A__						  =				intermediate_size
													A__						  =				hidden_act
													A__						  =				hidden_dropout_prob
													A__						  =				attention_probs_dropout_prob
													A__						  =				initializer_range
													A__						  =				layer_norm_eps

													A__						  =				image_size
													A__						  =				patch_size
													A__						  =				num_channels
													A__						  =				qkv_bias
													A__						  =				max_image_length
													A__						  =				num_images





