




import operator as op


__A        =    'scaler.pt'
__A        =    'pytorch_model'
__A        =    'random_states'
__A        =    'optimizer'
__A        =    'scheduler'
__A        =    'pytorch_model.bin'
__A        =    'pytorch_model.bin.index.json'
__A        =    'model.safetensors'
__A        =    'model.safetensors.index.json'
__A        =    '1.10.2'
__A        =    'py38'
__A        =    '4.17.0'
__A        =    ['ml.p3.16xlarge', 'ml.p3dn.24xlarge', 'ml.p4dn.24xlarge']
__A        =    ['FULL_SHARD', 'SHARD_GRAD_OP', 'NO_SHARD', 'HYBRID_SHARD', 'HYBRID_SHARD_ZERO2']
__A        =    ['TRANSFORMER_BASED_WRAP', 'SIZE_BASED_WRAP', 'NO_WRAP']
__A        =    ['BACKWARD_PRE', 'BACKWARD_POST', 'NO_PREFETCH']
__A        =    ['FULL_STATE_DICT', 'LOCAL_STATE_DICT', 'SHARDED_STATE_DICT']
__A        =    '2.0.1'
__A        =    ['pdsh', 'standard', 'openmpi', 'mvapich']
__A        =    ['default', 'reduce-overhead', 'max-autotune']

__A        =    {'>': op.gt, '>=': op.ge, '==': op.eq, '!=': op.ne, '<=': op.le, '<': op.lt}

# These are the args for `torch.distributed.launch` for pytorch < 1.9
__A        =    [
    'nnodes',
    'nproc_per_node',
    'rdzv_backend',
    'rdzv_endpoint',
    'rdzv_id',
    'rdzv_conf',
    'standalone',
    'max_restarts',
    'monitor_interval',
    'start_method',
    'role',
    'module',
    'm',
    'no_python',
    'run_path',
    'log_dir',
    'r',
    'redirects',
    't',
    'tee',
    'node_rank',
    'master_addr',
    'master_port',
]

__A        =    ['DEEPSPEED', 'MULTI_GPU', 'FSDP', 'MEGATRON_LM']
__A        =    ['DEEPSPEED', 'MULTI_XPU', 'FSDP']






'''simple docstring'''

import warnings

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


lowerCamelCase							:   str  						=	logging.get_logger(__name__)

lowerCamelCase							:   int  						=	{
    'RUCAIBox/mvp': 'https://huggingface.co/RUCAIBox/mvp/resolve/main/config.json',
}
class   __lowerCAmelCase						(lowercase_     ):





      '''simple docstring'''






      lowerCAmelCase__					:     Union[str, Any]  					=							"""mvp"""
      lowerCAmelCase__					:     Optional[Any]  					=							["""past_key_values"""]
      lowerCAmelCase__					:     List[str]  					=							{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}



      def __init__(self    :    Any   ,						UpperCamelCase    :    Optional[int]=50267   ,						UpperCamelCase    :    Tuple=1024   ,						UpperCamelCase    :    int=12   ,						UpperCamelCase    :    Tuple=4096   ,						UpperCamelCase    :    Dict=16   ,						UpperCamelCase    :    int=12   ,						UpperCamelCase    :    Optional[int]=4096   ,						UpperCamelCase    :    Optional[int]=16   ,						UpperCamelCase    :    Tuple=0.0   ,						UpperCamelCase    :    Tuple=0.0   ,						UpperCamelCase    :    List[Any]="gelu"   ,						UpperCamelCase    :    Union[str, Any]=1024   ,						UpperCamelCase    :    Optional[Any]=0.1   ,						UpperCamelCase    :    str=0.0   ,						UpperCamelCase    :    str=0.0   ,						UpperCamelCase    :    Optional[Any]=0.02   ,						UpperCamelCase    :    List[str]=0.0   ,						UpperCamelCase    :    List[str]=False   ,						UpperCamelCase    :    Optional[int]=True   ,						UpperCamelCase    :    Any=1   ,						UpperCamelCase    :    int=0   ,						UpperCamelCase    :    int=2   ,						UpperCamelCase    :    Any=True   ,						UpperCamelCase    :    Optional[Any]=2   ,						UpperCamelCase    :    Optional[Any]=2   ,						UpperCamelCase    :    Tuple=False   ,						UpperCamelCase    :    int=100   ,						UpperCamelCase    :    Optional[Any]=800   ,						**UpperCamelCase    :    str   ,						):

             '''simple docstring'''







             lowercase__      			= vocab_size
             lowercase__      			= max_position_embeddings
             lowercase__      			= d_model
             lowercase__      			= encoder_ffn_dim
             lowercase__      			= encoder_layers
             lowercase__      			= encoder_attention_heads
             lowercase__      			= decoder_ffn_dim
             lowercase__      			= decoder_layers
             lowercase__      			= decoder_attention_heads
             lowercase__      			= dropout
             lowercase__      			= attention_dropout
             lowercase__      			= activation_dropout
             lowercase__      			= activation_function
             lowercase__      			= init_std
             lowercase__      			= encoder_layerdrop
             lowercase__      			= decoder_layerdrop
             lowercase__      			= classifier_dropout
             lowercase__      			= use_cache
             lowercase__      			= encoder_layers
             lowercase__      			= scale_embedding  # scale factor will be sqrt(d_model) if True
             lowercase__      			= use_prompt
             lowercase__      			= prompt_length
             lowercase__      			= 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__      			= 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.''' )




