






"""simple docstring"""
from collections import OrderedDict
from typing import Mapping

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


A_			: Dict				=			logging.get_logger(__name__)

A_			: int				=			{
    "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 		a_      (	snake_case_ ):







      '''simple docstring'''

      lowerCamelCase__       :				int =	'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_					)

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



class 		a_      (	snake_case_ ):







      '''simple docstring'''

      @property
      def 			a__							(self					):

       '''simple docstring'''



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








"""simple docstring"""
from typing import TYPE_CHECKING

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


__UpperCamelCase			:		List[Any]		    =   {'''configuration_yoso''': ['''YOSO_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''YosoConfig''']}

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase			:		Dict		    =   [
           '''YOSO_PRETRAINED_MODEL_ARCHIVE_LIST''',
           '''YosoForMaskedLM''',
           '''YosoForMultipleChoice''',
           '''YosoForQuestionAnswering''',
           '''YosoForSequenceClassification''',
           '''YosoForTokenClassification''',
           '''YosoLayer''',
           '''YosoModel''',
           '''YosoPreTrainedModel''',
       ]


if TYPE_CHECKING:
       from .configuration_yoso import YOSO_PRETRAINED_CONFIG_ARCHIVE_MAP, YosoConfig

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_yoso import (
                  YOSO_PRETRAINED_MODEL_ARCHIVE_LIST,
                  YosoForMaskedLM,
                  YosoForMultipleChoice,
                  YosoForQuestionAnswering,
                  YosoForSequenceClassification,
                  YosoForTokenClassification,
                  YosoLayer,
                  YosoModel,
                  YosoPreTrainedModel,
              )


else:
       import sys

       __UpperCamelCase			:		Any		    =   _LazyModule(__name__, globals()['''__file__'''], _import_structure)





