


import warnings

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


snake_case    :   List[str]	    =					logging.get_logger(__name__)

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







class 		_snake_case  (				_snake_case							):
 SCREAMING_SNAKE_CASE__				=	'mvp'
 SCREAMING_SNAKE_CASE__				=	['past_key_values']
 SCREAMING_SNAKE_CASE__				=	{'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}




 def __init__(		self ,  _lowerCamelCase=5_0267 ,  _lowerCamelCase=1024 ,  _lowerCamelCase=12 ,  _lowerCamelCase=4096 ,  _lowerCamelCase=16 ,  _lowerCamelCase=12 ,  _lowerCamelCase=4096 ,  _lowerCamelCase=16 ,  _lowerCamelCase=0.0 ,  _lowerCamelCase=0.0 ,  _lowerCamelCase="gelu" ,  _lowerCamelCase=1024 ,  _lowerCamelCase=0.1 ,  _lowerCamelCase=0.0 ,  _lowerCamelCase=0.0 ,  _lowerCamelCase=0.02 ,  _lowerCamelCase=0.0 ,  _lowerCamelCase=False ,  _lowerCamelCase=True ,  _lowerCamelCase=1 ,  _lowerCamelCase=0 ,  _lowerCamelCase=2 ,  _lowerCamelCase=True ,  _lowerCamelCase=2 ,  _lowerCamelCase=2 ,  _lowerCamelCase=False ,  _lowerCamelCase=100 ,  _lowerCamelCase=800 ,  **_lowerCamelCase ,  ):
       a						:Optional[int]										=	vocab_size
       a						:List[Any]										=	max_position_embeddings
       a						:Union[str, Any]										=	d_model
       a						:str										=	encoder_ffn_dim
       a						:int										=	encoder_layers
       a						:str										=	encoder_attention_heads
       a						:int										=	decoder_ffn_dim
       a						:Optional[Any]										=	decoder_layers
       a						:List[Any]										=	decoder_attention_heads
       a						:List[Any]										=	dropout
       a						:str										=	attention_dropout
       a						:Any										=	activation_dropout
       a						:Dict										=	activation_function
       a						:Tuple										=	init_std
       a						:int										=	encoder_layerdrop
       a						:Optional[Any]										=	decoder_layerdrop
       a						:Union[str, Any]										=	classifier_dropout
       a						:Tuple										=	use_cache
       a						:Tuple										=	encoder_layers
       a						:str										=	scale_embedding  # scale factor will be sqrt(d_model) if True
       a						:List[str]										=	use_prompt
       a						:Dict										=	prompt_length
       a						:Optional[Any]										=	prompt_mid_dim

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

       if self.forced_bos_token_id is None and kwargs.get('''force_bos_token_to_be_generated''' ,  _lowerCamelCase   ):
             a						:List[Any]										=	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.'''   )









def     __lowerCamelCase						(			UpperCAmelCase_						:		int						):




      """simple docstring"""





      if not isinstance(UpperCAmelCase_			,  UpperCAmelCase_						):
            raise TypeError('''Input value must be an \'int\' type'''						)

      a						:Optional[int]										=	0
      while number:
            position += 1
            number >>= 1

      return position


if __name__ == "__main__":
     import doctest

     doctest.testmod()





