




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


_snake_case										=       logging.get_logger(__name__)

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







class 						lowercase							(   UpperCamelCase__		):
     _a							 =						"openai-gpt"
     _a							 =						{
         "max_position_embeddings": "n_positions",
         "hidden_size": "n_embd",
         "num_attention_heads": "n_head",
         "num_hidden_layers": "n_layer",
     }

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







def 				lowerCAmelCase_	(     snake_case_     ):
      if number < 0:
            raise ValueError("""number must not be negative"""     )
      return number & (number - 1) == 0


if __name__ == "__main__":
  import doctest

  doctest.testmod()

