


"""simple docstring"""







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_torch_available


lowerCamelCase_     :     Dict    		=						{
    """configuration_xlm_prophetnet""": ["""XLM_PROPHETNET_PRETRAINED_CONFIG_ARCHIVE_MAP""", """XLMProphetNetConfig"""],
}

try:
       if not is_sentencepiece_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowerCamelCase_     :     Tuple    		=						["""XLMProphetNetTokenizer"""]

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowerCamelCase_     :     List[Any]    		=						[
           """XLM_PROPHETNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
           """XLMProphetNetDecoder""",
           """XLMProphetNetEncoder""",
           """XLMProphetNetForCausalLM""",
           """XLMProphetNetForConditionalGeneration""",
           """XLMProphetNetModel""",
           """XLMProphetNetPreTrainedModel""",
       ]


if TYPE_CHECKING:
       from .configuration_xlm_prophetnet import XLM_PROPHETNET_PRETRAINED_CONFIG_ARCHIVE_MAP, XLMProphetNetConfig

       try:
              if not is_sentencepiece_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_xlm_prophetnet import XLMProphetNetTokenizer

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_xlm_prophetnet import (
                  XLM_PROPHETNET_PRETRAINED_MODEL_ARCHIVE_LIST,
                  XLMProphetNetDecoder,
                  XLMProphetNetEncoder,
                  XLMProphetNetForCausalLM,
                  XLMProphetNetForConditionalGeneration,
                  XLMProphetNetModel,
                  XLMProphetNetPreTrainedModel,
              )

else:
       import sys

       lowerCamelCase_     :     Dict    		=						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



"""simple docstring"""







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


lowerCamelCase_     :     int    		=						logging.get_logger(__name__)

lowerCamelCase_     :     Optional[Any]    		=						{
    """dandelin/vilt-b32-mlm""": """https://huggingface.co/dandelin/vilt-b32-mlm/blob/main/config.json"""
}






class    __A       ( _SCREAMING_SNAKE_CASE    ):






 """simple docstring"""




 __lowerCAmelCase				      =						"vilt"


 def __init__(	self				,					__A=3_0522				,					__A=2				,					__A=2				,					__A=40				,					__A=768				,					__A=12				,					__A=12				,					__A=3072				,					__A="gelu"				,					__A=0.0				,					__A=0.0				,					__A=0.02				,					__A=1E-1_2				,					__A=384				,					__A=32				,					__A=3				,					__A=True				,					__A=-1				,					__A=False				,					__A=-1				,					**__A				,					)      ->  Dict:
     super().__init__(tie_word_embeddings=__A				,					**__A		)

     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