






"""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"""
class 		a_      :







      '''simple docstring'''

      class 		a_      :







            '''simple docstring'''

            lowerCamelCase__       :				List[Any] =	'_prev', '_data', '_next'




            def __init__(self,     lowerCamelCase_,     lowerCamelCase_,     lowerCamelCase_					):

             '''simple docstring'''



             lowerCamelCase__     :			Optional[int]     				=						link_p
             lowerCamelCase__     :			Optional[Any]     				=						element
             lowerCamelCase__     :			List[Any]     				=						link_n





            def 			a__							(self					):

             '''simple docstring'''



             return (
                 f''' Prev -> {self._prev is not None}, Next -> {self._next is not None}'''
             )




      def __init__(self					):

       '''simple docstring'''



       lowerCamelCase__     :			Any     				=						self._Node(lowerCamelCase_,     lowerCamelCase_,     lowerCamelCase_					)
       lowerCamelCase__     :			Dict     				=						self._Node(lowerCamelCase_,     lowerCamelCase_,     lowerCamelCase_					)
       lowerCamelCase__     :			List[str]     				=						self._trailer
       lowerCamelCase__     :			Union[str, Any]     				=						self._header
       lowerCamelCase__     :			Any     				=						0




      def __len__(self					):

       '''simple docstring'''



       return self._size




      def 			a__							(self					):

       '''simple docstring'''



       return self.__len__() == 0




      def 			a__							(self,     lowerCamelCase_,     lowerCamelCase_,     lowerCamelCase_					):

       '''simple docstring'''



       lowerCamelCase__     :			int     				=						self._Node(lowerCamelCase_,     lowerCamelCase_,     lowerCamelCase_					)
       lowerCamelCase__     :			Optional[int]     				=						new_node
       lowerCamelCase__     :			List[Any]     				=						new_node
       self._size += 1
       return self





      def 			a__							(self,     lowerCamelCase_					):

       '''simple docstring'''



       lowerCamelCase__     :			Optional[Any]     				=						node._prev
       lowerCamelCase__     :			List[str]     				=						node._next

       lowerCamelCase__     :			Tuple     				=						successor
       lowerCamelCase__     :			Tuple     				=						predecessor
       self._size -= 1
       lowerCamelCase__     :			int     				=						node._data
       lowerCamelCase__     :			Dict     				=						None
       del node
       return temp



class 		a_      (	_DoublyLinkedBase ):







      '''simple docstring'''

      def 			a__							(self					):

       '''simple docstring'''



       if self.is_empty():
        raise Exception('List is empty'					)
       return self._header._next._data




      def 			a__							(self					):

       '''simple docstring'''



       if self.is_empty():
        raise Exception('List is empty'					)
       return self._trailer._prev._data




      def 			a__							(self,     lowerCamelCase_					):

       '''simple docstring'''



       return self._insert(self._header,     lowerCamelCase_,     self._header._next					)




      def 			a__							(self,     lowerCamelCase_					):

       '''simple docstring'''



       return self._insert(self._trailer._prev,     lowerCamelCase_,     self._trailer					)




      def 			a__							(self					):

       '''simple docstring'''



       if self.is_empty():
        raise IndexError('remove_first from empty list'					)
       return self._delete(self._header._next					)





      def 			a__							(self					):

       '''simple docstring'''



       if self.is_empty():
        raise IndexError('remove_first from empty list'					)
       return self._delete(self._trailer._prev					)

