'''simple docstring'''

from collections import OrderedDict
from typing import Mapping

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


_A			:      Any					      =				logging.get_logger(__name__)

_A			:      Any					      =				{
    '''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 				_lowercase     (				UpperCAmelCase__			):


 '''simple docstring'''






 _SCREAMING_SNAKE_CASE     :       Optional[Any]      	=					"""convbert"""
 def __init__(      self   :	Optional[Any]      ,       SCREAMING_SNAKE_CASE__   :	Optional[Any]=3_05_22      ,       SCREAMING_SNAKE_CASE__   :	int=7_68      ,       SCREAMING_SNAKE_CASE__   :	Optional[int]=12      ,       SCREAMING_SNAKE_CASE__   :	Optional[Any]=12      ,       SCREAMING_SNAKE_CASE__   :	Dict=30_72      ,       SCREAMING_SNAKE_CASE__   :	int="gelu"      ,       SCREAMING_SNAKE_CASE__   :	Optional[int]=0.1      ,       SCREAMING_SNAKE_CASE__   :	Dict=0.1      ,       SCREAMING_SNAKE_CASE__   :	List[str]=5_12      ,       SCREAMING_SNAKE_CASE__   :	Any=2      ,       SCREAMING_SNAKE_CASE__   :	int=0.0_2      ,       SCREAMING_SNAKE_CASE__   :	Any=1e-1_2      ,       SCREAMING_SNAKE_CASE__   :	Tuple=1      ,       SCREAMING_SNAKE_CASE__   :	Optional[int]=0      ,       SCREAMING_SNAKE_CASE__   :	Any=2      ,       SCREAMING_SNAKE_CASE__   :	Tuple=7_68      ,       SCREAMING_SNAKE_CASE__   :	List[Any]=2      ,       SCREAMING_SNAKE_CASE__   :	Any=9      ,       SCREAMING_SNAKE_CASE__   :	Optional[int]=1      ,       SCREAMING_SNAKE_CASE__   :	Optional[Any]=None      ,       **SCREAMING_SNAKE_CASE__   :	Union[str, Any]      ,       )  ->    Dict:
  super().__init__(
      pad_token_id=SCREAMING_SNAKE_CASE__      ,       bos_token_id=SCREAMING_SNAKE_CASE__      ,       eos_token_id=SCREAMING_SNAKE_CASE__      ,       **SCREAMING_SNAKE_CASE__      ,       )

  __lowerCAmelCase											=						vocab_size
  __lowerCAmelCase											=						hidden_size
  __lowerCAmelCase											=						num_hidden_layers
  __lowerCAmelCase											=						num_attention_heads
  __lowerCAmelCase											=						intermediate_size
  __lowerCAmelCase											=						hidden_act
  __lowerCAmelCase											=						hidden_dropout_prob
  __lowerCAmelCase											=						attention_probs_dropout_prob
  __lowerCAmelCase											=						max_position_embeddings
  __lowerCAmelCase											=						type_vocab_size
  __lowerCAmelCase											=						initializer_range
  __lowerCAmelCase											=						layer_norm_eps
  __lowerCAmelCase											=						embedding_size
  __lowerCAmelCase											=						head_ratio
  __lowerCAmelCase											=						conv_kernel_size
  __lowerCAmelCase											=						num_groups
  __lowerCAmelCase											=						classifier_dropout







class 				_lowercase     (				UpperCAmelCase__			):


 '''simple docstring'''






 @property
 def a					(      self   :	List[str]							)  ->    Mapping[str, Mapping[int, str]]:
  if self.task == "multiple-choice":
   __lowerCAmelCase											=						{0: """batch""", 1: """choice""", 2: """sequence"""}
  else:
   __lowerCAmelCase											=						{0: """batch""", 1: """sequence"""}
  return OrderedDict(
      [
          ("""input_ids""", dynamic_axis),
          ("""attention_mask""", dynamic_axis),
          ("""token_type_ids""", dynamic_axis),
      ]							)







'''simple docstring'''

def      UpperCamelCase_						(					snake_case_       :       int						,		snake_case_       :       int      )					->     str:






 '''simple docstring'''

 if a < 0 or b < 0:
  raise ValueError("""the value of both inputs must be positive"""      )

 __lowerCAmelCase											=						str(bin(snake_case_      )      )[2:]  # remove the leading "0b"
 __lowerCAmelCase											=						str(bin(snake_case_      )      )[2:]  # remove the leading "0b"

 __lowerCAmelCase											=						max(len(snake_case_      )						,		len(snake_case_      )      )

 return "0b" + "".join(
     str(int(char_a == """1""" and char_b == """1"""      )      )
     for char_a, char_b in zip(a_binary.zfill(snake_case_      )						,		b_binary.zfill(snake_case_      )      )      )


if __name__ == "__main__":
 import doctest

 doctest.testmod()






