



import warnings

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


__lowerCAmelCase						      =       logging.get_logger(__name__)

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

class      __magic_name__						(   a__       ):
							lowerCAmelCase	:   Union[str, Any]           = """mvp"""
							lowerCAmelCase	:   Dict           = ["""past_key_values"""]
							lowerCAmelCase	:   str           = {"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}







							def __init__(							self :	Union[str, Any]     ,_UpperCAmelCase :	int=50267     ,_UpperCAmelCase :	Optional[Any]=1024     ,_UpperCAmelCase :	Union[str, Any]=12     ,_UpperCAmelCase :	List[str]=4096     ,_UpperCAmelCase :	List[str]=16     ,_UpperCAmelCase :	Tuple=12     ,_UpperCAmelCase :	Optional[Any]=4096     ,_UpperCAmelCase :	Optional[int]=16     ,_UpperCAmelCase :	List[str]=0.0     ,_UpperCAmelCase :	List[Any]=0.0     ,_UpperCAmelCase :	Union[str, Any]="gelu"     ,_UpperCAmelCase :	int=1024     ,_UpperCAmelCase :	Optional[int]=0.1     ,_UpperCAmelCase :	List[Any]=0.0     ,_UpperCAmelCase :	List[Any]=0.0     ,_UpperCAmelCase :	List[Any]=0.02     ,_UpperCAmelCase :	Optional[int]=0.0     ,_UpperCAmelCase :	Tuple=False     ,_UpperCAmelCase :	Tuple=True     ,_UpperCAmelCase :	Optional[int]=1     ,_UpperCAmelCase :	List[Any]=0     ,_UpperCAmelCase :	int=2     ,_UpperCAmelCase :	Dict=True     ,_UpperCAmelCase :	int=2     ,_UpperCAmelCase :	Dict=2     ,_UpperCAmelCase :	Tuple=False     ,_UpperCAmelCase :	List[str]=100     ,_UpperCAmelCase :	Any=800     ,**_UpperCAmelCase :	Optional[Any]     ,):
									_a					:				List[str]				=							vocab_size
									_a					:				List[Any]				=							max_position_embeddings
									_a					:				List[str]				=							d_model
									_a					:				List[str]				=							encoder_ffn_dim
									_a					:				Tuple				=							encoder_layers
									_a					:				Any				=							encoder_attention_heads
									_a					:				Dict				=							decoder_ffn_dim
									_a					:				Tuple				=							decoder_layers
									_a					:				Optional[Any]				=							decoder_attention_heads
									_a					:				str				=							dropout
									_a					:				Any				=							attention_dropout
									_a					:				List[Any]				=							activation_dropout
									_a					:				List[Any]				=							activation_function
									_a					:				Dict				=							init_std
									_a					:				Tuple				=							encoder_layerdrop
									_a					:				Any				=							decoder_layerdrop
									_a					:				Dict				=							classifier_dropout
									_a					:				Tuple				=							use_cache
									_a					:				Union[str, Any]				=							encoder_layers
									_a					:				str				=							scale_embedding  # scale factor will be sqrt(d_model) if True
									_a					:				Any				=							use_prompt
									_a					:				int				=							prompt_length
									_a					:				int				=							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					:				str				=							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'''

from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


__lowerCAmelCase						      =       logging.get_logger(__name__)

__lowerCAmelCase						      =       {
    '''distilbert-base-uncased''': '''https://huggingface.co/distilbert-base-uncased/resolve/main/config.json''',
    '''distilbert-base-uncased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-uncased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-cased''': '''https://huggingface.co/distilbert-base-cased/resolve/main/config.json''',
    '''distilbert-base-cased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-cased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-german-cased''': '''https://huggingface.co/distilbert-base-german-cased/resolve/main/config.json''',
    '''distilbert-base-multilingual-cased''': (
        '''https://huggingface.co/distilbert-base-multilingual-cased/resolve/main/config.json'''
    ),
    '''distilbert-base-uncased-finetuned-sst-2-english''': (
        '''https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english/resolve/main/config.json'''
    ),
}

class      __magic_name__						(   _UpperCamelCase       ):
							lowerCAmelCase	:   Optional[int]           = 'distilbert'
							lowerCAmelCase	:   Optional[int]           = {
							    'hidden_size': 'dim',
							    'num_attention_heads': 'n_heads',
							    'num_hidden_layers': 'n_layers',
							}







							def __init__(							self :	str     ,_UpperCAmelCase :	Optional[Any]=30522     ,_UpperCAmelCase :	int=512     ,_UpperCAmelCase :	int=False     ,_UpperCAmelCase :	str=6     ,_UpperCAmelCase :	int=12     ,_UpperCAmelCase :	Union[str, Any]=768     ,_UpperCAmelCase :	Optional[Any]=4 * 768     ,_UpperCAmelCase :	int=0.1     ,_UpperCAmelCase :	Union[str, Any]=0.1     ,_UpperCAmelCase :	Tuple="gelu"     ,_UpperCAmelCase :	Any=0.02     ,_UpperCAmelCase :	List[Any]=0.1     ,_UpperCAmelCase :	Dict=0.2     ,_UpperCAmelCase :	Union[str, Any]=0     ,**_UpperCAmelCase :	List[Any]     ,):
									_a					:				Optional[Any]				=							vocab_size
									_a					:				Dict				=							max_position_embeddings
									_a					:				Optional[int]				=							sinusoidal_pos_embds
									_a					:				List[Any]				=							n_layers
									_a					:				Any				=							n_heads
									_a					:				int				=							dim
									_a					:				Optional[Any]				=							hidden_dim
									_a					:				str				=							dropout
									_a					:				Optional[Any]				=							attention_dropout
									_a					:				Any				=							activation
									_a					:				Tuple				=							initializer_range
									_a					:				Union[str, Any]				=							qa_dropout
									_a					:				List[Any]				=							seq_classif_dropout
									super().__init__(**_UpperCAmelCase     ,pad_token_id=_UpperCAmelCase		)

class      __magic_name__						(   _UpperCamelCase       ):







							@property
							def 							__lowercase      (							self :	Union[str, Any]		):
									if self.task == "multiple-choice":
											_a					:				Union[str, Any]				=							{0: 'batch', 1: 'choice', 2: 'sequence'}
									else:
											_a					:				List[str]				=							{0: 'batch', 1: 'sequence'}
									return OrderedDict(
									    [
									        ('input_ids', dynamic_axis),
									        ('attention_mask', dynamic_axis),
									    ]		)




