"""simple docstring"""







from collections import OrderedDict
from typing import Mapping

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


SCREAMING_SNAKE_CASE						=    logging.get_logger(__name__)

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



class 			_lowerCamelCase      (__lowerCamelCase  ):
				_snake_case  =	"mega"







				def __init__(			self     :							Union[str, Any]      ,       lowerCamelCase_     :							Dict=3_0_5_2_2      ,       lowerCamelCase_     :							Optional[int]=1_2_8      ,       lowerCamelCase_     :							int=4      ,       lowerCamelCase_     :							List[Any]=2_5_6      ,       lowerCamelCase_     :							List[str]=1_6      ,       lowerCamelCase_     :							List[str]=True      ,       lowerCamelCase_     :							Tuple=6_4      ,       lowerCamelCase_     :							Tuple=False      ,       lowerCamelCase_     :							List[Any]=-1      ,       lowerCamelCase_     :							List[str]=None      ,       lowerCamelCase_     :							Dict=True      ,       lowerCamelCase_     :							Union[str, Any]="scalenorm"      ,       lowerCamelCase_     :							Any=True      ,       lowerCamelCase_     :							Optional[int]="silu"      ,       lowerCamelCase_     :							Union[str, Any]="softmax"      ,       lowerCamelCase_     :							Tuple=0.1      ,       lowerCamelCase_     :							Union[str, Any]=0.1      ,       lowerCamelCase_     :							List[str]=0.1      ,       lowerCamelCase_     :							Any=False      ,       lowerCamelCase_     :							Tuple=True      ,       lowerCamelCase_     :							str=2_5_6      ,       lowerCamelCase_     :							Union[str, Any]=True      ,       lowerCamelCase_     :							str=0.1      ,       lowerCamelCase_     :							Tuple=2_0_4_8      ,       lowerCamelCase_     :							str=False      ,       lowerCamelCase_     :							List[str]=2      ,       lowerCamelCase_     :							Union[str, Any]=0.02      ,       lowerCamelCase_     :							Any=0.2      ,       lowerCamelCase_     :							List[Any]=0.02      ,       lowerCamelCase_     :							Tuple=1.0      ,       lowerCamelCase_     :							Tuple=1      ,       lowerCamelCase_     :							str=0      ,       lowerCamelCase_     :							Dict=2      ,       lowerCamelCase_     :							str="rotary"      ,       lowerCamelCase_     :							int=None      ,       lowerCamelCase_     :							Dict=True      ,       lowerCamelCase_     :							int=True      ,       **lowerCamelCase_     :							Optional[int]      ,       ):

					"""simple docstring"""






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

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



class 			_lowerCamelCase      (__lowerCamelCase  ):







				@property
				def 				__UpperCAmelCase       (			self     :							str    ):

					"""simple docstring"""






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




"""simple docstring"""







from __future__ import annotations

import re


def   __lowerCAmelCase(		__UpperCAmelCase      ):






	"""simple docstring"""





	def alphanum_key(__UpperCAmelCase      ):
		return [int(__UpperCAmelCase      ) if s.isdigit() else s.lower() for s in re.split('([0-9]+)'  ,__UpperCAmelCase      )]

	return sorted(__UpperCAmelCase  ,key=__UpperCAmelCase      )


if __name__ == "__main__":
						import doctest

						doctest.testmod()



