
'''simple docstring'''
from collections import OrderedDict
from typing import Mapping

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


lowercase__		    =	logging.get_logger(__name__)

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






class      snake_case__    (	__SCREAMING_SNAKE_CASE ):







		"""simple docstring"""

		lowerCamelCase							=		"""mega"""



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






				"""simple docstring"""







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

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







class      snake_case__    (	__SCREAMING_SNAKE_CASE ):







		"""simple docstring"""

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






				"""simple docstring"""







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




'''simple docstring'''
from __future__ import annotations

import sys




def 					_UpperCamelCase		(    SCREAMING_SNAKE_CASE__      ,    SCREAMING_SNAKE_CASE__       )   ->				tuple[int, int]:


		'''simple docstring'''


		if abs(SCREAMING_SNAKE_CASE__       ) == 1:
				return a, 0
		elif abs(SCREAMING_SNAKE_CASE__       ) == 1:
				return 0, b

		snake_case       ,snake_case   :    Tuple			       =		a, b
		snake_case       ,snake_case   :    List[str]			       =		1, 0
		snake_case       ,snake_case   :    Optional[Any]			       =		0, 1

		while remainder != 0:
				snake_case   :    int			       =		old_remainder // remainder
				snake_case       ,snake_case   :    Tuple			       =		remainder, old_remainder - quotient * remainder
				snake_case       ,snake_case   :    Optional[Any]			       =		coeff_a, old_coeff_a - quotient * coeff_a
				snake_case       ,snake_case   :    Dict			       =		coeff_b, old_coeff_b - quotient * coeff_b

		# sign correction for negative numbers
		if a < 0:
				snake_case   :    Optional[Any]			       =		-old_coeff_a
		if b < 0:
				snake_case   :    int			       =		-old_coeff_b

		return old_coeff_a, old_coeff_b




def 					_UpperCamelCase		(    )   ->				str:


		'''simple docstring'''


		if len(sys.argv       ) < 3:
				print('''2 integer arguments required'''       )
				return 1
		snake_case   :    str			       =		int(sys.argv[1]       )
		snake_case   :    List[str]			       =		int(sys.argv[2]       )
		print(extended_euclidean_algorithm(SCREAMING_SNAKE_CASE__      ,    SCREAMING_SNAKE_CASE__       )       )
		return 0


if __name__ == "__main__":
						raise SystemExit(main())


