


'''simple docstring'''






from collections import OrderedDict
from typing import Mapping

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


_A      =     logging.get_logger(__name__)

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






class      SCREAMING_SNAKE_CASE_	( snake_case		):
			__a					:      Dict					=  '''mega'''




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


								'''simple docstring'''






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

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






class      SCREAMING_SNAKE_CASE_	( snake_case		):




			@property
			def 			_snake_case   (      self       )			->						Mapping[str, Mapping[int, str]]:


								'''simple docstring'''






								if self.task == "multiple-choice":
													__SCREAMING_SNAKE_CASE					:							List[str]			   = {0: '''batch''', 1: '''choice''', 2: '''sequence'''}
								else:
													__SCREAMING_SNAKE_CASE					:							Union[str, 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


_A      =     {
    """configuration_decision_transformer""": [
        """DECISION_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """DecisionTransformerConfig""",
    ],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_A      =     [
						    """DECISION_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """DecisionTransformerGPT2Model""",
						    """DecisionTransformerGPT2PreTrainedModel""",
						    """DecisionTransformerModel""",
						    """DecisionTransformerPreTrainedModel""",
						]


if TYPE_CHECKING:
						from .configuration_decision_transformer import (
						    DECISION_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    DecisionTransformerConfig,
						)

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_decision_transformer import (
												    DECISION_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    DecisionTransformerGPTaModel,
												    DecisionTransformerGPTaPreTrainedModel,
												    DecisionTransformerModel,
												    DecisionTransformerPreTrainedModel,
												)


else:
						import sys

						_A      =     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


