




'''simple docstring'''







from collections import OrderedDict
from typing import Mapping

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


_lowerCamelCase							:						Tuple								=  logging.get_logger(__name__)

_lowerCamelCase							:						Dict								=  {
    'mnaylor/mega-base-wikitext': 'https://huggingface.co/mnaylor/mega-base-wikitext/resolve/main/config.json',
}





class      lowerCamelCase_							(       UpperCAmelCase_							):




					'''simple docstring'''






					lowercase__    = """mega"""






					def __init__(    self,  __UpperCamelCase=30_522,  __UpperCamelCase=128,  __UpperCamelCase=4,  __UpperCamelCase=256,  __UpperCamelCase=16,  __UpperCamelCase=True,  __UpperCamelCase=64,  __UpperCamelCase=False,  __UpperCamelCase=-1,  __UpperCamelCase=None,  __UpperCamelCase=True,  __UpperCamelCase="scalenorm",  __UpperCamelCase=True,  __UpperCamelCase="silu",  __UpperCamelCase="softmax",  __UpperCamelCase=0.1,  __UpperCamelCase=0.1,  __UpperCamelCase=0.1,  __UpperCamelCase=False,  __UpperCamelCase=True,  __UpperCamelCase=256,  __UpperCamelCase=True,  __UpperCamelCase=0.1,  __UpperCamelCase=2_048,  __UpperCamelCase=False,  __UpperCamelCase=2,  __UpperCamelCase=0.02,  __UpperCamelCase=0.2,  __UpperCamelCase=0.02,  __UpperCamelCase=1.0,  __UpperCamelCase=1,  __UpperCamelCase=0,  __UpperCamelCase=2,  __UpperCamelCase="rotary",  __UpperCamelCase=None,  __UpperCamelCase=True,  __UpperCamelCase=True,  **__UpperCamelCase,  ):
							super().__init__(pad_token_id=__UpperCamelCase,  bos_token_id=__UpperCamelCase,  eos_token_id=__UpperCamelCase,  **__UpperCamelCase )

							_snake_case	       =       vocab_size
							_snake_case	       =       hidden_size
							_snake_case	       =       num_hidden_layers
							_snake_case	       =       activation
							_snake_case	       =       attention_activation
							_snake_case	       =       intermediate_size
							_snake_case	       =       ema_projection_size
							_snake_case	       =       bidirectional
							_snake_case	       =       shared_representation_size
							_snake_case	       =       use_chunking
							_snake_case	       =       chunk_size
							_snake_case	       =       truncation
							_snake_case	       =       normalize_before_mega
							_snake_case	       =       normalization_type
							_snake_case	       =       norm_affine
							_snake_case	       =       dropout_prob
							_snake_case	       =       hidden_dropout_prob
							_snake_case	       =       attention_probs_dropout_prob
							_snake_case	       =       use_feature_dropout
							_snake_case	       =       use_normalized_ffn
							_snake_case	       =       nffn_hidden_size
							_snake_case	       =       normalize_before_ffn
							_snake_case	       =       nffn_activation_dropout_prob
							_snake_case	       =       max_positions
							_snake_case	       =       add_token_type_embeddings
							_snake_case	       =       type_vocab_size
							_snake_case	       =       initializer_range
							_snake_case	       =       ema_delta_alpha_range
							_snake_case	       =       ema_beta_range
							_snake_case	       =       ema_gamma_omega_range
							_snake_case	       =       relative_positional_bias
							_snake_case	       =       use_cache
							_snake_case	       =       classifier_dropout
							_snake_case	       =       add_lm_hidden_dense_layer
							_snake_case	       =       1  # not used but required by Hugging Face





class      lowerCamelCase_							(       UpperCAmelCase_							):




					'''simple docstring'''






					@property
					def 				__SCREAMING_SNAKE_CASE	(    self ):
							if self.task == "multiple-choice":
									_snake_case	       =       {0: "batch", 1: "choice", 2: "sequence"}
							else:
									_snake_case	       =       {0: "batch", 1: "sequence"}
							return OrderedDict(
							    [
							        ("input_ids", dynamic_axis),
							        ("attention_mask", dynamic_axis),
							    ] )











from collections import OrderedDict
from typing import Mapping

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


_lowerCamelCase					:     Optional[int]					  =  logging.get_logger(__name__)

_lowerCamelCase					:     Optional[int]					  =  {
    "squeezebert/squeezebert-uncased": (
        "https://huggingface.co/squeezebert/squeezebert-uncased/resolve/main/config.json"
    ),
    "squeezebert/squeezebert-mnli": "https://huggingface.co/squeezebert/squeezebert-mnli/resolve/main/config.json",
    "squeezebert/squeezebert-mnli-headless": (
        "https://huggingface.co/squeezebert/squeezebert-mnli-headless/resolve/main/config.json"
    ),
}
class 				__snake_case     (_a						):
				lowerCAmelCase__			=   SQUEEZEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
				lowerCAmelCase__			=   "squeezebert"



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





								'''simple docstring'''




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

								_lowerCAmelCase			:			Optional[Any]        =					vocab_size
								_lowerCAmelCase			:			Optional[Any]        =					hidden_size
								_lowerCAmelCase			:			Tuple        =					num_hidden_layers
								_lowerCAmelCase			:			int        =					num_attention_heads
								_lowerCAmelCase			:			List[Any]        =					hidden_act
								_lowerCAmelCase			:			List[Any]        =					intermediate_size
								_lowerCAmelCase			:			List[str]        =					hidden_dropout_prob
								_lowerCAmelCase			:			Any        =					attention_probs_dropout_prob
								_lowerCAmelCase			:			str        =					max_position_embeddings
								_lowerCAmelCase			:			int        =					type_vocab_size
								_lowerCAmelCase			:			str        =					initializer_range
								_lowerCAmelCase			:			int        =					layer_norm_eps
								_lowerCAmelCase			:			int        =					embedding_size
								_lowerCAmelCase			:			Optional[int]        =					q_groups
								_lowerCAmelCase			:			List[Any]        =					k_groups
								_lowerCAmelCase			:			List[Any]        =					v_groups
								_lowerCAmelCase			:			Dict        =					post_attention_groups
								_lowerCAmelCase			:			Optional[Any]        =					intermediate_groups
								_lowerCAmelCase			:			str        =					output_groups






class 				__snake_case     (_a						):



				@property
				def 					SCREAMING_SNAKE_CASE				(					self					:						Union[str, Any]					)     ->			Mapping[str, Mapping[int, str]]:





								'''simple docstring'''




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

