

from __future__ import annotations

from typing import Dict

from ...configuration_utils import PretrainedConfig


lowerCAmelCase							:  Any   	=						{
    """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   __lowercase				( UpperCAmelCase_	):




			"""simple docstring"""







			_UpperCAmelCase   :							Tuple										=     '''ernie_m'''
			_UpperCAmelCase   :							Dict[str, str]										=     {"dropout": "classifier_dropout", "num_classes": "num_labels"}



			def __init__( self  :     List[str]   ,						lowerCAmelCase__  :     int = 25_0002   ,						lowerCAmelCase__  :     int = 768   ,						lowerCAmelCase__  :     int = 12   ,						lowerCAmelCase__  :     int = 12   ,						lowerCAmelCase__  :     int = 3072   ,						lowerCAmelCase__  :     str = "gelu"   ,						lowerCAmelCase__  :     float = 0.1   ,						lowerCAmelCase__  :     float = 0.1   ,						lowerCAmelCase__  :     int = 514   ,						lowerCAmelCase__  :     float = 0.02   ,						lowerCAmelCase__  :     int = 1   ,						lowerCAmelCase__  :     float = 1E-05   ,						lowerCAmelCase__  :     str=None   ,						lowerCAmelCase__  :     Union[str, Any]=False   ,						lowerCAmelCase__  :     Tuple=0.0   ,						**lowerCAmelCase__  :     Any   ,						):
									super().__init__(pad_token_id=lowerCAmelCase__   ,						**lowerCAmelCase__)
									SCREAMING_SNAKE_CASE_: Any  		=       vocab_size
									SCREAMING_SNAKE_CASE_: str  		=       hidden_size
									SCREAMING_SNAKE_CASE_: Dict  		=       num_hidden_layers
									SCREAMING_SNAKE_CASE_: Any  		=       num_attention_heads
									SCREAMING_SNAKE_CASE_: List[Any]  		=       intermediate_size
									SCREAMING_SNAKE_CASE_: Any  		=       hidden_act
									SCREAMING_SNAKE_CASE_: Optional[int]  		=       hidden_dropout_prob
									SCREAMING_SNAKE_CASE_: Any  		=       attention_probs_dropout_prob
									SCREAMING_SNAKE_CASE_: int  		=       max_position_embeddings
									SCREAMING_SNAKE_CASE_: Optional[int]  		=       initializer_range
									SCREAMING_SNAKE_CASE_: List[str]  		=       layer_norm_eps
									SCREAMING_SNAKE_CASE_: str  		=       classifier_dropout
									SCREAMING_SNAKE_CASE_: Optional[int]  		=       is_decoder
									SCREAMING_SNAKE_CASE_: List[str]  		=       act_dropout











from ...configuration_utils import PretrainedConfig
from ...utils import logging


A__  :  List[str]								=					logging.get_logger(__name__)

A__  :  int								=					{
    '''weiweishi/roc-bert-base-zh''': '''https://huggingface.co/weiweishi/roc-bert-base-zh/resolve/main/config.json''',
}



class 				__snake_case						(     UpperCamelCase_						):
							_a			      = '''roc_bert'''




							def __init__(       self     :       List[Any]				,				A_     :       Optional[Any]=3_0_5_2_2				,				A_     :       List[str]=7_6_8				,				A_     :       Tuple=1_2				,				A_     :       List[str]=1_2				,				A_     :       List[str]=3_0_7_2				,				A_     :       Any="gelu"				,				A_     :       str=0.1				,				A_     :       int=0.1				,				A_     :       Optional[int]=5_1_2				,				A_     :       int=2				,				A_     :       List[str]=0.02				,				A_     :       Union[str, Any]=1e-12				,				A_     :       Union[str, Any]=True				,				A_     :       Tuple=0				,				A_     :       Union[str, Any]="absolute"				,				A_     :       Optional[Any]=None				,				A_     :       Any=True				,				A_     :       Optional[int]=True				,				A_     :       List[Any]=7_6_8				,				A_     :       str=9_1_0				,				A_     :       Dict=5_1_2				,				A_     :       Optional[int]=2_4_8_5_8				,				A_     :       Optional[Any]=True				,				**A_     :       Dict				,				):
									lowerCAmelCase_			:     List[str]									= vocab_size
									lowerCAmelCase_			:     Any									= max_position_embeddings
									lowerCAmelCase_			:     Dict									= hidden_size
									lowerCAmelCase_			:     Union[str, Any]									= num_hidden_layers
									lowerCAmelCase_			:     Tuple									= num_attention_heads
									lowerCAmelCase_			:     int									= intermediate_size
									lowerCAmelCase_			:     Tuple									= hidden_act
									lowerCAmelCase_			:     List[str]									= hidden_dropout_prob
									lowerCAmelCase_			:     Tuple									= attention_probs_dropout_prob
									lowerCAmelCase_			:     Any									= initializer_range
									lowerCAmelCase_			:     Union[str, Any]									= type_vocab_size
									lowerCAmelCase_			:     Union[str, Any]									= layer_norm_eps
									lowerCAmelCase_			:     Optional[int]									= use_cache
									lowerCAmelCase_			:     Tuple									= enable_pronunciation
									lowerCAmelCase_			:     Optional[Any]									= enable_shape
									lowerCAmelCase_			:     Union[str, Any]									= pronunciation_embed_dim
									lowerCAmelCase_			:     List[Any]									= pronunciation_vocab_size
									lowerCAmelCase_			:     Tuple									= shape_embed_dim
									lowerCAmelCase_			:     str									= shape_vocab_size
									lowerCAmelCase_			:     Optional[int]									= concat_input
									lowerCAmelCase_			:     Optional[Any]									= position_embedding_type
									lowerCAmelCase_			:     Optional[Any]									= classifier_dropout
									super().__init__(pad_token_id=A_				,				**A_)





