



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


__snake_case     :List[str]			       =logging.get_logger(__name__)

__snake_case     :int			       ={'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}



class        lowerCAmelCase__					(  _lowerCamelCase       ):
				A_   :     Optional[Any]								=     'openai-gpt'
				A_   :     Any								=     {
				    'max_position_embeddings': 'n_positions',
				    'hidden_size': 'n_embd',
				    'num_attention_heads': 'n_head',
				    'num_hidden_layers': 'n_layer',
				}


				def __init__(							self      :  List[Any]						, __UpperCamelCase      :  List[str]=40_478						, __UpperCamelCase      :  List[Any]=512						, __UpperCamelCase      :  List[Any]=768						, __UpperCamelCase      :  Optional[int]=12						, __UpperCamelCase      :  Dict=12						, __UpperCamelCase      :  List[str]="gelu"						, __UpperCamelCase      :  str=0.1						, __UpperCamelCase      :  Optional[Any]=0.1						, __UpperCamelCase      :  Union[str, Any]=0.1						, __UpperCamelCase      :  List[str]=1e-5						, __UpperCamelCase      :  List[Any]=0.0_2						, __UpperCamelCase      :  str="cls_index"						, __UpperCamelCase      :  int=True						, __UpperCamelCase      :  int=None						, __UpperCamelCase      :  Optional[int]=True						, __UpperCamelCase      :  Tuple=0.1						, **__UpperCamelCase      :  List[Any]						, )		->     List[str]:
											A      						=    vocab_size
											A      						=    n_positions
											A      						=    n_embd
											A      						=    n_layer
											A      						=    n_head
											A      						=    afn
											A      						=    resid_pdrop
											A      						=    embd_pdrop
											A      						=    attn_pdrop
											A      						=    layer_norm_epsilon
											A      						=    initializer_range
											A      						=    summary_type
											A      						=    summary_use_proj
											A      						=    summary_activation
											A      						=    summary_first_dropout
											A      						=    summary_proj_to_labels
											super().__init__(**__UpperCamelCase       )







'''simple docstring'''

UpperCamelCase      					="Input must be a string of 8 numbers plus letter"
UpperCamelCase      					="TRWAGMYFPDXBNJZSQVHLCKE"



def 				snake_case       (  a_				:			str						)							->					bool:





      """simple docstring"""

      if not isinstance(a_     , a_						):
            UpperCamelCase_					: List[str]            =				f"Expected string as input, found {type(a_						).__name__}"
            raise TypeError(a_						)

      UpperCamelCase_					: int            =				spanish_id.replace("""-"""     , """"""						).upper()
      if len(a_						) != 9:
            raise ValueError(a_						)

      try:
            UpperCamelCase_					: List[str]            =				int(spanish_id_clean[0:8]						)
            UpperCamelCase_					: Any            =				spanish_id_clean[8]
      except ValueError as ex:
            raise ValueError(a_						) from ex

      if letter.isdigit():
            raise ValueError(a_						)

      return letter == LOOKUP_LETTERS[number % 23]


if __name__ == "__main__":
      import doctest

      doctest.testmod()






