


"""simple docstring"""


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


UpperCamelCase						:				Union[str, Any]             =      logging.get_logger(__name__)

UpperCamelCase						:				str             =      {
    "bigcode/gpt_bigcode-santacoder": "https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json",
}



class 			lowerCamelCase__						(   UpperCAmelCase_			):
						lowerCAmelCase       =     """gpt_bigcode"""
						lowerCAmelCase       =     ["""past_key_values"""]
						lowerCAmelCase       =     {
						    """hidden_size""": """n_embd""",
						    """max_position_embeddings""": """n_positions""",
						    """num_attention_heads""": """n_head""",
						    """num_hidden_layers""": """n_layer""",
						}







						def __init__(							self   :    int			,			_lowercase   :    Tuple=50_257			,			_lowercase   :    List[Any]=1_024			,			_lowercase   :    int=768			,			_lowercase   :    List[str]=12			,			_lowercase   :    Optional[Any]=12			,			_lowercase   :    List[str]=None			,			_lowercase   :    List[Any]="gelu_pytorch_tanh"			,			_lowercase   :    Any=0.1			,			_lowercase   :    Optional[int]=0.1			,			_lowercase   :    Tuple=0.1			,			_lowercase   :    Optional[Any]=1e-5			,			_lowercase   :    Union[str, Any]=0.0_2			,			_lowercase   :    Tuple=True			,			_lowercase   :    Dict=True			,			_lowercase   :    Optional[int]=50_256			,			_lowercase   :    Optional[int]=50_256			,			_lowercase   :    Any=True			,			_lowercase   :    int=True			,			_lowercase   :    List[Any]=True			,			**_lowercase   :    Optional[Any]			,			):
								A					       = vocab_size
								A					       = n_positions
								A					       = n_embd
								A					       = n_layer
								A					       = n_head
								A					       = n_inner
								A					       = activation_function
								A					       = resid_pdrop
								A					       = embd_pdrop
								A					       = attn_pdrop
								A					       = layer_norm_epsilon
								A					       = initializer_range
								A					       = scale_attn_weights
								A					       = use_cache
								A					       = attention_softmax_in_fpaa
								A					       = scale_attention_softmax_in_fpaa
								A					       = multi_query

								A					       = bos_token_id
								A					       = eos_token_id

								super().__init__(bos_token_id=_lowercase			,			eos_token_id=_lowercase			,			**_lowercase		)









"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCamelCase						:				Dict             =      {
    "configuration_megatron_bert": ["MEGATRON_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "MegatronBertConfig"],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	UpperCamelCase						:				Any             =      [
	    "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

	UpperCamelCase						:				Dict             =      _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





