






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


UpperCamelCase__			=      logging.get_logger(__name__)

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


class 							_UpperCAmelCase    (		__A      ):
    __lowerCamelCase: Optional[int]									=     'gpt_bigcode'
    __lowerCamelCase: Dict									=     ['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	:							Optional[int]	,  a	:							List[Any]=5_0_2_5_7	,  a	:							str=1_0_2_4	,  a	:							List[Any]=7_6_8	,  a	:							Optional[int]=1_2	,  a	:							int=1_2	,  a	:							int=None	,  a	:							Tuple="gelu_pytorch_tanh"	,  a	:							int=0.1	,  a	:							int=0.1	,  a	:							Union[str, Any]=0.1	,  a	:							str=1e-5	,  a	:							Optional[Any]=0.02	,  a	:							int=True	,  a	:							List[Any]=True	,  a	:							Optional[Any]=5_0_2_5_6	,  a	:							Dict=5_0_2_5_6	,  a	:							str=True	,  a	:							Union[str, Any]=True	,  a	:							List[Any]=True	,  **a	:							Tuple	,  ):






       '''simple docstring'''






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

       lowercase_						:     Dict							     =  bos_token_id
       lowercase_						:     str							     =  eos_token_id

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





"""simple docstring"""



def  _A(		lowerCAmelCase			,  lowerCAmelCase							):
							A__       :     List[Any]								=			[1]
							for i in range(2			,  lowerCAmelCase							):
														factorials.append(factorials[-1] * i							)
							assert 0 <= k < factorials[-1] * n, "k out of bounds"

							A__       :     Union[str, Any]								=			[]
							A__       :     int								=			list(range(lowerCAmelCase							)							)

							# Find permutation
							while factorials:
														A__       :     Optional[int]								=			factorials.pop()
														A__				,							A__       :     Union[str, Any]								=			divmod(lowerCAmelCase			,  lowerCAmelCase							)
														permutation.append(elements[number]							)
														elements.remove(elements[number]							)
							permutation.append(elements[0]							)

							return permutation


if __name__ == "__main__":
				import doctest

				doctest.testmod()





