


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


snake_case    :   Tuple	    =					{
    '''configuration_mega''': ['''MEGA_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''MegaConfig''', '''MegaOnnxConfig'''],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      snake_case    :   List[Any]	    =					[
          '''MEGA_PRETRAINED_MODEL_ARCHIVE_LIST''',
          '''MegaForCausalLM''',
          '''MegaForMaskedLM''',
          '''MegaForMultipleChoice''',
          '''MegaForQuestionAnswering''',
          '''MegaForSequenceClassification''',
          '''MegaForTokenClassification''',
          '''MegaModel''',
          '''MegaPreTrainedModel''',
      ]

if TYPE_CHECKING:
      from .configuration_mega import MEGA_PRETRAINED_CONFIG_ARCHIVE_MAP, MegaConfig, MegaOnnxConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_mega import (
                MEGA_PRETRAINED_MODEL_ARCHIVE_LIST,
                MegaForCausalLM,
                MegaForMaskedLM,
                MegaForMultipleChoice,
                MegaForQuestionAnswering,
                MegaForSequenceClassification,
                MegaForTokenClassification,
                MegaModel,
                MegaPreTrainedModel,
            )

else:
      import sys

      snake_case    :   Any	    =					_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)









from ...configuration_utils import PretrainedConfig







class 		_snake_case  (				_snake_case							):
 SCREAMING_SNAKE_CASE__				=	'bert-generation'




 def __init__(		self ,  _lowerCamelCase=5_0358 ,  _lowerCamelCase=1024 ,  _lowerCamelCase=24 ,  _lowerCamelCase=16 ,  _lowerCamelCase=4096 ,  _lowerCamelCase="gelu" ,  _lowerCamelCase=0.1 ,  _lowerCamelCase=0.1 ,  _lowerCamelCase=512 ,  _lowerCamelCase=0.02 ,  _lowerCamelCase=1e-12 ,  _lowerCamelCase=0 ,  _lowerCamelCase=2 ,  _lowerCamelCase=1 ,  _lowerCamelCase="absolute" ,  _lowerCamelCase=True ,  **_lowerCamelCase ,  ):
       super().__init__(pad_token_id=_lowerCamelCase ,  bos_token_id=_lowerCamelCase ,  eos_token_id=_lowerCamelCase ,  **_lowerCamelCase   )

       a						:Optional[int]										=	vocab_size
       a						:Tuple										=	hidden_size
       a						:Any										=	num_hidden_layers
       a						:Any										=	num_attention_heads
       a						:List[Any]										=	hidden_act
       a						:Tuple										=	intermediate_size
       a						:Any										=	hidden_dropout_prob
       a						:int										=	attention_probs_dropout_prob
       a						:Dict										=	max_position_embeddings
       a						:int										=	initializer_range
       a						:Union[str, Any]										=	layer_norm_eps
       a						:str										=	position_embedding_type
       a						:int										=	use_cache





