"""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   UpperCAmelCase__				(    snake_case__			):


	"""simple docstring"""
	lowerCAmelCase__    :					Optional[int]						      =							"""mega"""







	def __init__(			self       ,     _SCREAMING_SNAKE_CASE=3_0_5_2_2       ,     _SCREAMING_SNAKE_CASE=1_2_8       ,     _SCREAMING_SNAKE_CASE=4       ,     _SCREAMING_SNAKE_CASE=2_5_6       ,     _SCREAMING_SNAKE_CASE=1_6       ,     _SCREAMING_SNAKE_CASE=True       ,     _SCREAMING_SNAKE_CASE=6_4       ,     _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=2_5_6       ,     _SCREAMING_SNAKE_CASE=True       ,     _SCREAMING_SNAKE_CASE=0.1       ,     _SCREAMING_SNAKE_CASE=2_0_4_8       ,     _SCREAMING_SNAKE_CASE=False       ,     _SCREAMING_SNAKE_CASE=2       ,     _SCREAMING_SNAKE_CASE=0.0_2       ,     _SCREAMING_SNAKE_CASE=0.2       ,     _SCREAMING_SNAKE_CASE=0.0_2       ,     _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       ,     )    ->	Any:
							super().__init__(pad_token_id=__snake_case       ,     bos_token_id=__snake_case       ,     eos_token_id=__snake_case       ,     **__snake_case )

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




class   UpperCAmelCase__				(    snake_case__			):


	"""simple docstring"""







	@property
	def       A    (			self )    ->	Tuple:
							if self.task == "multiple-choice":
													a_							:			Union[str, Any]     		=					{0: "batch", 1: "choice", 2: "sequence"}
							else:
													a_							:			List[str]     		=					{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, is_vision_available


UpperCamelCase     					=     {'configuration_levit': ['LEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'LevitConfig', 'LevitOnnxConfig']}

try:
				if not is_vision_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				UpperCamelCase     					=     ['LevitFeatureExtractor']
				UpperCamelCase     					=     ['LevitImageProcessor']

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				UpperCamelCase     					=     [
				    'LEVIT_PRETRAINED_MODEL_ARCHIVE_LIST',
				    'LevitForImageClassification',
				    'LevitForImageClassificationWithTeacher',
				    'LevitModel',
				    'LevitPreTrainedModel',
				]


if TYPE_CHECKING:
				from .configuration_levit import LEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP, LevitConfig, LevitOnnxConfig

				try:
								if not is_vision_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .feature_extraction_levit import LevitFeatureExtractor
								from .image_processing_levit import LevitImageProcessor

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_levit import (
								    LEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
								    LevitForImageClassification,
								    LevitForImageClassificationWithTeacher,
								    LevitModel,
								    LevitPreTrainedModel,
								)
else:
				import sys

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




