






'''simple docstring'''
from collections import OrderedDict
from typing import Mapping

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


UpperCamelCase__ =			logging.get_logger(__name__)

UpperCamelCase__ =			{
    '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        _UpperCAmelCase						(		snake_case			):
    __lowerCamelCase:   List[str]		       =    'convbert'




    def __init__(			self  :       Optional[Any]  ,     a  :       Tuple=3_0_5_2_2  ,     a  :       Dict=7_6_8  ,     a  :       Any=1_2  ,     a  :       List[Any]=1_2  ,     a  :       Any=3_0_7_2  ,     a  :       Optional[Any]="gelu"  ,     a  :       int=0.1  ,     a  :       Optional[int]=0.1  ,     a  :       Tuple=5_1_2  ,     a  :       int=2  ,     a  :       str=0.02  ,     a  :       Union[str, Any]=1e-12  ,     a  :       Tuple=1  ,     a  :       Tuple=0  ,     a  :       Any=2  ,     a  :       Any=7_6_8  ,     a  :       Tuple=2  ,     a  :       Any=9  ,     a  :       str=1  ,     a  :       str=None  ,     **a  :       List[str]  ,     ):






       '''simple docstring'''






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

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


class        _UpperCAmelCase						(		snake_case			):




    @property
    def 				lowerCAmelCase__				(			self  :       Optional[Any]			):






       '''simple docstring'''






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












'''simple docstring'''
def 		__SCREAMING_SNAKE_CASE					(  _UpperCamelCase							):


   """simple docstring"""




   if number < 0:
      raise ValueError("number must not be negative"							)
   return number & (number - 1) == 0


if __name__ == "__main__":
 import doctest

 doctest.testmod()




