






'''simple docstring'''
import warnings

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


UpperCamelCase__ =			logging.get_logger(__name__)

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


class        _UpperCAmelCase						(		snake_case			):
    __lowerCamelCase:   Any		       =    'mvp'
    __lowerCamelCase:   List[str]		       =    ['past_key_values']
    __lowerCamelCase:   int		       =    {'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}




    def __init__(			self  :       Optional[Any]  ,     a  :       Union[str, Any]=5_0_2_6_7  ,     a  :       Union[str, Any]=1_0_2_4  ,     a  :       Optional[Any]=1_2  ,     a  :       Dict=4_0_9_6  ,     a  :       Optional[int]=1_6  ,     a  :       Optional[Any]=1_2  ,     a  :       Optional[int]=4_0_9_6  ,     a  :       Optional[int]=1_6  ,     a  :       Optional[Any]=0.0  ,     a  :       Dict=0.0  ,     a  :       List[str]="gelu"  ,     a  :       int=1_0_2_4  ,     a  :       int=0.1  ,     a  :       List[str]=0.0  ,     a  :       int=0.0  ,     a  :       Optional[int]=0.02  ,     a  :       Any=0.0  ,     a  :       str=False  ,     a  :       List[str]=True  ,     a  :       Union[str, Any]=1  ,     a  :       List[Any]=0  ,     a  :       Any=2  ,     a  :       Optional[Any]=True  ,     a  :       int=2  ,     a  :       Dict=2  ,     a  :       str=False  ,     a  :       List[Any]=1_0_0  ,     a  :       int=8_0_0  ,     **a  :       str  ,     ):






       '''simple docstring'''






       lowercase_	:    Dict           =     vocab_size
       lowercase_	:    Any           =     max_position_embeddings
       lowercase_	:    Tuple           =     d_model
       lowercase_	:    Any           =     encoder_ffn_dim
       lowercase_	:    Union[str, Any]           =     encoder_layers
       lowercase_	:    Union[str, Any]           =     encoder_attention_heads
       lowercase_	:    Tuple           =     decoder_ffn_dim
       lowercase_	:    int           =     decoder_layers
       lowercase_	:    List[str]           =     decoder_attention_heads
       lowercase_	:    int           =     dropout
       lowercase_	:    str           =     attention_dropout
       lowercase_	:    Optional[int]           =     activation_dropout
       lowercase_	:    Tuple           =     activation_function
       lowercase_	:    int           =     init_std
       lowercase_	:    str           =     encoder_layerdrop
       lowercase_	:    Optional[Any]           =     decoder_layerdrop
       lowercase_	:    Optional[int]           =     classifier_dropout
       lowercase_	:    int           =     use_cache
       lowercase_	:    Any           =     encoder_layers
       lowercase_	:    List[str]           =     scale_embedding  # scale factor will be sqrt(d_model) if True
       lowercase_	:    List[str]           =     use_prompt
       lowercase_	:    Tuple           =     prompt_length
       lowercase_	:    str           =     prompt_mid_dim

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

       if self.forced_bos_token_id is None and kwargs.get("force_bos_token_to_be_generated"  ,     a			):
          lowercase_	:    Tuple           =     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."			)












'''simple docstring'''
def 		__SCREAMING_SNAKE_CASE					(  _UpperCamelCase							):


   """simple docstring"""




   if number < 0:
      raise ValueError("number must not be negative"							)
   return number & (number - 1) == 0


if __name__ == "__main__":
 import doctest

 doctest.testmod()




