


'''simple docstring'''



from string import ascii_uppercase

__lowercase	:						List[Any]       =	{str(ord(c) - 55): c for c in ascii_uppercase}






def   lowerCamelCase							(_SCREAMING_SNAKE_CASE      :   int						,      _SCREAMING_SNAKE_CASE      :   int   ):
					if isinstance(_SCREAMING_SNAKE_CASE						,      _SCREAMING_SNAKE_CASE   ):
										raise TypeError('int() can\'t convert non-string with explicit base'   )
					if num < 0:
										raise ValueError('parameter must be positive int'   )
					if isinstance(_SCREAMING_SNAKE_CASE						,      _SCREAMING_SNAKE_CASE   ):
										raise TypeError('\'str\' object cannot be interpreted as an integer'   )
					if isinstance(_SCREAMING_SNAKE_CASE						,      _SCREAMING_SNAKE_CASE   ):
										raise TypeError('\'float\' object cannot be interpreted as an integer'   )
					if base in (0, 1):
										raise ValueError('base must be >= 2'   )
					if base > 36:
										raise ValueError('base must be <= 36'   )
					__a			:       List[Any]					    =  ''
					__a			:       int					    =  0
					__a			:       List[Any]					    =  0
					while div != 1:
										__a    ,				__a			:       Optional[int]					    =  divmod(_SCREAMING_SNAKE_CASE						,      _SCREAMING_SNAKE_CASE   )
										if base >= 11 and 9 < mod < 36:
															__a			:       str					    =  ALPHABET_VALUES[str(_SCREAMING_SNAKE_CASE   )]
										else:
															__a			:       Optional[int]					    =  str(_SCREAMING_SNAKE_CASE   )
										new_value += actual_value
										__a			:       Dict					    =  num // base
										__a			:       List[str]					    =  div
										if div == 0:
															return str(new_value[::-1]   )
										elif div == 1:
															new_value += str(_SCREAMING_SNAKE_CASE   )
															return str(new_value[::-1]   )

					return new_value[::-1]


if __name__ == "__main__":
	import doctest

	doctest.testmod()

	for base in range(2, 37):
		for num in range(10_00):
			assert int(decimal_to_any(num, base), base) == num, (
			    num,
			    base,
			    decimal_to_any(num, base),
			    int(decimal_to_any(num, base), base),
			)




'''simple docstring'''

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


_A			:      int					      =				logging.get_logger(__name__)

_A			:      Any					      =				{'''ctrl''': '''https://huggingface.co/ctrl/resolve/main/config.json'''}







class 				_lowercase     (				UpperCAmelCase__			):


 '''simple docstring'''






 _SCREAMING_SNAKE_CASE     :       Any      	=					"""ctrl"""
 _SCREAMING_SNAKE_CASE     :       Optional[Any]      	=					["""past_key_values"""]
 _SCREAMING_SNAKE_CASE     :       Union[str, Any]      	=					{
     """max_position_embeddings""": """n_positions""",
     """hidden_size""": """n_embd""",
     """num_attention_heads""": """n_head""",
     """num_hidden_layers""": """n_layer""",
 }
 def __init__(      self   :	Any      ,       SCREAMING_SNAKE_CASE__   :	Optional[Any]=24_65_34      ,       SCREAMING_SNAKE_CASE__   :	Optional[int]=2_56      ,       SCREAMING_SNAKE_CASE__   :	Optional[Any]=12_80      ,       SCREAMING_SNAKE_CASE__   :	str=81_92      ,       SCREAMING_SNAKE_CASE__   :	List[str]=48      ,       SCREAMING_SNAKE_CASE__   :	Tuple=16      ,       SCREAMING_SNAKE_CASE__   :	str=0.1      ,       SCREAMING_SNAKE_CASE__   :	Dict=0.1      ,       SCREAMING_SNAKE_CASE__   :	Dict=1e-6      ,       SCREAMING_SNAKE_CASE__   :	Any=0.0_2      ,       SCREAMING_SNAKE_CASE__   :	Tuple=True      ,       **SCREAMING_SNAKE_CASE__   :	Optional[int]      ,       )  ->    Tuple:
  __lowerCAmelCase											=						vocab_size
  __lowerCAmelCase											=						n_positions
  __lowerCAmelCase											=						n_embd
  __lowerCAmelCase											=						n_layer
  __lowerCAmelCase											=						n_head
  __lowerCAmelCase											=						dff
  __lowerCAmelCase											=						resid_pdrop
  __lowerCAmelCase											=						embd_pdrop
  __lowerCAmelCase											=						layer_norm_epsilon
  __lowerCAmelCase											=						initializer_range

  __lowerCAmelCase											=						use_cache

  super().__init__(**SCREAMING_SNAKE_CASE__							)






