


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


UpperCAmelCase    =					logging.get_logger(__name__)

UpperCAmelCase    =					{"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/config.json"""}







class lowerCAmelCase_		(				lowerCamelCase__ ):

 '''simple docstring'''

 __snake_case				=						"openai-gpt"
 __snake_case				=						{
     "max_position_embeddings": "n_positions",
     "hidden_size": "n_embd",
     "num_attention_heads": "n_head",
     "num_hidden_layers": "n_layer",
 }



 def __init__(			self	,   _UpperCAmelCase=4_04_78	,   _UpperCAmelCase=5_12	,   _UpperCAmelCase=7_68	,   _UpperCAmelCase=12	,   _UpperCAmelCase=12	,   _UpperCAmelCase="gelu"	,   _UpperCAmelCase=0.1	,   _UpperCAmelCase=0.1	,   _UpperCAmelCase=0.1	,   _UpperCAmelCase=1E-5	,   _UpperCAmelCase=0.02	,   _UpperCAmelCase="cls_index"	,   _UpperCAmelCase=True	,   _UpperCAmelCase=None	,   _UpperCAmelCase=True	,   _UpperCAmelCase=0.1	,   **_UpperCAmelCase	,   ):
       snake_case_ =   vocab_size
       snake_case_ =   n_positions
       snake_case_ =   n_embd
       snake_case_ =   n_layer
       snake_case_ =   n_head
       snake_case_ =   afn
       snake_case_ =   resid_pdrop
       snake_case_ =   embd_pdrop
       snake_case_ =   attn_pdrop
       snake_case_ =   layer_norm_epsilon
       snake_case_ =   initializer_range
       snake_case_ =   summary_type
       snake_case_ =   summary_use_proj
       snake_case_ =   summary_activation
       snake_case_ =   summary_first_dropout
       snake_case_ =   summary_proj_to_labels
       super().__init__(**_UpperCAmelCase      )



def  __lowerCAmelCase					(SCREAMING_SNAKE_CASE      )->						int:




      """simple docstring"""

      assert column_title.isupper()
      snake_case_ =   0
      snake_case_ =   len(SCREAMING_SNAKE_CASE      ) - 1
      snake_case_ =   0

      while index >= 0:
            snake_case_ =   (ord(column_title[index]      ) - 64) * pow(26      ,      SCREAMING_SNAKE_CASE      )
            answer += value
            power += 1
            index -= 1

      return answer


if __name__ == "__main__":
   from doctest import testmod

   testmod()