



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__	(       _A):



 """simple docstring"""

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

 def __init__(    self					:					Union[str, Any]			,						__lowerCAmelCase					:					int=4_04_78			,						__lowerCAmelCase					:					Tuple=5_12			,						__lowerCAmelCase					:					str=7_68			,						__lowerCAmelCase					:					List[Any]=12			,						__lowerCAmelCase					:					Any=12			,						__lowerCAmelCase					:					Dict="gelu"			,						__lowerCAmelCase					:					Union[str, Any]=0.1			,						__lowerCAmelCase					:					Optional[int]=0.1			,						__lowerCAmelCase					:					Any=0.1			,						__lowerCAmelCase					:					List[str]=1E-5			,						__lowerCAmelCase					:					Optional[int]=0.02			,						__lowerCAmelCase					:					Optional[Any]="cls_index"			,						__lowerCAmelCase					:					str=True			,						__lowerCAmelCase					:					int=None			,						__lowerCAmelCase					:					Optional[int]=True			,						__lowerCAmelCase					:					Optional[Any]=0.1			,						**__lowerCAmelCase					:					Tuple			,						)   ->	Optional[Any]:
    _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__(**__lowerCAmelCase      )







from __future__ import annotations

from typing import Any







class 						_snake_case    ( _snake_case				):
 pass







class 						_snake_case    :




 def __init__(						self   ,    _lowerCamelCase       ):
       a		:Any									=			data
       a		:Node | None									=			None




 def __iter__(						self       ):
       a		:Dict									=			self
       a		:Optional[int]									=			[]
       while node:
             if node in visited:
                   raise ContainsLoopError
             visited.append(_lowerCamelCase       )
             yield node.data
             a		:str									=			node.next_node




 @property
 def 			SCREAMING_SNAKE_CASE__							(						self       ):
       try:
             list(self       )
             return False
       except ContainsLoopError:
             return True


if __name__ == "__main__":
     snake_case							:       int										=	Node(1)
     snake_case							:       int										=	Node(2)
     snake_case							:       Optional[int]										=	Node(3)
     snake_case							:       List[str]										=	Node(4)
     print(root_node.has_loop)  # False
     snake_case							:       Optional[Any]										=	root_node.next_node
     print(root_node.has_loop)  # True

     snake_case							:       Dict										=	Node(5)
     snake_case							:       List[Any]										=	Node(6)
     snake_case							:       Optional[int]										=	Node(5)
     snake_case							:       Union[str, Any]										=	Node(6)
     print(root_node.has_loop)  # False

     snake_case							:       Tuple										=	Node(1)
     print(root_node.has_loop)  # False





