'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowercase__  :      Dict        =					logging.get_logger(__name__)

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







class lowerCamelCase							(	lowerCamelCase					):




  '''simple docstring'''



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






  def __init__(      self			:       Optional[Any]  ,							UpperCAmelCase__			:       Union[str, Any]=5_0257  ,							UpperCAmelCase__			:       Any=1024  ,							UpperCAmelCase__			:       List[str]=768  ,							UpperCAmelCase__			:       Union[str, Any]=12  ,							UpperCAmelCase__			:       str=12  ,							UpperCAmelCase__			:       str=None  ,							UpperCAmelCase__			:       Tuple="gelu_pytorch_tanh"  ,							UpperCAmelCase__			:       Optional[int]=0.1  ,							UpperCAmelCase__			:       str=0.1  ,							UpperCAmelCase__			:       List[Any]=0.1  ,							UpperCAmelCase__			:       Any=1e-5  ,							UpperCAmelCase__			:       Union[str, Any]=0.02  ,							UpperCAmelCase__			:       Optional[int]=True  ,							UpperCAmelCase__			:       Tuple=True  ,							UpperCAmelCase__			:       Dict=5_0256  ,							UpperCAmelCase__			:       str=5_0256  ,							UpperCAmelCase__			:       List[str]=True  ,							UpperCAmelCase__			:       str=True  ,							UpperCAmelCase__			:       int=True  ,							**UpperCAmelCase__			:       List[str]  ,							)				->Any:
        UpperCAmelCase_            =  vocab_size
        UpperCAmelCase_            =  n_positions
        UpperCAmelCase_            =  n_embd
        UpperCAmelCase_            =  n_layer
        UpperCAmelCase_            =  n_head
        UpperCAmelCase_            =  n_inner
        UpperCAmelCase_            =  activation_function
        UpperCAmelCase_            =  resid_pdrop
        UpperCAmelCase_            =  embd_pdrop
        UpperCAmelCase_            =  attn_pdrop
        UpperCAmelCase_            =  layer_norm_epsilon
        UpperCAmelCase_            =  initializer_range
        UpperCAmelCase_            =  scale_attn_weights
        UpperCAmelCase_            =  use_cache
        UpperCAmelCase_            =  attention_softmax_in_fpaa
        UpperCAmelCase_            =  scale_attention_softmax_in_fpaa
        UpperCAmelCase_            =  multi_query

        UpperCAmelCase_            =  bos_token_id
        UpperCAmelCase_            =  eos_token_id

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






'''simple docstring'''
import re



def  __lowerCamelCase       (      _UpperCamelCase  :  str					):


      '''simple docstring'''


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



def  __lowerCamelCase       (      _UpperCamelCase  :  str					):


      '''simple docstring'''


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



def  __lowerCamelCase       (      _UpperCamelCase  :  str							,    _UpperCamelCase  :  bool							,    _UpperCamelCase  :  str					):


      '''simple docstring'''


      try:
            UpperCAmelCase_            =  split_input(_UpperCamelCase					)
            if upper:
                  UpperCAmelCase_            =  ''''''.join(
                      [
                          separator.join([char.upper() for char in sub_str]					)
                          for sub_str in string_split
                      ]					)
            else:
                  UpperCAmelCase_            =  ''''''.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  __lowerCamelCase       (      _UpperCamelCase  :  str					):


      '''simple docstring'''


      return to_simple_case(_UpperCamelCase					)



def  __lowerCamelCase       (      _UpperCamelCase  :  str					):


      '''simple docstring'''


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



def  __lowerCamelCase       (      _UpperCamelCase  :  str							,    _UpperCamelCase  :  bool					):


      '''simple docstring'''


      return to_complex_case(_UpperCamelCase							,    _UpperCamelCase							,    '''_'''					)



def  __lowerCamelCase       (      _UpperCamelCase  :  str							,    _UpperCamelCase  :  bool					):


      '''simple docstring'''


      return to_complex_case(_UpperCamelCase							,    _UpperCamelCase							,    '''-'''					)


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





