

'''simple docstring'''





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


A_	= logging.get_logger(__name__)

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


class  UpperCAmelCase (							UpperCAmelCase__    ):

		'''simple docstring'''






		SCREAMING_SNAKE_CASE_           =					'openai-gpt'
		SCREAMING_SNAKE_CASE_           =					{
		    'max_position_embeddings': 'n_positions',
		    'hidden_size': 'n_embd',
		    'num_attention_heads': 'n_head',
		    'num_hidden_layers': 'n_layer',
		}
		def __init__(					self   ,			SCREAMING_SNAKE_CASE_=40478   ,			SCREAMING_SNAKE_CASE_=512   ,			SCREAMING_SNAKE_CASE_=768   ,			SCREAMING_SNAKE_CASE_=12   ,			SCREAMING_SNAKE_CASE_=12   ,			SCREAMING_SNAKE_CASE_="gelu"   ,			SCREAMING_SNAKE_CASE_=0.1   ,			SCREAMING_SNAKE_CASE_=0.1   ,			SCREAMING_SNAKE_CASE_=0.1   ,			SCREAMING_SNAKE_CASE_=1E-5   ,			SCREAMING_SNAKE_CASE_=0.02   ,			SCREAMING_SNAKE_CASE_="cls_index"   ,			SCREAMING_SNAKE_CASE_=True   ,			SCREAMING_SNAKE_CASE_=None   ,			SCREAMING_SNAKE_CASE_=True   ,			SCREAMING_SNAKE_CASE_=0.1   ,			**SCREAMING_SNAKE_CASE_   ,			)  ->     List[Any]:






							'''simple docstring'''



							lowerCamelCase_  				=      vocab_size
							lowerCamelCase_  				=      n_positions
							lowerCamelCase_  				=      n_embd
							lowerCamelCase_  				=      n_layer
							lowerCamelCase_  				=      n_head
							lowerCamelCase_  				=      afn
							lowerCamelCase_  				=      resid_pdrop
							lowerCamelCase_  				=      embd_pdrop
							lowerCamelCase_  				=      attn_pdrop
							lowerCamelCase_  				=      layer_norm_epsilon
							lowerCamelCase_  				=      initializer_range
							lowerCamelCase_  				=      summary_type
							lowerCamelCase_  				=      summary_use_proj
							lowerCamelCase_  				=      summary_activation
							lowerCamelCase_  				=      summary_first_dropout
							lowerCamelCase_  				=      summary_proj_to_labels
							super().__init__(**SCREAMING_SNAKE_CASE_		)










import numpy as np







def   __lowerCamelCase   (				__a  :np.array       )						->							np.array:






		"""simple docstring"""

		return 1 / (1 + np.exp(-vector       ))







def   __lowerCamelCase   (				__a  :np.array       )						->							np.array:






		"""simple docstring"""

		return vector * sigmoid(1.702 * vector       )


if __name__ == "__main__":
					import doctest

					doctest.testmod()



