from collections import OrderedDict
from typing import Mapping

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


lowerCAmelCase__	:  Union[str, Any]						=  logging.get_logger(__name__)

lowerCAmelCase__	:  Any						=  {
    '''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 					__snake_case    (     _lowercase      ):
					__lowerCamelCase			   =  """ernie"""




					def __init__(  self       ,			__UpperCamelCase=30522       ,			__UpperCamelCase=768       ,			__UpperCamelCase=12       ,			__UpperCamelCase=12       ,			__UpperCamelCase=3072       ,			__UpperCamelCase="gelu"       ,			__UpperCamelCase=0.1       ,			__UpperCamelCase=0.1       ,			__UpperCamelCase=512       ,			__UpperCamelCase=2       ,			__UpperCamelCase=3       ,			__UpperCamelCase=False       ,			__UpperCamelCase=0.0_2       ,			__UpperCamelCase=1E-12       ,			__UpperCamelCase=0       ,			__UpperCamelCase="absolute"       ,			__UpperCamelCase=True       ,			__UpperCamelCase=None       ,			**__UpperCamelCase       ,			)	->    str:



									'''simple docstring'''







									super().__init__(pad_token_id=__lowerCAmelCase       ,			**__lowerCAmelCase						)

									snake_case__   :      Any   				= vocab_size
									snake_case__   :      Tuple   				= hidden_size
									snake_case__   :      Optional[int]   				= num_hidden_layers
									snake_case__   :      int   				= num_attention_heads
									snake_case__   :      Optional[Any]   				= hidden_act
									snake_case__   :      Optional[int]   				= intermediate_size
									snake_case__   :      Any   				= hidden_dropout_prob
									snake_case__   :      int   				= attention_probs_dropout_prob
									snake_case__   :      int   				= max_position_embeddings
									snake_case__   :      Union[str, Any]   				= type_vocab_size
									snake_case__   :      List[Any]   				= task_type_vocab_size
									snake_case__   :      List[Any]   				= use_task_id
									snake_case__   :      Optional[Any]   				= initializer_range
									snake_case__   :      Tuple   				= layer_norm_eps
									snake_case__   :      Union[str, Any]   				= position_embedding_type
									snake_case__   :      List[str]   				= use_cache
									snake_case__   :      int   				= classifier_dropout





class 					__snake_case    (     _lowercase      ):




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



									'''simple docstring'''







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









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


__lowerCAmelCase 	=      logging.get_logger(__name__)

__lowerCAmelCase 	=      {
    "MCG-NJU/videomae-base": "https://huggingface.co/MCG-NJU/videomae-base/resolve/main/config.json",
}




class 	_UpperCAmelCase						( _lowercase       ):
					__A        = "videomae"




					def __init__(    self     ,   __lowerCAmelCase=224     ,   __lowerCAmelCase=16     ,   __lowerCAmelCase=3     ,   __lowerCAmelCase=16     ,   __lowerCAmelCase=2     ,   __lowerCAmelCase=768     ,   __lowerCAmelCase=12     ,   __lowerCAmelCase=12     ,   __lowerCAmelCase=3_072     ,   __lowerCAmelCase="gelu"     ,   __lowerCAmelCase=0.0     ,   __lowerCAmelCase=0.0     ,   __lowerCAmelCase=0.0_2     ,   __lowerCAmelCase=1E-1_2     ,   __lowerCAmelCase=True     ,   __lowerCAmelCase=True     ,   __lowerCAmelCase=6     ,   __lowerCAmelCase=384     ,   __lowerCAmelCase=4     ,   __lowerCAmelCase=1_536     ,   __lowerCAmelCase=True     ,   **__lowerCAmelCase     ,   )    ->	Any:
							super().__init__(**__lowerCAmelCase							)

							UpperCamelCase__								=						image_size
							UpperCamelCase__								=						patch_size
							UpperCamelCase__								=						num_channels
							UpperCamelCase__								=						num_frames
							UpperCamelCase__								=						tubelet_size

							UpperCamelCase__								=						hidden_size
							UpperCamelCase__								=						num_hidden_layers
							UpperCamelCase__								=						num_attention_heads
							UpperCamelCase__								=						intermediate_size
							UpperCamelCase__								=						hidden_act
							UpperCamelCase__								=						hidden_dropout_prob
							UpperCamelCase__								=						attention_probs_dropout_prob
							UpperCamelCase__								=						initializer_range
							UpperCamelCase__								=						layer_norm_eps
							UpperCamelCase__								=						qkv_bias
							UpperCamelCase__								=						use_mean_pooling

							UpperCamelCase__								=						decoder_num_attention_heads
							UpperCamelCase__								=						decoder_hidden_size
							UpperCamelCase__								=						decoder_num_hidden_layers
							UpperCamelCase__								=						decoder_intermediate_size
							UpperCamelCase__								=						norm_pix_loss





