






from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


SCREAMING_SNAKE_CASE__				     =			logging.get_logger(__name__)

SCREAMING_SNAKE_CASE__				     =			{
    '''camembert-base''': '''https://huggingface.co/camembert-base/resolve/main/config.json''',
    '''umberto-commoncrawl-cased-v1''': (
        '''https://huggingface.co/Musixmatch/umberto-commoncrawl-cased-v1/resolve/main/config.json'''
    ),
    '''umberto-wikipedia-uncased-v1''': (
        '''https://huggingface.co/Musixmatch/umberto-wikipedia-uncased-v1/resolve/main/config.json'''
    ),
}






class 			_UpperCamelCase(       __lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       Tuple							=							'''camembert'''

		def __init__(					self		:    Dict    ,       SCREAMING_SNAKE_CASE__		:    int=3_0_5_2_2    ,       SCREAMING_SNAKE_CASE__		:    Any=7_6_8    ,       SCREAMING_SNAKE_CASE__		:    str=1_2    ,       SCREAMING_SNAKE_CASE__		:    Optional[Any]=1_2    ,       SCREAMING_SNAKE_CASE__		:    List[Any]=3_0_7_2    ,       SCREAMING_SNAKE_CASE__		:    Union[str, Any]="gelu"    ,       SCREAMING_SNAKE_CASE__		:    Optional[int]=0.1    ,       SCREAMING_SNAKE_CASE__		:    List[Any]=0.1    ,       SCREAMING_SNAKE_CASE__		:    int=5_1_2    ,       SCREAMING_SNAKE_CASE__		:    Any=2    ,       SCREAMING_SNAKE_CASE__		:    Union[str, Any]=0.02    ,       SCREAMING_SNAKE_CASE__		:    Dict=1e-12    ,       SCREAMING_SNAKE_CASE__		:    str=1    ,       SCREAMING_SNAKE_CASE__		:    Union[str, Any]=0    ,       SCREAMING_SNAKE_CASE__		:    Dict=2    ,       SCREAMING_SNAKE_CASE__		:    int="absolute"    ,       SCREAMING_SNAKE_CASE__		:    str=True    ,       SCREAMING_SNAKE_CASE__		:    List[str]=None    ,       **SCREAMING_SNAKE_CASE__		:    Optional[Any]    ,       ):



					'''simple docstring'''



					super().__init__(pad_token_id=SCREAMING_SNAKE_CASE__    ,       bos_token_id=SCREAMING_SNAKE_CASE__    ,       eos_token_id=SCREAMING_SNAKE_CASE__    ,       **SCREAMING_SNAKE_CASE__    )

					__a						:  str									=     vocab_size
					__a						:  Optional[int]									=     hidden_size
					__a						:  List[str]									=     num_hidden_layers
					__a						:  Union[str, Any]									=     num_attention_heads
					__a						:  int									=     hidden_act
					__a						:  int									=     intermediate_size
					__a						:  List[str]									=     hidden_dropout_prob
					__a						:  Union[str, Any]									=     attention_probs_dropout_prob
					__a						:  int									=     max_position_embeddings
					__a						:  List[Any]									=     type_vocab_size
					__a						:  str									=     initializer_range
					__a						:  Tuple									=     layer_norm_eps
					__a						:  Tuple									=     position_embedding_type
					__a						:  Any									=     use_cache
					__a						:  List[Any]									=     classifier_dropout






class 			_UpperCamelCase(       __lowerCamelCase		):

		@property
		def    __lowerCAmelCase  (					self		:    Optional[int]    ):



					'''simple docstring'''



					if self.task == "multiple-choice":
								__a						:  Optional[Any]									=     {0: 'batch', 1: 'choice', 2: 'sequence'}
					else:
								__a						:  str									=     {0: 'batch', 1: 'sequence'}
					return OrderedDict(
					    [
					        ('input_ids', dynamic_axis),
					        ('attention_mask', dynamic_axis),
					    ]    )













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


__a   :							Dict						= logging.get_logger(__name__)

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


class    __lowercase   (						lowercase_	):







     '''simple docstring'''
     SCREAMING_SNAKE_CASE     =					"gpt_bigcode"
     SCREAMING_SNAKE_CASE     =					["past_key_values"]
     SCREAMING_SNAKE_CASE     =					{
         "hidden_size": "n_embd",
         "max_position_embeddings": "n_positions",
         "num_attention_heads": "n_head",
         "num_hidden_layers": "n_layer",
     }




     def __init__(					self							:      List[str]			,						UpperCamelCase_							:      Dict=50_257			,						UpperCamelCase_							:      int=1_024			,						UpperCamelCase_							:      List[Any]=768			,						UpperCamelCase_							:      str=12			,						UpperCamelCase_							:      Union[str, Any]=12			,						UpperCamelCase_							:      Optional[Any]=None			,						UpperCamelCase_							:      Tuple="gelu_pytorch_tanh"			,						UpperCamelCase_							:      Optional[Any]=0.1			,						UpperCamelCase_							:      List[str]=0.1			,						UpperCamelCase_							:      Optional[int]=0.1			,						UpperCamelCase_							:      int=1e-5			,						UpperCamelCase_							:      Tuple=0.02			,						UpperCamelCase_							:      Any=True			,						UpperCamelCase_							:      List[Any]=True			,						UpperCamelCase_							:      Dict=50_256			,						UpperCamelCase_							:      Optional[Any]=50_256			,						UpperCamelCase_							:      int=True			,						UpperCamelCase_							:      List[Any]=True			,						UpperCamelCase_							:      List[Any]=True			,						**UpperCamelCase_							:      int			,						):


         """simple docstring"""



         __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=UpperCamelCase_			,						eos_token_id=UpperCamelCase_			,						**UpperCamelCase_					)




