
'''simple docstring'''

from collections import OrderedDict
from typing import Mapping

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


__UpperCAmelCase												=   logging.get_logger(__name__)

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


class 		_a     (							SCREAMING_SNAKE_CASE  ):







   """simple docstring"""




   A		= 'mega'






   def __init__(       self    ,__SCREAMING_SNAKE_CASE=30522    ,__SCREAMING_SNAKE_CASE=128    ,__SCREAMING_SNAKE_CASE=4    ,__SCREAMING_SNAKE_CASE=256    ,__SCREAMING_SNAKE_CASE=16    ,__SCREAMING_SNAKE_CASE=True    ,__SCREAMING_SNAKE_CASE=64    ,__SCREAMING_SNAKE_CASE=False    ,__SCREAMING_SNAKE_CASE=-1    ,__SCREAMING_SNAKE_CASE=None    ,__SCREAMING_SNAKE_CASE=True    ,__SCREAMING_SNAKE_CASE="scalenorm"    ,__SCREAMING_SNAKE_CASE=True    ,__SCREAMING_SNAKE_CASE="silu"    ,__SCREAMING_SNAKE_CASE="softmax"    ,__SCREAMING_SNAKE_CASE=0.1    ,__SCREAMING_SNAKE_CASE=0.1    ,__SCREAMING_SNAKE_CASE=0.1    ,__SCREAMING_SNAKE_CASE=False    ,__SCREAMING_SNAKE_CASE=True    ,__SCREAMING_SNAKE_CASE=256    ,__SCREAMING_SNAKE_CASE=True    ,__SCREAMING_SNAKE_CASE=0.1    ,__SCREAMING_SNAKE_CASE=2048    ,__SCREAMING_SNAKE_CASE=False    ,__SCREAMING_SNAKE_CASE=2    ,__SCREAMING_SNAKE_CASE=0.02    ,__SCREAMING_SNAKE_CASE=0.2    ,__SCREAMING_SNAKE_CASE=0.02    ,__SCREAMING_SNAKE_CASE=1.0    ,__SCREAMING_SNAKE_CASE=1    ,__SCREAMING_SNAKE_CASE=0    ,__SCREAMING_SNAKE_CASE=2    ,__SCREAMING_SNAKE_CASE="rotary"    ,__SCREAMING_SNAKE_CASE=None    ,__SCREAMING_SNAKE_CASE=True    ,__SCREAMING_SNAKE_CASE=True    ,**__SCREAMING_SNAKE_CASE    ,):
    super().__init__(pad_token_id=__SCREAMING_SNAKE_CASE    ,bos_token_id=__SCREAMING_SNAKE_CASE    ,eos_token_id=__SCREAMING_SNAKE_CASE    ,**__SCREAMING_SNAKE_CASE      )

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



class 		_a     (							SCREAMING_SNAKE_CASE  ):







   """simple docstring"""




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




'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__UpperCAmelCase												=   {'configuration_sew_d': ['SEW_D_PRETRAINED_CONFIG_ARCHIVE_MAP', 'SEWDConfig']}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __UpperCAmelCase												=   [
       'SEW_D_PRETRAINED_MODEL_ARCHIVE_LIST',
       'SEWDForCTC',
       'SEWDForSequenceClassification',
       'SEWDModel',
       'SEWDPreTrainedModel',
   ]

if TYPE_CHECKING:
   from .configuration_sew_d import SEW_D_PRETRAINED_CONFIG_ARCHIVE_MAP, SEWDConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_sew_d import (
          SEW_D_PRETRAINED_MODEL_ARCHIVE_LIST,
          SEWDForCTC,
          SEWDForSequenceClassification,
          SEWDModel,
          SEWDPreTrainedModel,
      )


else:
   import sys

   __UpperCAmelCase												=   _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


