"""simple docstring"""







import warnings

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


__SCREAMING_SNAKE_CASE    	=logging.get_logger(__name__)

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







class        UpperCamelCase		(			lowercase_  ):
   lowercase							=  'mvp'
   lowercase							=  ['past_key_values']
   lowercase							=  {'num_attention_heads': 'encoder_attention_heads', 'hidden_size': 'd_model'}
   def __init__(			self     ,__UpperCamelCase=5_0267     ,__UpperCamelCase=1024     ,__UpperCamelCase=12     ,__UpperCamelCase=4096     ,__UpperCamelCase=16     ,__UpperCamelCase=12     ,__UpperCamelCase=4096     ,__UpperCamelCase=16     ,__UpperCamelCase=0.0     ,__UpperCamelCase=0.0     ,__UpperCamelCase="gelu"     ,__UpperCamelCase=1024     ,__UpperCamelCase=0.1     ,__UpperCamelCase=0.0     ,__UpperCamelCase=0.0     ,__UpperCamelCase=0.02     ,__UpperCamelCase=0.0     ,__UpperCamelCase=False     ,__UpperCamelCase=True     ,__UpperCamelCase=1     ,__UpperCamelCase=0     ,__UpperCamelCase=2     ,__UpperCamelCase=True     ,__UpperCamelCase=2     ,__UpperCamelCase=2     ,__UpperCamelCase=False     ,__UpperCamelCase=100     ,__UpperCamelCase=800     ,**__UpperCamelCase     ,)	->      List[str]:


        '''simple docstring'''


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

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

        if self.forced_bos_token_id is None and kwargs.get('force_bos_token_to_be_generated'     ,__UpperCamelCase			):
             lowercase_	:				Optional[int]													=	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"""







import sys

from .dependency_versions_table import deps
from .utils.versions import require_version, require_version_core


# define which module versions we always want to check at run time
# (usually the ones defined in `install_requires` in setup.py)
#
# order specific notes:
# - tqdm must be checked before tokenizers

__SCREAMING_SNAKE_CASE    	="python tqdm regex requests packaging filelock numpy tokenizers".split()
if sys.version_info < (3, 7):
       pkgs_to_check_at_runtime.append("dataclasses")
if sys.version_info < (3, 8):
       pkgs_to_check_at_runtime.append("importlib_metadata")

for pkg in pkgs_to_check_at_runtime:
       if pkg in deps:
              if pkg == "tokenizers":
                     # must be loaded here, or else tqdm check may fail
                     from .utils import is_tokenizers_available

                     if not is_tokenizers_available():
                            continue  # not required, check version only if installed

              require_version_core(deps[pkg])
       else:
              raise ValueError(F"can't find {pkg} in {deps.keys()}, check dependency_versions_table.py")



def 			lowercase__(       __SCREAMING_SNAKE_CASE							:     int     ,			__SCREAMING_SNAKE_CASE							:     Union[str, Any]=None      ):
     require_version(deps[pkg]     ,			__SCREAMING_SNAKE_CASE      )

