'''simple docstring'''


from collections import OrderedDict
from typing import Mapping

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


snake_case__	:     List[str]      =    logging.get_logger(__name__)

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






class 	__SCREAMING_SNAKE_CASE		(			lowerCamelCase_			):







  '''simple docstring'''






  lowerCamelCase_						:List[Any]		       =						'''mega'''


  def __init__(					self ,						snake_case_=3_0_5_2_2 ,						snake_case_=1_2_8 ,						snake_case_=4 ,						snake_case_=2_5_6 ,						snake_case_=1_6 ,						snake_case_=True ,						snake_case_=6_4 ,						snake_case_=False ,						snake_case_=-1 ,						snake_case_=None ,						snake_case_=True ,						snake_case_="scalenorm" ,						snake_case_=True ,						snake_case_="silu" ,						snake_case_="softmax" ,						snake_case_=0.1 ,						snake_case_=0.1 ,						snake_case_=0.1 ,						snake_case_=False ,						snake_case_=True ,						snake_case_=2_5_6 ,						snake_case_=True ,						snake_case_=0.1 ,						snake_case_=2_0_4_8 ,						snake_case_=False ,						snake_case_=2 ,						snake_case_=0.02 ,						snake_case_=0.2 ,						snake_case_=0.02 ,						snake_case_=1.0 ,						snake_case_=1 ,						snake_case_=0 ,						snake_case_=2 ,						snake_case_="rotary" ,						snake_case_=None ,						snake_case_=True ,						snake_case_=True ,						**snake_case_ ,						):




       '''simple docstring'''

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

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







class 	__SCREAMING_SNAKE_CASE		(			lowerCamelCase_			):







  '''simple docstring'''






  @property
  def _UpperCamelCase	(					self		):




       '''simple docstring'''

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










'''simple docstring'''







from __future__ import annotations

from enum import Enum, unique
from typing import TypeVar

# Create a generic variable that can be 'Enum', or any subclass.
a__    :   Optional[Any]								=			TypeVar('T', bound='Enum')
@unique
class    lowercase_	(       a__  ):
    __UpperCAmelCase       =      80
    __UpperCAmelCase       =      70
    __UpperCAmelCase       =      60
    __UpperCAmelCase       =      50
    __UpperCAmelCase       =      40
    __UpperCAmelCase       =      30
    __UpperCAmelCase       =      20
    __UpperCAmelCase       =      10

@unique
class    lowercase_	(       a__  ):
    __UpperCAmelCase       =      24
    __UpperCAmelCase       =      21
    __UpperCAmelCase       =      18
    __UpperCAmelCase       =      15
    __UpperCAmelCase       =      12
    __UpperCAmelCase       =      9
    __UpperCAmelCase       =      6
    __UpperCAmelCase       =      3
    __UpperCAmelCase       =      2
    __UpperCAmelCase       =      1
    __UpperCAmelCase       =      -1
    __UpperCAmelCase       =      -2
    __UpperCAmelCase       =      -3
    __UpperCAmelCase       =      -6
    __UpperCAmelCase       =      -9
    __UpperCAmelCase       =      -12
    __UpperCAmelCase       =      -15
    __UpperCAmelCase       =      -18
    __UpperCAmelCase       =      -21
    __UpperCAmelCase       =      -24


    @classmethod
    def   __a				(	cls       ):
          return {unit.name: unit.value for unit in cls if unit.value > 0}


    @classmethod
    def   __a				(	cls       ):
          return {unit.name: unit.value for unit in cls if unit.value < 0}







def _UpperCamelCase			(	__A       )				->						str:


      '''simple docstring'''



      UpperCamelCase__      =							SIUnit.get_positive() if value > 0 else SIUnit.get_negative()
      for name_prefix, value_prefix in prefixes.items():
            UpperCamelCase__      =							value / (10**value_prefix)
            if numerical_part > 1:
                  return F'''{numerical_part!s} {name_prefix}'''
      return str(__A       )







def _UpperCamelCase			(	__A       )				->						str:


      '''simple docstring'''



      for prefix in BinaryUnit:
            UpperCamelCase__      =							value / (2**prefix.value)
            if numerical_part > 1:
                  return F'''{numerical_part!s} {prefix.name}'''
      return str(__A       )


if __name__ == "__main__":
  import doctest

  doctest.testmod()





