





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


lowerCAmelCase_    =    logging.get_logger(__name__)

lowerCAmelCase_    =    {
    '''bigcode/gpt_bigcode-santacoder''': '''https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json''',
}



class  __lowerCAmelCase	(      _a					):
			lowerCamelCase_					:					str	      =				'''gpt_bigcode'''
			lowerCamelCase_					:					Any	      =				['''past_key_values''']
			lowerCamelCase_					:					Union[str, Any]	      =				{
			    '''hidden_size''': '''n_embd''',
			    '''max_position_embeddings''': '''n_positions''',
			    '''num_attention_heads''': '''n_head''',
			    '''num_hidden_layers''': '''n_layer''',
			}






			def __init__(self ,							__magic_name__=5_0257 ,							__magic_name__=1024 ,							__magic_name__=768 ,							__magic_name__=12 ,							__magic_name__=12 ,							__magic_name__=None ,							__magic_name__="gelu_pytorch_tanh" ,							__magic_name__=0.1 ,							__magic_name__=0.1 ,							__magic_name__=0.1 ,							__magic_name__=1e-5 ,							__magic_name__=0.02 ,							__magic_name__=True ,							__magic_name__=True ,							__magic_name__=5_0256 ,							__magic_name__=5_0256 ,							__magic_name__=True ,							__magic_name__=True ,							__magic_name__=True ,							**__magic_name__ ,							)					->       Union[str, Any]:


							'''simple docstring'''



							snake_case_						:   Dict           =  vocab_size
							snake_case_						:   Dict           =  n_positions
							snake_case_						:   Union[str, Any]           =  n_embd
							snake_case_						:   Tuple           =  n_layer
							snake_case_						:   Optional[int]           =  n_head
							snake_case_						:   int           =  n_inner
							snake_case_						:   Optional[Any]           =  activation_function
							snake_case_						:   Dict           =  resid_pdrop
							snake_case_						:   Optional[int]           =  embd_pdrop
							snake_case_						:   Tuple           =  attn_pdrop
							snake_case_						:   str           =  layer_norm_epsilon
							snake_case_						:   Tuple           =  initializer_range
							snake_case_						:   Optional[Any]           =  scale_attn_weights
							snake_case_						:   Optional[int]           =  use_cache
							snake_case_						:   List[str]           =  attention_softmax_in_fpaa
							snake_case_						:   Optional[Any]           =  scale_attention_softmax_in_fpaa
							snake_case_						:   Dict           =  multi_query

							snake_case_						:   List[str]           =  bos_token_id
							snake_case_						:   Tuple           =  eos_token_id

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







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,
)


lowerCAmelCase_    =    {'''configuration_xglm''': ['''XGLM_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''XGLMConfig''']}

try:
	if not is_sentencepiece_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowerCAmelCase_    =    ['''XGLMTokenizer''']

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

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


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


try:
	if not is_tf_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowerCAmelCase_    =    [
	    '''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

	lowerCAmelCase_    =    _LazyModule(__name__, globals()['''__file__'''], _import_structure)
