

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


a__												=						logging.get_logger(__name__)

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

class 							UpperCAmelCase_						(     __lowercase  ):
							"""simple docstring"""







							UpperCAmelCase__			:		Optional[Any]             =       "gpt_bigcode"
							UpperCAmelCase__			:		Optional[Any]             =       ["past_key_values"]
							UpperCAmelCase__			:		Tuple             =       {
							    "hidden_size": "n_embd",
							    "max_position_embeddings": "n_positions",
							    "num_attention_heads": "n_head",
							    "num_hidden_layers": "n_layer",
							}


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

												_a      :       List[Any]   =						bos_token_id
												_a      :       str   =						eos_token_id

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








'''simple docstring'''





import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import CONFIG_MAPPING


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



class  snake_case__						(    SCREAMING_SNAKE_CASE_				):
 A__				= '''upernet'''
 def __init__(   self						:							Optional[int]      ,     __a						:							Dict=None      ,     __a						:							List[str]=512      ,     __a						:							int=0.0_2      ,     __a						:							Optional[Any]=[1, 2, 3, 6]      ,     __a						:							Union[str, Any]=True      ,     __a						:							Any=0.4      ,     __a						:							int=384      ,     __a						:							int=256      ,     __a						:							str=1      ,     __a						:							List[Any]=False      ,     __a						:							Dict=255      ,     **__a						:							Dict      ,     )      ->   Optional[int]:







       '''simple docstring'''
       super().__init__(**__a  )

       if backbone_config is None:
             logger.info('`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone.'  )
             __snake_case :   Optional[int]													=    CONFIG_MAPPING['resnet'](out_features=['stage1', 'stage2', 'stage3', 'stage4']  )
       elif isinstance(__a      ,     __a  ):
             __snake_case :   List[Any]													=    backbone_config.get('model_type'  )
             __snake_case :   List[str]													=    CONFIG_MAPPING[backbone_model_type]
             __snake_case :   int													=    config_class.from_dict(__a  )

       __snake_case :   Any													=    backbone_config
       __snake_case :   Tuple													=    hidden_size
       __snake_case :   str													=    initializer_range
       __snake_case :   Dict													=    pool_scales
       __snake_case :   Optional[Any]													=    use_auxiliary_head
       __snake_case :   Optional[Any]													=    auxiliary_loss_weight
       __snake_case :   Optional[int]													=    auxiliary_in_channels
       __snake_case :   Dict													=    auxiliary_channels
       __snake_case :   Any													=    auxiliary_num_convs
       __snake_case :   Optional[Any]													=    auxiliary_concat_input
       __snake_case :   List[str]													=    loss_ignore_index





 def A_   (   self						:							List[Any]  )      ->   Union[str, Any]:







       '''simple docstring'''
       __snake_case :   Union[str, Any]													=    copy.deepcopy(self.__dict__  )
       __snake_case :   str													=    self.backbone_config.to_dict()
       __snake_case :   Optional[int]													=    self.__class__.model_type
       return output



