





'''simple docstring'''







from typing import TYPE_CHECKING

from ...file_utils import _LazyModule, is_tokenizers_available, is_torch_available
from ...utils import OptionalDependencyNotAvailable


lowerCAmelCase_					:    int      	=			{'configuration_gpt_neox': ['GPT_NEOX_PRETRAINED_CONFIG_ARCHIVE_MAP', 'GPTNeoXConfig']}

try:
					if not is_tokenizers_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase_					:    Optional[int]      	=			['GPTNeoXTokenizerFast']

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase_					:    List[str]      	=			[
					    'GPT_NEOX_PRETRAINED_MODEL_ARCHIVE_LIST',
					    'GPTNeoXForCausalLM',
					    'GPTNeoXForQuestionAnswering',
					    'GPTNeoXForSequenceClassification',
					    'GPTNeoXForTokenClassification',
					    'GPTNeoXLayer',
					    'GPTNeoXModel',
					    'GPTNeoXPreTrainedModel',
					]


if TYPE_CHECKING:
					from .configuration_gpt_neox import GPT_NEOX_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTNeoXConfig

					try:
										if not is_tokenizers_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_gpt_neox_fast import GPTNeoXTokenizerFast

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_gpt_neox import (
										    GPT_NEOX_PRETRAINED_MODEL_ARCHIVE_LIST,
										    GPTNeoXForCausalLM,
										    GPTNeoXForQuestionAnswering,
										    GPTNeoXForSequenceClassification,
										    GPTNeoXForTokenClassification,
										    GPTNeoXLayer,
										    GPTNeoXModel,
										    GPTNeoXPreTrainedModel,
										)


else:
					import sys

					lowerCAmelCase_					:    List[str]      	=			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)







'''simple docstring'''







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


lowerCAmelCase_					:    Dict      	=			logging.get_logger(__name__)

lowerCAmelCase_					:    int      	=			{
    'bigcode/gpt_bigcode-santacoder': 'https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json',
}
class 				__SCREAMING_SNAKE_CASE  (lowerCamelCase_      ):






				"""simple docstring"""







				__a            ='gpt_bigcode'
				__a            =['past_key_values']
				__a            ={
				    'hidden_size': 'n_embd',
				    'max_position_embeddings': 'n_positions',
				    'num_attention_heads': 'n_head',
				    'num_hidden_layers': 'n_layer',
				}




				def __init__(  self     :					Optional[Any]					,				__a     :					Tuple=5_02_57					,				__a     :					str=10_24					,				__a     :					Dict=7_68					,				__a     :					Tuple=12					,				__a     :					str=12					,				__a     :					Optional[int]=None					,				__a     :					Dict="gelu_pytorch_tanh"					,				__a     :					Tuple=0.1					,				__a     :					Tuple=0.1					,				__a     :					Union[str, Any]=0.1					,				__a     :					Tuple=1e-5					,				__a     :					str=0.02					,				__a     :					Dict=True					,				__a     :					Union[str, Any]=True					,				__a     :					Optional[int]=5_02_56					,				__a     :					Optional[int]=5_02_56					,				__a     :					Union[str, Any]=True					,				__a     :					Dict=True					,				__a     :					Union[str, Any]=True					,				**__a     :					List[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=__a					,				eos_token_id=__a					,				**__a					)
