



"""simple docstring"""







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


lowercase__		:				Any          =	logging.get_logger(__name__)

lowercase__		:				Optional[Any]          =	{
    """bigcode/gpt_bigcode-santacoder""": """https://huggingface.co/bigcode/gpt_bigcode-santacoder/resolve/main/config.json""",
}







class       UpperCamelCase__   (	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				:      Dict    ,			SCREAMING_SNAKE_CASE_				:      Optional[Any]=5_0_2_5_7    ,			SCREAMING_SNAKE_CASE_				:      Optional[Any]=1_0_2_4    ,			SCREAMING_SNAKE_CASE_				:      List[str]=7_6_8    ,			SCREAMING_SNAKE_CASE_				:      int=1_2    ,			SCREAMING_SNAKE_CASE_				:      Tuple=1_2    ,			SCREAMING_SNAKE_CASE_				:      Any=None    ,			SCREAMING_SNAKE_CASE_				:      Optional[Any]="gelu_pytorch_tanh"    ,			SCREAMING_SNAKE_CASE_				:      Union[str, Any]=0.1    ,			SCREAMING_SNAKE_CASE_				:      List[str]=0.1    ,			SCREAMING_SNAKE_CASE_				:      str=0.1    ,			SCREAMING_SNAKE_CASE_				:      Optional[Any]=1E-5    ,			SCREAMING_SNAKE_CASE_				:      Union[str, Any]=0.02    ,			SCREAMING_SNAKE_CASE_				:      List[str]=True    ,			SCREAMING_SNAKE_CASE_				:      Any=True    ,			SCREAMING_SNAKE_CASE_				:      int=5_0_2_5_6    ,			SCREAMING_SNAKE_CASE_				:      str=5_0_2_5_6    ,			SCREAMING_SNAKE_CASE_				:      Union[str, Any]=True    ,			SCREAMING_SNAKE_CASE_				:      List[Any]=True    ,			SCREAMING_SNAKE_CASE_				:      List[str]=True    ,			**SCREAMING_SNAKE_CASE_				:      List[Any]    ,			):
        lowerCAmelCase_   :				Optional[int]								= vocab_size
        lowerCAmelCase_   :				str								= n_positions
        lowerCAmelCase_   :				Tuple								= n_embd
        lowerCAmelCase_   :				List[str]								= n_layer
        lowerCAmelCase_   :				Any								= n_head
        lowerCAmelCase_   :				Tuple								= n_inner
        lowerCAmelCase_   :				Dict								= activation_function
        lowerCAmelCase_   :				int								= resid_pdrop
        lowerCAmelCase_   :				Any								= embd_pdrop
        lowerCAmelCase_   :				Optional[int]								= attn_pdrop
        lowerCAmelCase_   :				Optional[Any]								= layer_norm_epsilon
        lowerCAmelCase_   :				List[Any]								= initializer_range
        lowerCAmelCase_   :				int								= scale_attn_weights
        lowerCAmelCase_   :				Any								= use_cache
        lowerCAmelCase_   :				Dict								= attention_softmax_in_fpaa
        lowerCAmelCase_   :				str								= scale_attention_softmax_in_fpaa
        lowerCAmelCase_   :				Tuple								= multi_query

        lowerCAmelCase_   :				Any								= bos_token_id
        lowerCAmelCase_   :				Union[str, Any]								= eos_token_id

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










"""simple docstring"""







import re

def 				UpperCamelCase_    (    lowerCAmelCase__      :				str						)						->   list:

  """simple docstring"""




  return [char.split() for char in re.split(R'[^ a-z A-Z 0-9 \s]'    ,   str_						)]

def 				UpperCamelCase_    (    lowerCAmelCase__      :				str						)						->   str:

  """simple docstring"""




  lowerCAmelCase_   :				str								= split_input(str_						)
  return "".join(
      [''.join([char.capitalize() for char in sub_str]						) for sub_str in string_split]						)

def 				UpperCamelCase_    (    lowerCAmelCase__      :				str    ,   lowerCAmelCase__      :				bool    ,   lowerCAmelCase__      :				str						)						->   str:

  """simple docstring"""




  try:
    lowerCAmelCase_   :				int								= split_input(lowerCAmelCase__						)
    if upper:
      lowerCAmelCase_   :				Optional[int]								= ''.join(
          [
              separator.join([char.upper() for char in sub_str]						)
              for sub_str in string_split
          ]						)
    else:
      lowerCAmelCase_   :				Any								= ''.join(
          [
              separator.join([char.lower() for char in sub_str]						)
              for sub_str in string_split
          ]						)
    return res_str
  except IndexError:
    return "not valid string"

def 				UpperCamelCase_    (    lowerCAmelCase__      :				str						)						->   str:

  """simple docstring"""




  return to_simple_case(lowerCAmelCase__						)

def 				UpperCamelCase_    (    lowerCAmelCase__      :				str						)						->   str:

  """simple docstring"""




  try:
    lowerCAmelCase_   :				Dict								= to_simple_case(lowerCAmelCase__						)
    return res_str[0].lower() + res_str[1:]
  except IndexError:
    return "not valid string"

def 				UpperCamelCase_    (    lowerCAmelCase__      :				str    ,   lowerCAmelCase__      :				bool						)						->   str:

  """simple docstring"""




  return to_complex_case(lowerCAmelCase__    ,   lowerCAmelCase__    ,   '_'						)

def 				UpperCamelCase_    (    lowerCAmelCase__      :				str    ,   lowerCAmelCase__      :				bool						)						->   str:

  """simple docstring"""




  return to_complex_case(lowerCAmelCase__    ,   lowerCAmelCase__    ,   '-'						)


if __name__ == "__main__":
     __import__("""doctest""").testmod()





