



import warnings

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


__snake_case						:Dict      		=     logging.get_logger(__name__)

__snake_case						:Tuple      		=     {
    '''RUCAIBox/mvp''': '''https://huggingface.co/RUCAIBox/mvp/resolve/main/config.json''',
}

class     _A       (	__UpperCAmelCase    ):
       UpperCamelCase__  :    Dict											=						'''mvp'''
       UpperCamelCase__  :    Optional[int]											=						['''past_key_values''']
       UpperCamelCase__  :    int											=						{'''num_attention_heads''': '''encoder_attention_heads''', '''hidden_size''': '''d_model'''}



       def __init__(		self							:     List[str]     ,		__SCREAMING_SNAKE_CASE							:     List[Any]=50_267     ,		__SCREAMING_SNAKE_CASE							:     Any=1_024     ,		__SCREAMING_SNAKE_CASE							:     Optional[int]=12     ,		__SCREAMING_SNAKE_CASE							:     Dict=4_096     ,		__SCREAMING_SNAKE_CASE							:     Tuple=16     ,		__SCREAMING_SNAKE_CASE							:     Optional[int]=12     ,		__SCREAMING_SNAKE_CASE							:     Any=4_096     ,		__SCREAMING_SNAKE_CASE							:     Union[str, Any]=16     ,		__SCREAMING_SNAKE_CASE							:     Optional[int]=0.0     ,		__SCREAMING_SNAKE_CASE							:     List[str]=0.0     ,		__SCREAMING_SNAKE_CASE							:     str="gelu"     ,		__SCREAMING_SNAKE_CASE							:     List[Any]=1_024     ,		__SCREAMING_SNAKE_CASE							:     List[Any]=0.1     ,		__SCREAMING_SNAKE_CASE							:     List[Any]=0.0     ,		__SCREAMING_SNAKE_CASE							:     Union[str, Any]=0.0     ,		__SCREAMING_SNAKE_CASE							:     int=0.02     ,		__SCREAMING_SNAKE_CASE							:     str=0.0     ,		__SCREAMING_SNAKE_CASE							:     Any=False     ,		__SCREAMING_SNAKE_CASE							:     List[Any]=True     ,		__SCREAMING_SNAKE_CASE							:     List[Any]=1     ,		__SCREAMING_SNAKE_CASE							:     str=0     ,		__SCREAMING_SNAKE_CASE							:     List[str]=2     ,		__SCREAMING_SNAKE_CASE							:     List[Any]=True     ,		__SCREAMING_SNAKE_CASE							:     Dict=2     ,		__SCREAMING_SNAKE_CASE							:     Union[str, Any]=2     ,		__SCREAMING_SNAKE_CASE							:     Tuple=False     ,		__SCREAMING_SNAKE_CASE							:     Tuple=100     ,		__SCREAMING_SNAKE_CASE							:     List[str]=800     ,		**__SCREAMING_SNAKE_CASE							:     Tuple     ,		):


           '''simple docstring'''

           __a						       =				vocab_size
           __a						       =				max_position_embeddings
           __a						       =				d_model
           __a						       =				encoder_ffn_dim
           __a						       =				encoder_layers
           __a						       =				encoder_attention_heads
           __a						       =				decoder_ffn_dim
           __a						       =				decoder_layers
           __a						       =				decoder_attention_heads
           __a						       =				dropout
           __a						       =				attention_dropout
           __a						       =				activation_dropout
           __a						       =				activation_function
           __a						       =				init_std
           __a						       =				encoder_layerdrop
           __a						       =				decoder_layerdrop
           __a						       =				classifier_dropout
           __a						       =				use_cache
           __a						       =				encoder_layers
           __a						       =				scale_embedding  # scale factor will be sqrt(d_model) if True
           __a						       =				use_prompt
           __a						       =				prompt_length
           __a						       =				prompt_mid_dim

           super().__init__(
               pad_token_id=__SCREAMING_SNAKE_CASE     ,		bos_token_id=__SCREAMING_SNAKE_CASE     ,		eos_token_id=__SCREAMING_SNAKE_CASE     ,		is_encoder_decoder=__SCREAMING_SNAKE_CASE     ,		decoder_start_token_id=__SCREAMING_SNAKE_CASE     ,		forced_eos_token_id=__SCREAMING_SNAKE_CASE     ,		**__SCREAMING_SNAKE_CASE     ,		)

           if self.forced_bos_token_id is None and kwargs.get('''force_bos_token_to_be_generated'''     ,		__SCREAMING_SNAKE_CASE):
               __a						       =				self.bos_token_id
               warnings.warn(
                   F'Please make sure the config includes `forced_bos_token_id={self.bos_token_id}` in future versions. '
                   '''The config can simply be saved and uploaded again to be fixed.''')








import numpy as np





def 					__lowerCamelCase	( UpperCamelCase__      ):







							'''simple docstring'''






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





def 					__lowerCamelCase	( UpperCamelCase__      ):







							'''simple docstring'''






							return vector * sigmoid(UpperCamelCase__      )


if __name__ == "__main__":
					import doctest

					doctest.testmod()




