





from collections import OrderedDict
from typing import Mapping

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


__A							   =							logging.get_logger(__name__)

__A							   =							{
    "YituTech/conv-bert-base": "https://huggingface.co/YituTech/conv-bert-base/resolve/main/config.json",
    "YituTech/conv-bert-medium-small": (
        "https://huggingface.co/YituTech/conv-bert-medium-small/resolve/main/config.json"
    ),
    "YituTech/conv-bert-small": "https://huggingface.co/YituTech/conv-bert-small/resolve/main/config.json",
    # See all ConvBERT models at https://huggingface.co/models?filter=convbert
}



class   _SCREAMING_SNAKE_CASE		(      __SCREAMING_SNAKE_CASE       ):







 '''simple docstring'''
 lowercase_						=     "convbert"

 def __init__(self							:  List[str]			,					UpperCAmelCase_							:  Any=30_522			,					UpperCAmelCase_							:  Optional[int]=768			,					UpperCAmelCase_							:  Optional[int]=12			,					UpperCAmelCase_							:  Optional[Any]=12			,					UpperCAmelCase_							:  List[str]=3_072			,					UpperCAmelCase_							:  Dict="gelu"			,					UpperCAmelCase_							:  int=0.1			,					UpperCAmelCase_							:  Any=0.1			,					UpperCAmelCase_							:  List[str]=512			,					UpperCAmelCase_							:  List[str]=2			,					UpperCAmelCase_							:  Tuple=0.02			,					UpperCAmelCase_							:  List[str]=1E-1_2			,					UpperCAmelCase_							:  Optional[int]=1			,					UpperCAmelCase_							:  Union[str, Any]=0			,					UpperCAmelCase_							:  Tuple=2			,					UpperCAmelCase_							:  Optional[int]=768			,					UpperCAmelCase_							:  Dict=2			,					UpperCAmelCase_							:  Optional[int]=9			,					UpperCAmelCase_							:  List[str]=1			,					UpperCAmelCase_							:  Union[str, Any]=None			,					**UpperCAmelCase_							:  Optional[int]			,					)			->List[Any]:



   '''simple docstring'''



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

   lowerCamelCase__: Any         =vocab_size
   lowerCamelCase__: Optional[Any]         =hidden_size
   lowerCamelCase__: List[Any]         =num_hidden_layers
   lowerCamelCase__: List[str]         =num_attention_heads
   lowerCamelCase__: Dict         =intermediate_size
   lowerCamelCase__: List[Any]         =hidden_act
   lowerCamelCase__: List[str]         =hidden_dropout_prob
   lowerCamelCase__: List[Any]         =attention_probs_dropout_prob
   lowerCamelCase__: Union[str, Any]         =max_position_embeddings
   lowerCamelCase__: str         =type_vocab_size
   lowerCamelCase__: str         =initializer_range
   lowerCamelCase__: Optional[Any]         =layer_norm_eps
   lowerCamelCase__: Optional[int]         =embedding_size
   lowerCamelCase__: List[str]         =head_ratio
   lowerCamelCase__: Optional[Any]         =conv_kernel_size
   lowerCamelCase__: int         =num_groups
   lowerCamelCase__: List[str]         =classifier_dropout



class   _SCREAMING_SNAKE_CASE		(      __SCREAMING_SNAKE_CASE       ):







 '''simple docstring'''

 @property
 def 				SCREAMING_SNAKE_CASE_   (self							:  Union[str, Any])			->Mapping[str, Mapping[int, str]]:



   '''simple docstring'''



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






'''simple docstring'''





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


A__    :   Optional[Any]           =					{
    '''configuration_squeezebert''': [
        '''SQUEEZEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''SqueezeBertConfig''',
        '''SqueezeBertOnnxConfig''',
    ],
    '''tokenization_squeezebert''': ['''SqueezeBertTokenizer'''],
}

try:
    if not is_tokenizers_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    A__    :   Tuple           =					['''SqueezeBertTokenizerFast''']

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    A__    :   str           =					[
        '''SQUEEZEBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
        '''SqueezeBertForMaskedLM''',
        '''SqueezeBertForMultipleChoice''',
        '''SqueezeBertForQuestionAnswering''',
        '''SqueezeBertForSequenceClassification''',
        '''SqueezeBertForTokenClassification''',
        '''SqueezeBertModel''',
        '''SqueezeBertModule''',
        '''SqueezeBertPreTrainedModel''',
    ]


if TYPE_CHECKING:
    from .configuration_squeezebert import (
        SQUEEZEBERT_PRETRAINED_CONFIG_ARCHIVE_MAP,
        SqueezeBertConfig,
        SqueezeBertOnnxConfig,
    )
    from .tokenization_squeezebert import SqueezeBertTokenizer

    try:
        if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_squeezebert_fast import SqueezeBertTokenizerFast

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_squeezebert import (
            SQUEEZEBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
            SqueezeBertForMaskedLM,
            SqueezeBertForMultipleChoice,
            SqueezeBertForQuestionAnswering,
            SqueezeBertForSequenceClassification,
            SqueezeBertForTokenClassification,
            SqueezeBertModel,
            SqueezeBertModule,
            SqueezeBertPreTrainedModel,
        )

else:
    import sys

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



