
from __future__ import annotations

from typing import Dict

from ...configuration_utils import PretrainedConfig


_A  =	{
    "susnato/ernie-m-base_pytorch": "https://huggingface.co/susnato/ernie-m-base_pytorch/blob/main/config.json",
    "susnato/ernie-m-large_pytorch": "https://huggingface.co/susnato/ernie-m-large_pytorch/blob/main/config.json",
}





class       _lowerCAmelCase   (      __a			):
				_lowercase     						='''ernie_m'''
				_lowercase     						={"dropout": "classifier_dropout", "num_classes": "num_labels"}




				def __init__(   self							,							_UpperCamelCase = 250_002							,							_UpperCamelCase = 768							,							_UpperCamelCase = 12							,							_UpperCamelCase = 12							,							_UpperCamelCase = 3_072							,							_UpperCamelCase = "gelu"							,							_UpperCamelCase = 0.1							,							_UpperCamelCase = 0.1							,							_UpperCamelCase = 514							,							_UpperCamelCase = 0.02							,							_UpperCamelCase = 1							,							_UpperCamelCase = 1e-0_5							,							_UpperCamelCase=None							,							_UpperCamelCase=False							,							_UpperCamelCase=0.0							,							**_UpperCamelCase							,							)							-> Tuple:
							super().__init__(pad_token_id=_UpperCamelCase							,							**_UpperCamelCase	)
							lowerCAmelCase_         =      vocab_size
							lowerCAmelCase_         =      hidden_size
							lowerCAmelCase_         =      num_hidden_layers
							lowerCAmelCase_         =      num_attention_heads
							lowerCAmelCase_         =      intermediate_size
							lowerCAmelCase_         =      hidden_act
							lowerCAmelCase_         =      hidden_dropout_prob
							lowerCAmelCase_         =      attention_probs_dropout_prob
							lowerCAmelCase_         =      max_position_embeddings
							lowerCAmelCase_         =      initializer_range
							lowerCAmelCase_         =      layer_norm_eps
							lowerCAmelCase_         =      classifier_dropout
							lowerCAmelCase_         =      is_decoder
							lowerCAmelCase_         =      act_dropout





from typing import Optional
from urllib.parse import quote

import huggingface_hub as hfh
from packaging import version






def   lowerCamelCase__							(							__lowerCAmelCase    :    str       ,				__lowerCAmelCase    :    str       ,				__lowerCAmelCase    :    Optional[str] = None							):




			"""simple docstring"""


			if version.parse(hfh.__version__							).release < version.parse("0.11.0"							).release:
						# old versions of hfh don't url-encode the file path
						lowerCAmelCase_         =      quote(__lowerCAmelCase							)
			return hfh.hf_hub_url(__lowerCAmelCase       ,				__lowerCAmelCase       ,				repo_type="dataset"       ,				revision=__lowerCAmelCase							)



