

"""simple docstring"""





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


__UpperCamelCase    : List[Any]				 =						logging.get_logger(__name__)

__UpperCamelCase    : Union[str, Any]				 =						{
    '''bigcode/gpt_bigcode-santacoder''': '''https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json''',
}







class 							SCREAMING_SNAKE_CASE   (						a_			):






					"""simple docstring"""



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







					def __init__(			self     :							Dict  ,lowercase_     :							str=5_0_2_5_7  ,lowercase_     :							List[Any]=1_0_2_4  ,lowercase_     :							Optional[Any]=7_6_8  ,lowercase_     :							Tuple=1_2  ,lowercase_     :							Any=1_2  ,lowercase_     :							Tuple=None  ,lowercase_     :							Union[str, Any]="gelu_pytorch_tanh"  ,lowercase_     :							str=0.1  ,lowercase_     :							Optional[int]=0.1  ,lowercase_     :							Optional[Any]=0.1  ,lowercase_     :							Any=1E-5  ,lowercase_     :							Tuple=0.02  ,lowercase_     :							Optional[Any]=True  ,lowercase_     :							Union[str, Any]=True  ,lowercase_     :							str=5_0_2_5_6  ,lowercase_     :							str=5_0_2_5_6  ,lowercase_     :							Optional[int]=True  ,lowercase_     :							int=True  ,lowercase_     :							Optional[int]=True  ,**lowercase_     :							List[str]  ,):
						lowerCAmelCase__      :		int    							=      vocab_size
						lowerCAmelCase__      :		str    							=      n_positions
						lowerCAmelCase__      :		Tuple    							=      n_embd
						lowerCAmelCase__      :		List[Any]    							=      n_layer
						lowerCAmelCase__      :		Optional[int]    							=      n_head
						lowerCAmelCase__      :		Optional[int]    							=      n_inner
						lowerCAmelCase__      :		Tuple    							=      activation_function
						lowerCAmelCase__      :		Optional[Any]    							=      resid_pdrop
						lowerCAmelCase__      :		List[Any]    							=      embd_pdrop
						lowerCAmelCase__      :		Any    							=      attn_pdrop
						lowerCAmelCase__      :		Optional[int]    							=      layer_norm_epsilon
						lowerCAmelCase__      :		Tuple    							=      initializer_range
						lowerCAmelCase__      :		Union[str, Any]    							=      scale_attn_weights
						lowerCAmelCase__      :		List[str]    							=      use_cache
						lowerCAmelCase__      :		Dict    							=      attention_softmax_in_fpaa
						lowerCAmelCase__      :		Dict    							=      scale_attention_softmax_in_fpaa
						lowerCAmelCase__      :		List[str]    							=      multi_query

						lowerCAmelCase__      :		Optional[Any]    							=      bos_token_id
						lowerCAmelCase__      :		List[str]    							=      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_flax_available,
    is_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


__UpperCamelCase    : List[str]				 =						{'''configuration_xglm''': ['''XGLM_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''XGLMConfig''']}

try:
							if not is_sentencepiece_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__UpperCamelCase    : Union[str, Any]				 =						['''XGLMTokenizer''']

try:
							if not is_tokenizers_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__UpperCamelCase    : str				 =						['''XGLMTokenizerFast''']

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__UpperCamelCase    : Optional[int]				 =						[
							    '''XGLM_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''XGLMForCausalLM''',
							    '''XGLMModel''',
							    '''XGLMPreTrainedModel''',
							]


try:
							if not is_flax_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__UpperCamelCase    : str				 =						[
							    '''FlaxXGLMForCausalLM''',
							    '''FlaxXGLMModel''',
							    '''FlaxXGLMPreTrainedModel''',
							]


try:
							if not is_tf_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__UpperCamelCase    : str				 =						[
							    '''TF_XGLM_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''TFXGLMForCausalLM''',
							    '''TFXGLMModel''',
							    '''TFXGLMPreTrainedModel''',
							]


if TYPE_CHECKING:
							from .configuration_xglm import XGLM_PRETRAINED_CONFIG_ARCHIVE_MAP, XGLMConfig

							try:
														if not is_sentencepiece_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_xglm import XGLMTokenizer

							try:
														if not is_tokenizers_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_xglm_fast import XGLMTokenizerFast

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_xglm import XGLM_PRETRAINED_MODEL_ARCHIVE_LIST, XGLMForCausalLM, XGLMModel, XGLMPreTrainedModel

							try:
														if not is_flax_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_flax_xglm import FlaxXGLMForCausalLM, FlaxXGLMModel, FlaxXGLMPreTrainedModel

							try:
														if not is_tf_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_tf_xglm import (
														    TF_XGLM_PRETRAINED_MODEL_ARCHIVE_LIST,
														    TFXGLMForCausalLM,
														    TFXGLMModel,
														    TFXGLMPreTrainedModel,
														)


else:
							import sys

							__UpperCamelCase    : Optional[int]				 =						_LazyModule(__name__, globals()['''__file__'''], _import_structure)




