




from collections import OrderedDict
from typing import Mapping

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


lowercase_     :    Optional[int]      =			logging.get_logger(__name__)

lowercase_     :    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    __lowerCAmelCase			(	snake_case_			):
   snake_case_				:			Tuple								=					"""ernie"""







   def __init__(	self   :      Dict   ,   snake_case__   :      List[str]=30_522   ,   snake_case__   :      int=768   ,   snake_case__   :      Union[str, Any]=12   ,   snake_case__   :      Optional[Any]=12   ,   snake_case__   :      List[str]=3_072   ,   snake_case__   :      Dict="gelu"   ,   snake_case__   :      List[Any]=0.1   ,   snake_case__   :      Any=0.1   ,   snake_case__   :      Tuple=512   ,   snake_case__   :      Optional[int]=2   ,   snake_case__   :      List[Any]=3   ,   snake_case__   :      Tuple=False   ,   snake_case__   :      Any=0.02   ,   snake_case__   :      List[str]=1e-12   ,   snake_case__   :      Optional[int]=0   ,   snake_case__   :      Union[str, Any]="absolute"   ,   snake_case__   :      Optional[Any]=True   ,   snake_case__   :      int=None   ,   **snake_case__   :      List[str]   ,   ):




         """simple docstring"""


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

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






class    __lowerCAmelCase			(	snake_case_			):







   @property
   def UpperCamelCase      (	self   :      List[str]				):




         """simple docstring"""


         if self.task == "multiple-choice":
               _UpperCAmelCase													=					{0: "batch", 1: "choice", 2: "sequence"}
         else:
               _UpperCAmelCase													=					{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 __future__ import annotations


def 							__SCREAMING_SNAKE_CASE  (      snake_case_						):

						'''simple docstring'''


						if len(snake_case_						) == 0:
												raise ValueError("find_max() arg is an empty sequence"						)
						_UpperCAmelCase													=					nums[0]
						for x in nums:
												if x > max_num:
																		_UpperCAmelCase													=					x
						return max_num


if __name__ == "__main__":
				import doctest

				doctest.testmod(verbose=True)




