


'''simple docstring'''





from collections import OrderedDict
from typing import Mapping

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


UpperCAmelCase__      =							logging.get_logger(__name__)

UpperCAmelCase__      =							{
    '''nghuyong/ernie-1.0-base-zh''': '''https://huggingface.co/nghuyong/ernie-1.0-base-zh/resolve/main/config.json''',
    '''nghuyong/ernie-2.0-base-en''': '''https://huggingface.co/nghuyong/ernie-2.0-base-en/resolve/main/config.json''',
    '''nghuyong/ernie-2.0-large-en''': '''https://huggingface.co/nghuyong/ernie-2.0-large-en/resolve/main/config.json''',
    '''nghuyong/ernie-3.0-base-zh''': '''https://huggingface.co/nghuyong/ernie-3.0-base-zh/resolve/main/config.json''',
    '''nghuyong/ernie-3.0-medium-zh''': '''https://huggingface.co/nghuyong/ernie-3.0-medium-zh/resolve/main/config.json''',
    '''nghuyong/ernie-3.0-mini-zh''': '''https://huggingface.co/nghuyong/ernie-3.0-mini-zh/resolve/main/config.json''',
    '''nghuyong/ernie-3.0-micro-zh''': '''https://huggingface.co/nghuyong/ernie-3.0-micro-zh/resolve/main/config.json''',
    '''nghuyong/ernie-3.0-nano-zh''': '''https://huggingface.co/nghuyong/ernie-3.0-nano-zh/resolve/main/config.json''',
    '''nghuyong/ernie-gram-zh''': '''https://huggingface.co/nghuyong/ernie-gram-zh/resolve/main/config.json''',
    '''nghuyong/ernie-health-zh''': '''https://huggingface.co/nghuyong/ernie-health-zh/resolve/main/config.json''',
}
class 	a__				(				A__      ):





   '''simple docstring'''

   A	:							int							= '''ernie'''
   def __init__(     self       : Any ,						lowerCAmelCase_       : Optional[Any]=30_522 ,						lowerCAmelCase_       : Dict=768 ,						lowerCAmelCase_       : int=12 ,						lowerCAmelCase_       : Tuple=12 ,						lowerCAmelCase_       : Optional[int]=3_072 ,						lowerCAmelCase_       : int="gelu" ,						lowerCAmelCase_       : Union[str, Any]=0.1 ,						lowerCAmelCase_       : List[Any]=0.1 ,						lowerCAmelCase_       : Union[str, Any]=512 ,						lowerCAmelCase_       : Optional[Any]=2 ,						lowerCAmelCase_       : Union[str, Any]=3 ,						lowerCAmelCase_       : List[Any]=False ,						lowerCAmelCase_       : Union[str, Any]=0.02 ,						lowerCAmelCase_       : int=1E-12 ,						lowerCAmelCase_       : List[Any]=0 ,						lowerCAmelCase_       : Any="absolute" ,						lowerCAmelCase_       : List[Any]=True ,						lowerCAmelCase_       : Dict=None ,						**lowerCAmelCase_       : Any ,						)			->		Any:
      super().__init__(pad_token_id=lowerCAmelCase_ ,						**lowerCAmelCase_  )

      __A=  vocab_size
      __A=  hidden_size
      __A=  num_hidden_layers
      __A=  num_attention_heads
      __A=  hidden_act
      __A=  intermediate_size
      __A=  hidden_dropout_prob
      __A=  attention_probs_dropout_prob
      __A=  max_position_embeddings
      __A=  type_vocab_size
      __A=  task_type_vocab_size
      __A=  use_task_id
      __A=  initializer_range
      __A=  layer_norm_eps
      __A=  position_embedding_type
      __A=  use_cache
      __A=  classifier_dropout


class 	a__				(				A__      ):





   '''simple docstring'''

   @property
   def 				lowerCAmelCase    (     self       : Any  )			->		List[Any]:






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







'''simple docstring'''





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


UpperCAmelCase__      =							logging.get_logger(__name__)

UpperCAmelCase__      =							{
    '''dandelin/vilt-b32-mlm''': '''https://huggingface.co/dandelin/vilt-b32-mlm/blob/main/config.json'''
}
class 	a__				(				a_      ):





			'''simple docstring'''

			A	:							Dict							= '''vilt'''
			def __init__(     self       : str ,						lowerCAmelCase_       : Tuple=30_522 ,						lowerCAmelCase_       : List[Any]=2 ,						lowerCAmelCase_       : Optional[Any]=2 ,						lowerCAmelCase_       : Union[str, Any]=40 ,						lowerCAmelCase_       : str=768 ,						lowerCAmelCase_       : Tuple=12 ,						lowerCAmelCase_       : List[Any]=12 ,						lowerCAmelCase_       : int=3_072 ,						lowerCAmelCase_       : List[Any]="gelu" ,						lowerCAmelCase_       : int=0.0 ,						lowerCAmelCase_       : str=0.0 ,						lowerCAmelCase_       : Optional[Any]=0.02 ,						lowerCAmelCase_       : Union[str, Any]=1E-12 ,						lowerCAmelCase_       : Dict=384 ,						lowerCAmelCase_       : Optional[int]=32 ,						lowerCAmelCase_       : Optional[Any]=3 ,						lowerCAmelCase_       : str=True ,						lowerCAmelCase_       : List[Any]=-1 ,						lowerCAmelCase_       : Union[str, Any]=False ,						lowerCAmelCase_       : str=-1 ,						**lowerCAmelCase_       : Any ,						)			->		Tuple:
						super().__init__(tie_word_embeddings=lowerCAmelCase_ ,						**lowerCAmelCase_  )

						__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



