

from ...configuration_utils import PretrainedConfig
from ...utils import logging


a_     =			logging.get_logger(__name__)

a_     =			{"""ctrl""": """https://huggingface.co/ctrl/resolve/main/config.json"""}






class _UpperCamelCase							(							_UpperCAmelCase      ):
			'''simple docstring'''







			lowerCamelCase__							='ctrl'
			lowerCamelCase__							=['past_key_values']
			lowerCamelCase__							={
			    'max_position_embeddings': 'n_positions',
			    'hidden_size': 'n_embd',
			    'num_attention_heads': 'n_head',
			    'num_hidden_layers': 'n_layer',
			}
			def __init__(	self							:       int					,					a							:       List[str]=24_6534					,					a							:       str=256					,					a							:       Any=1280					,					a							:       Tuple=8192					,					a							:       Any=48					,					a							:       Any=16					,					a							:       Dict=0.1					,					a							:       Union[str, Any]=0.1					,					a							:       Optional[Any]=1e-6					,					a							:       Dict=0.02					,					a							:       List[Any]=True					,					**a							:       Optional[Any]					,					)							->				List[str]:

				"""simple docstring"""

				SCREAMING_SNAKE_CASE      :					Dict    =				vocab_size
				SCREAMING_SNAKE_CASE      :					List[str]    =				n_positions
				SCREAMING_SNAKE_CASE      :					List[str]    =				n_embd
				SCREAMING_SNAKE_CASE      :					Tuple    =				n_layer
				SCREAMING_SNAKE_CASE      :					Optional[Any]    =				n_head
				SCREAMING_SNAKE_CASE      :					Tuple    =				dff
				SCREAMING_SNAKE_CASE      :					str    =				resid_pdrop
				SCREAMING_SNAKE_CASE      :					List[str]    =				embd_pdrop
				SCREAMING_SNAKE_CASE      :					Optional[int]    =				layer_norm_epsilon
				SCREAMING_SNAKE_CASE      :					str    =				initializer_range

				SCREAMING_SNAKE_CASE      :					str    =				use_cache

				super().__init__(**SCREAMING_SNAKE_CASE_		)



'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A__		:					List[Any]												=  {
    """configuration_megatron_bert""": ["""MEGATRON_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """MegatronBertConfig"""],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      A__		:					int												=  [
          """MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """MegatronBertForCausalLM""",
          """MegatronBertForMaskedLM""",
          """MegatronBertForMultipleChoice""",
          """MegatronBertForNextSentencePrediction""",
          """MegatronBertForPreTraining""",
          """MegatronBertForQuestionAnswering""",
          """MegatronBertForSequenceClassification""",
          """MegatronBertForTokenClassification""",
          """MegatronBertModel""",
          """MegatronBertPreTrainedModel""",
      ]

if TYPE_CHECKING:
      from .configuration_megatron_bert import MEGATRON_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, MegatronBertConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_megatron_bert import (
                MEGATRON_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                MegatronBertForCausalLM,
                MegatronBertForMaskedLM,
                MegatronBertForMultipleChoice,
                MegatronBertForNextSentencePrediction,
                MegatronBertForPreTraining,
                MegatronBertForQuestionAnswering,
                MegatronBertForSequenceClassification,
                MegatronBertForTokenClassification,
                MegatronBertModel,
                MegatronBertPreTrainedModel,
            )

else:
      import sys

      A__		:					List[Any]												=  _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)






