



from collections import OrderedDict
from typing import Mapping

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


UpperCAmelCase__			:   Union[str, Any]      			=    logging.get_logger(__name__)

UpperCAmelCase__			:   Union[str, Any]      			=    {
    'squeezebert/squeezebert-uncased': (
        'https://huggingface.co/squeezebert/squeezebert-uncased/resolve/main/config.json'
    ),
    'squeezebert/squeezebert-mnli': 'https://huggingface.co/squeezebert/squeezebert-mnli/resolve/main/config.json',
    'squeezebert/squeezebert-mnli-headless': (
        'https://huggingface.co/squeezebert/squeezebert-mnli-headless/resolve/main/config.json'
    ),
}





class 							lowerCAmelCase_		(		lowercase_     ):
		SCREAMING_SNAKE_CASE_       :			str					       =	SQUEEZEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP
		SCREAMING_SNAKE_CASE_       :			Union[str, Any]					       =	"""squeezebert"""







		def __init__(    self  :   Optional[int]       ,		UpperCAmelCase_  :   Any=30522       ,		UpperCAmelCase_  :   Union[str, Any]=768       ,		UpperCAmelCase_  :   int=12       ,		UpperCAmelCase_  :   Optional[int]=12       ,		UpperCAmelCase_  :   Optional[int]=3072       ,		UpperCAmelCase_  :   List[str]="gelu"       ,		UpperCAmelCase_  :   Tuple=0.1       ,		UpperCAmelCase_  :   str=0.1       ,		UpperCAmelCase_  :   List[str]=512       ,		UpperCAmelCase_  :   Optional[int]=2       ,		UpperCAmelCase_  :   Union[str, Any]=0.02       ,		UpperCAmelCase_  :   Tuple=1E-12       ,		UpperCAmelCase_  :   List[str]=0       ,		UpperCAmelCase_  :   Optional[int]=768       ,		UpperCAmelCase_  :   str=4       ,		UpperCAmelCase_  :   List[Any]=4       ,		UpperCAmelCase_  :   Optional[Any]=4       ,		UpperCAmelCase_  :   Optional[Any]=1       ,		UpperCAmelCase_  :   Tuple=4       ,		UpperCAmelCase_  :   Union[str, Any]=4       ,		**UpperCAmelCase_  :   Any       ,		)       ->		List[str]:


						'''simple docstring'''







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

						_UpperCAmelCase						:  str     					=	vocab_size
						_UpperCAmelCase						:  List[str]     					=	hidden_size
						_UpperCAmelCase						:  Dict     					=	num_hidden_layers
						_UpperCAmelCase						:  Optional[Any]     					=	num_attention_heads
						_UpperCAmelCase						:  str     					=	hidden_act
						_UpperCAmelCase						:  List[str]     					=	intermediate_size
						_UpperCAmelCase						:  List[str]     					=	hidden_dropout_prob
						_UpperCAmelCase						:  Optional[Any]     					=	attention_probs_dropout_prob
						_UpperCAmelCase						:  List[Any]     					=	max_position_embeddings
						_UpperCAmelCase						:  Union[str, Any]     					=	type_vocab_size
						_UpperCAmelCase						:  Any     					=	initializer_range
						_UpperCAmelCase						:  int     					=	layer_norm_eps
						_UpperCAmelCase						:  Dict     					=	embedding_size
						_UpperCAmelCase						:  List[str]     					=	q_groups
						_UpperCAmelCase						:  List[Any]     					=	k_groups
						_UpperCAmelCase						:  Optional[Any]     					=	v_groups
						_UpperCAmelCase						:  Union[str, Any]     					=	post_attention_groups
						_UpperCAmelCase						:  List[Any]     					=	intermediate_groups
						_UpperCAmelCase						:  Union[str, Any]     					=	output_groups





class 							lowerCAmelCase_		(		lowercase_     ):







		@property
		def 					a_  (    self  :   Dict					)       ->		Mapping[str, Mapping[int, str]]:


						'''simple docstring'''







						if self.task == "multiple-choice":
										_UpperCAmelCase						:  Tuple     					=	{0: '''batch''', 1: '''choice''', 2: '''sequence'''}
						else:
										_UpperCAmelCase						:  Optional[Any]     					=	{0: '''batch''', 1: '''sequence'''}
						return OrderedDict(
						    [
						        ('''input_ids''', dynamic_axis),
						        ('''attention_mask''', dynamic_axis),
						        ('''token_type_ids''', dynamic_axis),
						    ]					)





from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_torch_available


UpperCAmelCase__			:   Optional[int]      			=    {
    'configuration_ernie_m': ['ERNIE_M_PRETRAINED_CONFIG_ARCHIVE_MAP', 'ErnieMConfig'],
}

try:
					if not is_sentencepiece_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCAmelCase__			:   List[Any]      			=    ['ErnieMTokenizer']

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCAmelCase__			:   Dict      			=    [
					    'ERNIE_M_PRETRAINED_MODEL_ARCHIVE_LIST',
					    'ErnieMForMultipleChoice',
					    'ErnieMForQuestionAnswering',
					    'ErnieMForSequenceClassification',
					    'ErnieMForTokenClassification',
					    'ErnieMModel',
					    'ErnieMPreTrainedModel',
					    'ErnieMForInformationExtraction',
					]


if TYPE_CHECKING:
					from .configuration_ernie_m import ERNIE_M_PRETRAINED_CONFIG_ARCHIVE_MAP, ErnieMConfig

					try:
										if not is_sentencepiece_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_ernie_m import ErnieMTokenizer

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_ernie_m import (
										    ERNIE_M_PRETRAINED_MODEL_ARCHIVE_LIST,
										    ErnieMForInformationExtraction,
										    ErnieMForMultipleChoice,
										    ErnieMForQuestionAnswering,
										    ErnieMForSequenceClassification,
										    ErnieMForTokenClassification,
										    ErnieMModel,
										    ErnieMPreTrainedModel,
										)


else:
					import sys

					UpperCAmelCase__			:   Union[str, Any]      			=    _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)
