from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_lowerCamelCase					:   int							=		{
    """configuration_xmod""": [
        """XMOD_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """XmodConfig""",
        """XmodOnnxConfig""",
    ],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							_lowerCamelCase					:   str							=		[
							    """XMOD_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """XmodForCausalLM""",
							    """XmodForMaskedLM""",
							    """XmodForMultipleChoice""",
							    """XmodForQuestionAnswering""",
							    """XmodForSequenceClassification""",
							    """XmodForTokenClassification""",
							    """XmodModel""",
							    """XmodPreTrainedModel""",
							]

if TYPE_CHECKING:
							from .configuration_xmod import XMOD_PRETRAINED_CONFIG_ARCHIVE_MAP, XmodConfig, XmodOnnxConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_xmod import (
														    XMOD_PRETRAINED_MODEL_ARCHIVE_LIST,
														    XmodForCausalLM,
														    XmodForMaskedLM,
														    XmodForMultipleChoice,
														    XmodForQuestionAnswering,
														    XmodForSequenceClassification,
														    XmodForTokenClassification,
														    XmodModel,
														    XmodPreTrainedModel,
														)

else:
							import sys

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



from __future__ import annotations

from typing import Dict

from ...configuration_utils import PretrainedConfig


_lowerCamelCase					:   Tuple							=		{
    '''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    (     a     ):
							lowercase__						:       Optional[Any]								=							"""ernie_m"""
							lowercase__						:       Dict[str, str]								=							{"dropout": "classifier_dropout", "num_classes": "num_labels"}




							def __init__(						self   :					Optional[int]	,							_UpperCamelCase   :					int = 250_002	,							_UpperCamelCase   :					int = 768	,							_UpperCamelCase   :					int = 12	,							_UpperCamelCase   :					int = 12	,							_UpperCamelCase   :					int = 3_072	,							_UpperCamelCase   :					str = "gelu"	,							_UpperCamelCase   :					float = 0.1	,							_UpperCamelCase   :					float = 0.1	,							_UpperCamelCase   :					int = 514	,							_UpperCamelCase   :					float = 0.0_2	,							_UpperCamelCase   :					int = 1	,							_UpperCamelCase   :					float = 1e-05	,							_UpperCamelCase   :					int=None	,							_UpperCamelCase   :					int=False	,							_UpperCamelCase   :					int=0.0	,							**_UpperCamelCase   :					Union[str, Any]	,							)					->				Optional[Any]:



												'''simple docstring'''

												super().__init__(pad_token_id=_UpperCamelCase	,							**_UpperCamelCase      )
												SCREAMING_SNAKE_CASE    			=       vocab_size
												SCREAMING_SNAKE_CASE    			=       hidden_size
												SCREAMING_SNAKE_CASE    			=       num_hidden_layers
												SCREAMING_SNAKE_CASE    			=       num_attention_heads
												SCREAMING_SNAKE_CASE    			=       intermediate_size
												SCREAMING_SNAKE_CASE    			=       hidden_act
												SCREAMING_SNAKE_CASE    			=       hidden_dropout_prob
												SCREAMING_SNAKE_CASE    			=       attention_probs_dropout_prob
												SCREAMING_SNAKE_CASE    			=       max_position_embeddings
												SCREAMING_SNAKE_CASE    			=       initializer_range
												SCREAMING_SNAKE_CASE    			=       layer_norm_eps
												SCREAMING_SNAKE_CASE    			=       classifier_dropout
												SCREAMING_SNAKE_CASE    			=       is_decoder
												SCREAMING_SNAKE_CASE    			=       act_dropout




