



"""simple docstring"""


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       A_			(     SCREAMING_SNAKE_CASE_				):



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






						def __init__(					self :Optional[int]   ,  lowercase_ :Optional[int]=4_04_78   ,  lowercase_ :List[Any]=5_12   ,  lowercase_ :List[str]=7_68   ,  lowercase_ :int=12   ,  lowercase_ :Dict=12   ,  lowercase_ :Union[str, Any]="gelu"   ,  lowercase_ :Union[str, Any]=0.1   ,  lowercase_ :str=0.1   ,  lowercase_ :List[str]=0.1   ,  lowercase_ :Optional[Any]=1E-5   ,  lowercase_ :Optional[int]=0.02   ,  lowercase_ :Optional[Any]="cls_index"   ,  lowercase_ :List[str]=True   ,  lowercase_ :List[str]=None   ,  lowercase_ :str=True   ,  lowercase_ :int=0.1   ,  **lowercase_ :List[Any]   ,  )				->			str:
												UpperCAmelCase             = vocab_size
												UpperCAmelCase             = n_positions
												UpperCAmelCase             = n_embd
												UpperCAmelCase             = n_layer
												UpperCAmelCase             = n_head
												UpperCAmelCase             = afn
												UpperCAmelCase             = resid_pdrop
												UpperCAmelCase             = embd_pdrop
												UpperCAmelCase             = attn_pdrop
												UpperCAmelCase             = layer_norm_epsilon
												UpperCAmelCase             = initializer_range
												UpperCAmelCase             = summary_type
												UpperCAmelCase             = summary_use_proj
												UpperCAmelCase             = summary_activation
												UpperCAmelCase             = summary_first_dropout
												UpperCAmelCase             = summary_proj_to_labels
												super().__init__(**lowercase_					)






"""simple docstring"""






import math



def   a_						(					lowerCamelCase					,			lowerCamelCase       ):
				if (
				    not isinstance(lowerCamelCase					,			(int, float)       )
				    or power_factor < -1
				    or power_factor > 1
				):
								raise ValueError('power_factor must be a valid float value between -1 and 1.'       )
				return apparent_power * power_factor



def   a_						(					lowerCamelCase					,			lowerCamelCase       ):
				if (
				    not isinstance(lowerCamelCase					,			(int, float)       )
				    or power_factor < -1
				    or power_factor > 1
				):
								raise ValueError('power_factor must be a valid float value between -1 and 1.'       )
				return apparent_power * math.sqrt(1 - power_factor**2       )


if __name__ == "__main__":
						import doctest

						doctest.testmod()



