


'''simple docstring'''



import warnings

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


__lowercase     :						Any	=     logging.get_logger(__name__)

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





class 							__UpperCamelCase    (		lowerCAmelCase_ ):
	A_           =   "mvp"
	A_           =   ["past_key_values"]
	A_           =   {"num_attention_heads": "encoder_attention_heads", "hidden_size": "d_model"}




	def __init__(       self						,    __a=5_0267						,    __a=1024						,    __a=12						,    __a=4096						,    __a=16						,    __a=12						,    __a=4096						,    __a=16						,    __a=0.0						,    __a=0.0						,    __a="gelu"						,    __a=1024						,    __a=0.1						,    __a=0.0						,    __a=0.0						,    __a=0.02						,    __a=0.0						,    __a=False						,    __a=True						,    __a=1						,    __a=0						,    __a=2						,    __a=True						,    __a=2						,    __a=2						,    __a=False						,    __a=100						,    __a=800						,    **__a						,    ):

						'''simple docstring'''





						__a      :	Any    =  vocab_size
						__a      :	Optional[Any]    =  max_position_embeddings
						__a      :	List[str]    =  d_model
						__a      :	Optional[int]    =  encoder_ffn_dim
						__a      :	str    =  encoder_layers
						__a      :	Any    =  encoder_attention_heads
						__a      :	Optional[int]    =  decoder_ffn_dim
						__a      :	Union[str, Any]    =  decoder_layers
						__a      :	Optional[Any]    =  decoder_attention_heads
						__a      :	Optional[Any]    =  dropout
						__a      :	int    =  attention_dropout
						__a      :	List[str]    =  activation_dropout
						__a      :	Union[str, Any]    =  activation_function
						__a      :	str    =  init_std
						__a      :	str    =  encoder_layerdrop
						__a      :	Optional[int]    =  decoder_layerdrop
						__a      :	Optional[Any]    =  classifier_dropout
						__a      :	Tuple    =  use_cache
						__a      :	List[str]    =  encoder_layers
						__a      :	Union[str, Any]    =  scale_embedding  # scale factor will be sqrt(d_model) if True
						__a      :	Union[str, Any]    =  use_prompt
						__a      :	List[str]    =  prompt_length
						__a      :	List[Any]    =  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							):
											__a      :	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.'							)







'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


__lowercase     :						Tuple	=     {
    'configuration_distilbert': [
        'DISTILBERT_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'DistilBertConfig',
        'DistilBertOnnxConfig',
    ],
    'tokenization_distilbert': ['DistilBertTokenizer'],
}

try:
	if not is_tokenizers_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	__lowercase     :						str	=     ['DistilBertTokenizerFast']

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	__lowercase     :						Any	=     [
	    'DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'DistilBertForMaskedLM',
	    'DistilBertForMultipleChoice',
	    'DistilBertForQuestionAnswering',
	    'DistilBertForSequenceClassification',
	    'DistilBertForTokenClassification',
	    'DistilBertModel',
	    'DistilBertPreTrainedModel',
	]

try:
	if not is_tf_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	__lowercase     :						List[str]	=     [
	    'TF_DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'TFDistilBertForMaskedLM',
	    'TFDistilBertForMultipleChoice',
	    'TFDistilBertForQuestionAnswering',
	    'TFDistilBertForSequenceClassification',
	    'TFDistilBertForTokenClassification',
	    'TFDistilBertMainLayer',
	    'TFDistilBertModel',
	    'TFDistilBertPreTrainedModel',
	]

try:
	if not is_flax_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	__lowercase     :						List[str]	=     [
	    'FlaxDistilBertForMaskedLM',
	    'FlaxDistilBertForMultipleChoice',
	    'FlaxDistilBertForQuestionAnswering',
	    'FlaxDistilBertForSequenceClassification',
	    'FlaxDistilBertForTokenClassification',
	    'FlaxDistilBertModel',
	    'FlaxDistilBertPreTrainedModel',
	]


if TYPE_CHECKING:
	from .configuration_distilbert import (
	    DISTILBERT_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    DistilBertConfig,
	    DistilBertOnnxConfig,
	)
	from .tokenization_distilbert import DistilBertTokenizer

	try:
		if not is_tokenizers_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .tokenization_distilbert_fast import DistilBertTokenizerFast

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_distilbert import (
		    DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    DistilBertForMaskedLM,
		    DistilBertForMultipleChoice,
		    DistilBertForQuestionAnswering,
		    DistilBertForSequenceClassification,
		    DistilBertForTokenClassification,
		    DistilBertModel,
		    DistilBertPreTrainedModel,
		)

	try:
		if not is_tf_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_tf_distilbert import (
		    TF_DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TFDistilBertForMaskedLM,
		    TFDistilBertForMultipleChoice,
		    TFDistilBertForQuestionAnswering,
		    TFDistilBertForSequenceClassification,
		    TFDistilBertForTokenClassification,
		    TFDistilBertMainLayer,
		    TFDistilBertModel,
		    TFDistilBertPreTrainedModel,
		)

	try:
		if not is_flax_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_flax_distilbert import (
		    FlaxDistilBertForMaskedLM,
		    FlaxDistilBertForMultipleChoice,
		    FlaxDistilBertForQuestionAnswering,
		    FlaxDistilBertForSequenceClassification,
		    FlaxDistilBertForTokenClassification,
		    FlaxDistilBertModel,
		    FlaxDistilBertPreTrainedModel,
		)

else:
	import sys

	__lowercase     :						int	=     _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



