





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


__UpperCAmelCase	:       Any    	=							logging.get_logger(__name__)

__UpperCAmelCase	:       str    	=							{"ctrl": "https://huggingface.co/ctrl/resolve/main/config.json"}







class    __snake_case	(							__lowerCamelCase      ):





       '''simple docstring'''







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




       def __init__(  self			:   List[str]							,    A			:   Any=246_534							,    A			:   List[Any]=256							,    A			:   Dict=1_280							,    A			:   List[Any]=8_192							,    A			:   List[str]=48							,    A			:   Dict=16							,    A			:   Tuple=0.1							,    A			:   Dict=0.1							,    A			:   Optional[int]=1E-6							,    A			:   List[Any]=0.02							,    A			:   Tuple=True							,    **A			:   List[str]							,    ):
         __snake_case:						List[Any]			  =						vocab_size
         __snake_case:						int			  =						n_positions
         __snake_case:						int			  =						n_embd
         __snake_case:						str			  =						n_layer
         __snake_case:						Dict			  =						n_head
         __snake_case:						List[str]			  =						dff
         __snake_case:						Union[str, Any]			  =						resid_pdrop
         __snake_case:						int			  =						embd_pdrop
         __snake_case:						List[Any]			  =						layer_norm_epsilon
         __snake_case:						Any			  =						initializer_range

         __snake_case:						str			  =						use_cache

         super().__init__(**A		)













import math







def       A__							(   SCREAMING_SNAKE_CASE__)       ->   int:

  if not isinstance(SCREAMING_SNAKE_CASE__ , SCREAMING_SNAKE_CASE__):
    __snake_case:						Optional[int]			  =						F'''Input value of [number={number}] must be an integer'''
    raise TypeError(SCREAMING_SNAKE_CASE__)

  if number < 1:
    __snake_case:						Optional[int]			  =						F'''Input value of [number={number}] must be > 0'''
    raise ValueError(SCREAMING_SNAKE_CASE__)
  elif number == 1:
    return 3
  elif number == 2:
    return 5
  else:
    __snake_case:						List[Any]			  =						int(math.log(number // 3 , 2)) + 2

    __snake_case:						str			  =						[3, 5]
    __snake_case:						int			  =						2
    __snake_case:						List[str]			  =						3
    for block in range(1 , SCREAMING_SNAKE_CASE__):
      for _ in range(SCREAMING_SNAKE_CASE__):
        proth_list.append(2 ** (block + 1) + proth_list[proth_index - 1])
        proth_index += 1
      increment *= 2

  return proth_list[number - 1]


if __name__ == "__main__":
      import doctest

      doctest.testmod()

      for number in range(11):
            __UpperCAmelCase	:       Optional[int]    	=							0
            try:
                  __UpperCAmelCase	:       int    	=							proth(number)
            except ValueError:
                  print(f'ValueError: there is no {number}th Proth number')
                  continue

            print(f'The {number}th Proth number: {value}')






