



"""simple docstring"""





from collections import OrderedDict
from typing import Mapping

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


SCREAMING_SNAKE_CASE				:     List[Any]          =	logging.get_logger(__name__)

SCREAMING_SNAKE_CASE				:     List[Any]          =	{
    """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       __lowerCamelCase	(   a_    ):
   __UpperCamelCase									=   'ernie'







   def __init__(self       ,	lowerCamelCase=30_522       ,	lowerCamelCase=768       ,	lowerCamelCase=12       ,	lowerCamelCase=12       ,	lowerCamelCase=3_072       ,	lowerCamelCase="gelu"       ,	lowerCamelCase=0.1       ,	lowerCamelCase=0.1       ,	lowerCamelCase=512       ,	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=_snake_case       ,	**_snake_case				)

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





class       __lowerCamelCase	(   a_    ):







   @property
   def 							A__						(self				):




      '''simple docstring'''




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


SCREAMING_SNAKE_CASE				:     Union[str, Any]          =	{
    '''configuration_align''': [
        '''ALIGN_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''AlignConfig''',
        '''AlignTextConfig''',
        '''AlignVisionConfig''',
    ],
    '''processing_align''': ['''AlignProcessor'''],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  SCREAMING_SNAKE_CASE				:     Any          =	[
      '''ALIGN_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''AlignModel''',
      '''AlignPreTrainedModel''',
      '''AlignTextModel''',
      '''AlignVisionModel''',
  ]

if TYPE_CHECKING:
  from .configuration_align import (
      ALIGN_PRETRAINED_CONFIG_ARCHIVE_MAP,
      AlignConfig,
      AlignTextConfig,
      AlignVisionConfig,
  )
  from .processing_align import AlignProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_align import (
        ALIGN_PRETRAINED_MODEL_ARCHIVE_LIST,
        AlignModel,
        AlignPreTrainedModel,
        AlignTextModel,
        AlignVisionModel,
    )

else:
  import sys

  SCREAMING_SNAKE_CASE				:     Any          =	_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)