


"""simple docstring"""







from collections import OrderedDict
from typing import Mapping

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


lowerCamelCase_  :  Dict     		=    logging.get_logger(__name__)

lowerCamelCase_  :  List[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  __A							(			a__     ):






 """simple docstring"""




 __lowerCAmelCase					   =    """ernie"""


 def __init__(						self					,       __A=3_0522					,       __A=768					,       __A=12					,       __A=12					,       __A=3072					,       __A="gelu"					,       __A=0.1					,       __A=0.1					,       __A=512					,       __A=2					,       __A=3					,       __A=False					,       __A=0.02					,       __A=1E-1_2					,       __A=0					,       __A="absolute"					,       __A=True					,       __A=None					,       **__A					,       )   ->	Optional[int]:
     super().__init__(pad_token_id=lowercase__					,       **lowercase__		)

     a											=vocab_size
     a											=hidden_size
     a											=num_hidden_layers
     a											=num_attention_heads
     a											=hidden_act
     a											=intermediate_size
     a											=hidden_dropout_prob
     a											=attention_probs_dropout_prob
     a											=max_position_embeddings
     a											=type_vocab_size
     a											=task_type_vocab_size
     a											=use_task_id
     a											=initializer_range
     a											=layer_norm_eps
     a											=position_embedding_type
     a											=use_cache
     a											=classifier_dropout






class  __A							(			a__     ):






 """simple docstring"""




 @property
 def  SCREAMING_SNAKE_CASE				(						self		)   ->	Mapping[str, Mapping[int, str]]:





     if self.task == "multiple-choice":
         a											={0: '''batch''', 1: '''choice''', 2: '''sequence'''}
     else:
         a											={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_tf_available, is_torch_available


UpperCAmelCase       :		Dict		=				{'configuration_hubert': ['HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'HubertConfig']}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase       :		Union[str, Any]		=				[
       'HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
       'HubertForCTC',
       'HubertForSequenceClassification',
       'HubertModel',
       'HubertPreTrainedModel',
   ]


try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase       :		Optional[int]		=				[
       'TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
       'TFHubertForCTC',
       'TFHubertModel',
       'TFHubertPreTrainedModel',
   ]

if TYPE_CHECKING:
   from .configuration_hubert import HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, HubertConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_hubert import (
          HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          HubertForCTC,
          HubertForSequenceClassification,
          HubertModel,
          HubertPreTrainedModel,
      )

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_hubert import (
          TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFHubertForCTC,
          TFHubertModel,
          TFHubertPreTrainedModel,
      )


else:
   import sys

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


