






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

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


__lowerCAmelCase							=logging.get_logger(__name__)

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


class    _snake_case   (				snake_case					):

					"""simple docstring"""





					_UpperCamelCase		 =      "mega"




					def __init__(     self   , UpperCAmelCase__=3_0522   , UpperCAmelCase__=128   , UpperCAmelCase__=4   , UpperCAmelCase__=256   , UpperCAmelCase__=16   , UpperCAmelCase__=True   , UpperCAmelCase__=64   , UpperCAmelCase__=False   , UpperCAmelCase__=-1   , UpperCAmelCase__=None   , UpperCAmelCase__=True   , UpperCAmelCase__="scalenorm"   , UpperCAmelCase__=True   , UpperCAmelCase__="silu"   , UpperCAmelCase__="softmax"   , UpperCAmelCase__=0.1   , UpperCAmelCase__=0.1   , UpperCAmelCase__=0.1   , UpperCAmelCase__=False   , UpperCAmelCase__=True   , UpperCAmelCase__=256   , UpperCAmelCase__=True   , UpperCAmelCase__=0.1   , UpperCAmelCase__=2048   , UpperCAmelCase__=False   , UpperCAmelCase__=2   , UpperCAmelCase__=0.0_2   , UpperCAmelCase__=0.2   , UpperCAmelCase__=0.0_2   , UpperCAmelCase__=1.0   , UpperCAmelCase__=1   , UpperCAmelCase__=0   , UpperCAmelCase__=2   , UpperCAmelCase__="rotary"   , UpperCAmelCase__=None   , UpperCAmelCase__=True   , UpperCAmelCase__=True   , **UpperCAmelCase__   , )      ->	Tuple:
										super().__init__(pad_token_id=UpperCAmelCase__   , bos_token_id=UpperCAmelCase__   , eos_token_id=UpperCAmelCase__   , **UpperCAmelCase__     )

										a_									=   vocab_size
										a_									=   hidden_size
										a_									=   num_hidden_layers
										a_									=   activation
										a_									=   attention_activation
										a_									=   intermediate_size
										a_									=   ema_projection_size
										a_									=   bidirectional
										a_									=   shared_representation_size
										a_									=   use_chunking
										a_									=   chunk_size
										a_									=   truncation
										a_									=   normalize_before_mega
										a_									=   normalization_type
										a_									=   norm_affine
										a_									=   dropout_prob
										a_									=   hidden_dropout_prob
										a_									=   attention_probs_dropout_prob
										a_									=   use_feature_dropout
										a_									=   use_normalized_ffn
										a_									=   nffn_hidden_size
										a_									=   normalize_before_ffn
										a_									=   nffn_activation_dropout_prob
										a_									=   max_positions
										a_									=   add_token_type_embeddings
										a_									=   type_vocab_size
										a_									=   initializer_range
										a_									=   ema_delta_alpha_range
										a_									=   ema_beta_range
										a_									=   ema_gamma_omega_range
										a_									=   relative_positional_bias
										a_									=   use_cache
										a_									=   classifier_dropout
										a_									=   add_lm_hidden_dense_layer
										a_									=   1  # not used but required by Hugging Face



class    _snake_case   (				snake_case					):

					"""simple docstring"""





					@property
					def  __SCREAMING_SNAKE_CASE (     self     )      ->	Mapping[str, Mapping[int, str]]:
										if self.task == "multiple-choice":
															a_									=   {0: 'batch', 1: 'choice', 2: 'sequence'}
										else:
															a_									=   {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_flax_available,
    is_tf_available,
    is_torch_available,
)


__lowerCAmelCase							={"configuration_regnet": ["REGNET_PRETRAINED_CONFIG_ARCHIVE_MAP", "RegNetConfig"]}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__lowerCAmelCase							=[
						    "REGNET_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "RegNetForImageClassification",
						    "RegNetModel",
						    "RegNetPreTrainedModel",
						]

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__lowerCAmelCase							=[
						    "TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "TFRegNetForImageClassification",
						    "TFRegNetModel",
						    "TFRegNetPreTrainedModel",
						]

try:
						if not is_flax_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__lowerCAmelCase							=[
						    "FlaxRegNetForImageClassification",
						    "FlaxRegNetModel",
						    "FlaxRegNetPreTrainedModel",
						]


if TYPE_CHECKING:
						from .configuration_regnet import REGNET_PRETRAINED_CONFIG_ARCHIVE_MAP, RegNetConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_regnet import (
												    REGNET_PRETRAINED_MODEL_ARCHIVE_LIST,
												    RegNetForImageClassification,
												    RegNetModel,
												    RegNetPreTrainedModel,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_regnet import (
												    TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFRegNetForImageClassification,
												    TFRegNetModel,
												    TFRegNetPreTrainedModel,
												)

						try:
												if not is_flax_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_flax_regnet import (
												    FlaxRegNetForImageClassification,
												    FlaxRegNetModel,
												    FlaxRegNetPreTrainedModel,
												)


else:
						import sys

						__lowerCAmelCase							=_LazyModule(__name__, globals()["__file__"], _import_structure)

