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 :     Dict          =  {
    '''mnaylor/mega-base-wikitext''': '''https://huggingface.co/mnaylor/mega-base-wikitext/resolve/main/config.json''',
}






class 		a__						( A__ ):
					A     	=							'mega'

					def __init__(   self				:	Union[str, Any],_A				:	Tuple=3_0522,_A				:	Optional[int]=128,_A				:	str=4,_A				:	Union[str, Any]=256,_A				:	Tuple=16,_A				:	List[Any]=True,_A				:	Union[str, Any]=64,_A				:	List[str]=False,_A				:	Any=-1,_A				:	List[str]=None,_A				:	Tuple=True,_A				:	str="scalenorm",_A				:	Optional[Any]=True,_A				:	Any="silu",_A				:	Any="softmax",_A				:	List[str]=0.1,_A				:	Optional[Any]=0.1,_A				:	List[str]=0.1,_A				:	str=False,_A				:	str=True,_A				:	Union[str, Any]=256,_A				:	str=True,_A				:	int=0.1,_A				:	Optional[int]=2048,_A				:	Optional[int]=False,_A				:	List[str]=2,_A				:	Optional[Any]=0.02,_A				:	Union[str, Any]=0.2,_A				:	int=0.02,_A				:	List[str]=1.0,_A				:	Union[str, Any]=1,_A				:	Optional[int]=0,_A				:	List[Any]=2,_A				:	Any="rotary",_A				:	Tuple=None,_A				:	int=True,_A				:	Tuple=True,**_A				:	Optional[int],):







							"""simple docstring"""






							super().__init__(pad_token_id=_A,bos_token_id=_A,eos_token_id=_A,**_A   )

							SCREAMING_SNAKE_CASE_  :		Optional[int]    				=   vocab_size
							SCREAMING_SNAKE_CASE_  :		Any    				=   hidden_size
							SCREAMING_SNAKE_CASE_  :		List[Any]    				=   num_hidden_layers
							SCREAMING_SNAKE_CASE_  :		int    				=   activation
							SCREAMING_SNAKE_CASE_  :		List[Any]    				=   attention_activation
							SCREAMING_SNAKE_CASE_  :		str    				=   intermediate_size
							SCREAMING_SNAKE_CASE_  :		Dict    				=   ema_projection_size
							SCREAMING_SNAKE_CASE_  :		Optional[Any]    				=   bidirectional
							SCREAMING_SNAKE_CASE_  :		Optional[Any]    				=   shared_representation_size
							SCREAMING_SNAKE_CASE_  :		str    				=   use_chunking
							SCREAMING_SNAKE_CASE_  :		Optional[int]    				=   chunk_size
							SCREAMING_SNAKE_CASE_  :		List[str]    				=   truncation
							SCREAMING_SNAKE_CASE_  :		List[str]    				=   normalize_before_mega
							SCREAMING_SNAKE_CASE_  :		int    				=   normalization_type
							SCREAMING_SNAKE_CASE_  :		Union[str, Any]    				=   norm_affine
							SCREAMING_SNAKE_CASE_  :		Dict    				=   dropout_prob
							SCREAMING_SNAKE_CASE_  :		Dict    				=   hidden_dropout_prob
							SCREAMING_SNAKE_CASE_  :		Optional[int]    				=   attention_probs_dropout_prob
							SCREAMING_SNAKE_CASE_  :		Dict    				=   use_feature_dropout
							SCREAMING_SNAKE_CASE_  :		List[Any]    				=   use_normalized_ffn
							SCREAMING_SNAKE_CASE_  :		List[str]    				=   nffn_hidden_size
							SCREAMING_SNAKE_CASE_  :		str    				=   normalize_before_ffn
							SCREAMING_SNAKE_CASE_  :		List[str]    				=   nffn_activation_dropout_prob
							SCREAMING_SNAKE_CASE_  :		Union[str, Any]    				=   max_positions
							SCREAMING_SNAKE_CASE_  :		List[str]    				=   add_token_type_embeddings
							SCREAMING_SNAKE_CASE_  :		Union[str, Any]    				=   type_vocab_size
							SCREAMING_SNAKE_CASE_  :		Tuple    				=   initializer_range
							SCREAMING_SNAKE_CASE_  :		str    				=   ema_delta_alpha_range
							SCREAMING_SNAKE_CASE_  :		List[Any]    				=   ema_beta_range
							SCREAMING_SNAKE_CASE_  :		int    				=   ema_gamma_omega_range
							SCREAMING_SNAKE_CASE_  :		Any    				=   relative_positional_bias
							SCREAMING_SNAKE_CASE_  :		List[str]    				=   use_cache
							SCREAMING_SNAKE_CASE_  :		List[str]    				=   classifier_dropout
							SCREAMING_SNAKE_CASE_  :		List[Any]    				=   add_lm_hidden_dense_layer
							SCREAMING_SNAKE_CASE_  :		int    				=   1  # not used but required by Hugging Face







class 		a__						( A__ ):

					@property
					def     __UpperCamelCase       (   self				:	Tuple   ):







							"""simple docstring"""






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

from ..utils import DummyObject, requires_backends






class 		a__						( metaclass=A__ ):
					A     	=							['tensorflow_text']

					def __init__(   self				:	List[str],*_A				:	Optional[Any],**_A				:	int   ):







							"""simple docstring"""






							requires_backends(self,["tensorflow_text"]   )
