


"""simple docstring"""
from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase				=						logging.get_logger(__name__)

UpperCAmelCase				=						{"""ctrl""": """https://huggingface.co/ctrl/resolve/main/config.json"""}




class 	lowercase__				(					A_				):
   __UpperCAmelCase							       =					'''ctrl'''
   __UpperCAmelCase							       =					['''past_key_values''']
   __UpperCAmelCase							       =					{
       '''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=24_6534      ,   SCREAMING_SNAKE_CASE=256      ,   SCREAMING_SNAKE_CASE=1280      ,   SCREAMING_SNAKE_CASE=8192      ,   SCREAMING_SNAKE_CASE=48      ,   SCREAMING_SNAKE_CASE=16      ,   SCREAMING_SNAKE_CASE=0.1      ,   SCREAMING_SNAKE_CASE=0.1      ,   SCREAMING_SNAKE_CASE=1e-6      ,   SCREAMING_SNAKE_CASE=0.02      ,   SCREAMING_SNAKE_CASE=True      ,   **SCREAMING_SNAKE_CASE      ,   )  ->  List[str]:
      _lowerCamelCase	:					Dict   =		vocab_size
      _lowerCamelCase	:					Tuple   =		n_positions
      _lowerCamelCase	:					Tuple   =		n_embd
      _lowerCamelCase	:					List[Any]   =		n_layer
      _lowerCamelCase	:					Union[str, Any]   =		n_head
      _lowerCamelCase	:					Tuple   =		dff
      _lowerCamelCase	:					List[Any]   =		resid_pdrop
      _lowerCamelCase	:					Tuple   =		embd_pdrop
      _lowerCamelCase	:					Tuple   =		layer_norm_epsilon
      _lowerCamelCase	:					Tuple   =		initializer_range

      _lowerCamelCase	:					str   =		use_cache

      super().__init__(**SCREAMING_SNAKE_CASE)





"""simple docstring"""
import numpy as np

def 				_snake_case      (   __snake_case							:      np.ndarray   ):




   """simple docstring"""







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

def 				_snake_case      (   __snake_case							:      np.ndarray   ):




   """simple docstring"""







   return vector * sigmoid(__snake_case   )


if __name__ == "__main__":
 import doctest

 doctest.testmod()

