


from collections import OrderedDict
from typing import Mapping

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


_snake_case					=					logging.get_logger(__name__)

_snake_case					=					{
    '''mnaylor/mega-base-wikitext''': '''https://huggingface.co/mnaylor/mega-base-wikitext/resolve/main/config.json''',
}
class      UpperCAmelCase_ ( snake_case__   ):

   '''simple docstring'''




   __A			:				List[str]							=		'''mega'''






   def __init__(		self						,    __A=3_0522						,    __A=128						,    __A=4						,    __A=256						,    __A=16						,    __A=True						,    __A=64						,    __A=False						,    __A=-1						,    __A=None						,    __A=True						,    __A="scalenorm"						,    __A=True						,    __A="silu"						,    __A="softmax"						,    __A=0.1						,    __A=0.1						,    __A=0.1						,    __A=False						,    __A=True						,    __A=256						,    __A=True						,    __A=0.1						,    __A=2048						,    __A=False						,    __A=2						,    __A=0.02						,    __A=0.2						,    __A=0.02						,    __A=1.0						,    __A=1						,    __A=0						,    __A=2						,    __A="rotary"						,    __A=None						,    __A=True						,    __A=True						,    **__A						,    ):






     """simple docstring"""





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

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



class      UpperCAmelCase_ ( snake_case__   ):

   '''simple docstring'''




   @property
   def _snake_case   (		self			):






     """simple docstring"""





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







def 		lowercase_(  SCREAMING_SNAKE_CASE_     ):


  '''simple docstring'''

  if number != int(SCREAMING_SNAKE_CASE_     ):
    raise ValueError("factorial() only accepts integral values"     )
  if number < 0:
    raise ValueError("factorial() not defined for negative values"     )
  lowerCamelCase			: Optional[Any]   =    1
  for i in range(1				,						number + 1     ):
    value *= i
  return value






def 		lowercase_(  SCREAMING_SNAKE_CASE_     ):


  '''simple docstring'''

  if not isinstance(SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_     ):
    raise ValueError("factorial() only accepts integral values"     )
  if n < 0:
    raise ValueError("factorial() not defined for negative values"     )
  return 1 if n == 0 or n == 1 else n * factorial(n - 1     )


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   _snake_case					=					int(input('''Enter a positive integer: ''').strip() or 0)
   print(f'''factorial{n} is {factorial(n)}''')



