






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


lowerCamelCase     :							Tuple    =logging.get_logger(__name__)

lowerCamelCase     :							List[str]    ={'''openai-gpt''': '''https://huggingface.co/openai-gpt/resolve/main/config.json'''}





class       __a  (   A__	):
 _lowerCAmelCase	:	Optional[Any]				=			'''openai-gpt'''
 _lowerCAmelCase	:	Dict				=			{
     '''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 :       int=4_04_78							,       SCREAMING_SNAKE_CASE :       Union[str, Any]=5_12							,       SCREAMING_SNAKE_CASE :       str=7_68							,       SCREAMING_SNAKE_CASE :       Any=12							,       SCREAMING_SNAKE_CASE :       Tuple=12							,       SCREAMING_SNAKE_CASE :       Optional[Any]="gelu"							,       SCREAMING_SNAKE_CASE :       Optional[int]=0.1							,       SCREAMING_SNAKE_CASE :       int=0.1							,       SCREAMING_SNAKE_CASE :       Dict=0.1							,       SCREAMING_SNAKE_CASE :       Optional[int]=1e-5							,       SCREAMING_SNAKE_CASE :       Any=0.0_2							,       SCREAMING_SNAKE_CASE :       Dict="cls_index"							,       SCREAMING_SNAKE_CASE :       List[str]=True							,       SCREAMING_SNAKE_CASE :       Optional[Any]=None							,       SCREAMING_SNAKE_CASE :       Dict=True							,       SCREAMING_SNAKE_CASE :       List[str]=0.1							,       **SCREAMING_SNAKE_CASE :       Any							,       ):


      '''simple docstring'''






      UpperCamelCase__      :       int	    =  vocab_size
      UpperCamelCase__      :       Dict	    =  n_positions
      UpperCamelCase__      :       List[Any]	    =  n_embd
      UpperCamelCase__      :       Tuple	    =  n_layer
      UpperCamelCase__      :       List[str]	    =  n_head
      UpperCamelCase__      :       Union[str, Any]	    =  afn
      UpperCamelCase__      :       Dict	    =  resid_pdrop
      UpperCamelCase__      :       Dict	    =  embd_pdrop
      UpperCamelCase__      :       Union[str, Any]	    =  attn_pdrop
      UpperCamelCase__      :       Dict	    =  layer_norm_epsilon
      UpperCamelCase__      :       Optional[Any]	    =  initializer_range
      UpperCamelCase__      :       List[str]	    =  summary_type
      UpperCamelCase__      :       List[str]	    =  summary_use_proj
      UpperCamelCase__      :       List[Any]	    =  summary_activation
      UpperCamelCase__      :       List[str]	    =  summary_first_dropout
      UpperCamelCase__      :       Optional[Any]	    =  summary_proj_to_labels
      super().__init__(**SCREAMING_SNAKE_CASE						)







from __future__ import annotations







def 		SCREAMING_SNAKE_CASE							( __lowerCAmelCase ,   __lowerCAmelCase = None ,   __lowerCAmelCase = None      )			->     None:
     if start is None:
          UpperCamelCase__      :       Union[str, Any]	    =  0

     if end is None:
          UpperCamelCase__      :       List[Any]	    =  len(__lowerCAmelCase      ) - 1

     if start >= end:
          return

     UpperCamelCase__      :       Union[str, Any]	    =  (start + end) // 2

     slowsort(__lowerCAmelCase ,   __lowerCAmelCase ,   __lowerCAmelCase      )
     slowsort(__lowerCAmelCase ,   mid + 1 ,   __lowerCAmelCase      )

     if sequence[end] < sequence[mid]:
          UpperCamelCase__    ,					UpperCamelCase__      :       Optional[int]	    =  sequence[mid], sequence[end]

     slowsort(__lowerCAmelCase ,   __lowerCAmelCase ,   end - 1      )


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

 testmod()