


from collections import OrderedDict
from typing import Mapping

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


lowerCAmelCase__       :	str     				=logging.get_logger(__name__)

lowerCAmelCase__       :	str     				={
    'nghuyong/ernie-1.0-base-zh': 'https://huggingface.co/nghuyong/ernie-1.0-base-zh/resolve/main/config.json',
    'nghuyong/ernie-2.0-base-en': 'https://huggingface.co/nghuyong/ernie-2.0-base-en/resolve/main/config.json',
    'nghuyong/ernie-2.0-large-en': 'https://huggingface.co/nghuyong/ernie-2.0-large-en/resolve/main/config.json',
    'nghuyong/ernie-3.0-base-zh': 'https://huggingface.co/nghuyong/ernie-3.0-base-zh/resolve/main/config.json',
    'nghuyong/ernie-3.0-medium-zh': 'https://huggingface.co/nghuyong/ernie-3.0-medium-zh/resolve/main/config.json',
    'nghuyong/ernie-3.0-mini-zh': 'https://huggingface.co/nghuyong/ernie-3.0-mini-zh/resolve/main/config.json',
    'nghuyong/ernie-3.0-micro-zh': 'https://huggingface.co/nghuyong/ernie-3.0-micro-zh/resolve/main/config.json',
    'nghuyong/ernie-3.0-nano-zh': 'https://huggingface.co/nghuyong/ernie-3.0-nano-zh/resolve/main/config.json',
    'nghuyong/ernie-gram-zh': 'https://huggingface.co/nghuyong/ernie-gram-zh/resolve/main/config.json',
    'nghuyong/ernie-health-zh': 'https://huggingface.co/nghuyong/ernie-health-zh/resolve/main/config.json',
}







class      __lowercase  (__SCREAMING_SNAKE_CASE   ):





							"""simple docstring"""







							_UpperCAmelCase     =		"""ernie"""






							def __init__(	self       ,		lowerCAmelCase__=3_0_5_2_2       ,		lowerCAmelCase__=7_6_8       ,		lowerCAmelCase__=1_2       ,		lowerCAmelCase__=1_2       ,		lowerCAmelCase__=3_0_7_2       ,		lowerCAmelCase__="gelu"       ,		lowerCAmelCase__=0.1       ,		lowerCAmelCase__=0.1       ,		lowerCAmelCase__=5_1_2       ,		lowerCAmelCase__=2       ,		lowerCAmelCase__=3       ,		lowerCAmelCase__=False       ,		lowerCAmelCase__=0.02       ,		lowerCAmelCase__=1E-12       ,		lowerCAmelCase__=0       ,		lowerCAmelCase__="absolute"       ,		lowerCAmelCase__=True       ,		lowerCAmelCase__=None       ,		**lowerCAmelCase__       ,		):





										"""simple docstring"""




										super().__init__(pad_token_id=lowerCAmelCase__       ,		**lowerCAmelCase__    )

										SCREAMING_SNAKE_CASE_						:			Union[str, Any]       						= vocab_size
										SCREAMING_SNAKE_CASE_						:			Optional[int]       						= hidden_size
										SCREAMING_SNAKE_CASE_						:			Optional[Any]       						= num_hidden_layers
										SCREAMING_SNAKE_CASE_						:			Any       						= num_attention_heads
										SCREAMING_SNAKE_CASE_						:			Dict       						= hidden_act
										SCREAMING_SNAKE_CASE_						:			List[Any]       						= intermediate_size
										SCREAMING_SNAKE_CASE_						:			Tuple       						= hidden_dropout_prob
										SCREAMING_SNAKE_CASE_						:			Optional[int]       						= attention_probs_dropout_prob
										SCREAMING_SNAKE_CASE_						:			Optional[int]       						= max_position_embeddings
										SCREAMING_SNAKE_CASE_						:			Optional[Any]       						= type_vocab_size
										SCREAMING_SNAKE_CASE_						:			Tuple       						= task_type_vocab_size
										SCREAMING_SNAKE_CASE_						:			List[Any]       						= use_task_id
										SCREAMING_SNAKE_CASE_						:			str       						= initializer_range
										SCREAMING_SNAKE_CASE_						:			List[Any]       						= layer_norm_eps
										SCREAMING_SNAKE_CASE_						:			str       						= position_embedding_type
										SCREAMING_SNAKE_CASE_						:			str       						= use_cache
										SCREAMING_SNAKE_CASE_						:			Optional[int]       						= classifier_dropout







class      __lowercase  (__SCREAMING_SNAKE_CASE   ):





							"""simple docstring"""







							@property
							def  UpperCamelCase__			(	self    ):





										"""simple docstring"""




										if self.task == "multiple-choice":
													SCREAMING_SNAKE_CASE_						:			Optional[Any]       						= {0: 'batch', 1: 'choice', 2: 'sequence'}
										else:
													SCREAMING_SNAKE_CASE_						:			List[str]       						= {0: 'batch', 1: 'sequence'}
										return OrderedDict(
										    [
										        ('input_ids', dynamic_axis),
										        ('attention_mask', dynamic_axis),
										        ('token_type_ids', dynamic_axis),
										        ('task_type_ids', dynamic_axis),
										    ]    )









from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_tokenizers_available


lowerCAmelCase__       :	List[Any]     				={}

try:
				if not is_sentencepiece_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowerCAmelCase__       :	Optional[Any]     				=['MBart50Tokenizer']

try:
				if not is_tokenizers_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				lowerCAmelCase__       :	Any     				=['MBart50TokenizerFast']


if TYPE_CHECKING:
				try:
								if not is_sentencepiece_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .tokenization_mbartaa import MBartaaTokenizer

				try:
								if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .tokenization_mbartaa_fast import MBartaaTokenizerFast

else:
				import sys

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





