
from collections import OrderedDict
from typing import Mapping

from packaging import version

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


__lowerCamelCase				=			logging.get_logger(__name__)

__lowerCamelCase				=			{
    """facebook/deit-base-distilled-patch16-224""": (
        """https://huggingface.co/facebook/deit-base-patch16-224/resolve/main/config.json"""
    ),
    # See all DeiT models at https://huggingface.co/models?filter=deit
}






class     UpperCAmelCase						(		A_					):
   A__   :						List[str]			=	"deit"



   def __init__(self						:   Dict       ,		snake_case__						:   Optional[Any]=7_68       ,		snake_case__						:   List[Any]=12       ,		snake_case__						:   Optional[int]=12       ,		snake_case__						:   List[Any]=30_72       ,		snake_case__						:   Optional[int]="gelu"       ,		snake_case__						:   List[Any]=0.0       ,		snake_case__						:   Union[str, Any]=0.0       ,		snake_case__						:   str=0.02       ,		snake_case__						:   List[Any]=1e-12       ,		snake_case__						:   Tuple=2_24       ,		snake_case__						:   Any=16       ,		snake_case__						:   Dict=3       ,		snake_case__						:   int=True       ,		snake_case__						:   Union[str, Any]=16       ,		**snake_case__						:   Optional[int]       ,		)						->      str:


          '''simple docstring'''


          super().__init__(**snake_case__					)

          snake_case			:  int     							= hidden_size
          snake_case			:  str     							= num_hidden_layers
          snake_case			:  Optional[int]     							= num_attention_heads
          snake_case			:  List[Any]     							= intermediate_size
          snake_case			:  int     							= hidden_act
          snake_case			:  Union[str, Any]     							= hidden_dropout_prob
          snake_case			:  Dict     							= attention_probs_dropout_prob
          snake_case			:  Optional[Any]     							= initializer_range
          snake_case			:  Tuple     							= layer_norm_eps
          snake_case			:  str     							= image_size
          snake_case			:  Optional[Any]     							= patch_size
          snake_case			:  Union[str, Any]     							= num_channels
          snake_case			:  Tuple     							= qkv_bias
          snake_case			:  Optional[Any]     							= encoder_stride






class     UpperCAmelCase						(		A_					):
   A__   :						Any			=	version.parse("1.11"					)



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


          '''simple docstring'''


          return OrderedDict(
              [
                  ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
              ]					)



   @property
   def 							_SCREAMING_SNAKE_CASE  (self						:   Tuple					)						->      float:


          '''simple docstring'''


          return 1e-4







from collections import OrderedDict
from typing import Mapping

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


__lowerCamelCase				=			logging.get_logger(__name__)

__lowerCamelCase				=			{
    """kssteven/ibert-roberta-base""": """https://huggingface.co/kssteven/ibert-roberta-base/resolve/main/config.json""",
    """kssteven/ibert-roberta-large""": """https://huggingface.co/kssteven/ibert-roberta-large/resolve/main/config.json""",
    """kssteven/ibert-roberta-large-mnli""": (
        """https://huggingface.co/kssteven/ibert-roberta-large-mnli/resolve/main/config.json"""
    ),
}






class     UpperCAmelCase						(		A_					):
   A__   :						Optional[int]			=	"ibert"



   def __init__(self						:   List[Any]       ,		snake_case__						:   int=3_05_22       ,		snake_case__						:   int=7_68       ,		snake_case__						:   Any=12       ,		snake_case__						:   str=12       ,		snake_case__						:   Optional[int]=30_72       ,		snake_case__						:   Union[str, Any]="gelu"       ,		snake_case__						:   Any=0.1       ,		snake_case__						:   List[Any]=0.1       ,		snake_case__						:   str=5_12       ,		snake_case__						:   Optional[int]=2       ,		snake_case__						:   Any=0.02       ,		snake_case__						:   List[Any]=1e-12       ,		snake_case__						:   Optional[Any]=1       ,		snake_case__						:   List[Any]=0       ,		snake_case__						:   str=2       ,		snake_case__						:   Tuple="absolute"       ,		snake_case__						:   List[str]=False       ,		snake_case__						:   Tuple="none"       ,		**snake_case__						:   Tuple       ,		)						->      Union[str, Any]:


          '''simple docstring'''


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

          snake_case			:  str     							= vocab_size
          snake_case			:  Tuple     							= hidden_size
          snake_case			:  Optional[Any]     							= num_hidden_layers
          snake_case			:  Optional[int]     							= num_attention_heads
          snake_case			:  List[Any]     							= hidden_act
          snake_case			:  Optional[Any]     							= intermediate_size
          snake_case			:  Dict     							= hidden_dropout_prob
          snake_case			:  List[str]     							= attention_probs_dropout_prob
          snake_case			:  List[str]     							= max_position_embeddings
          snake_case			:  Union[str, Any]     							= type_vocab_size
          snake_case			:  Optional[int]     							= initializer_range
          snake_case			:  Optional[int]     							= layer_norm_eps
          snake_case			:  int     							= position_embedding_type
          snake_case			:  Union[str, Any]     							= quant_mode
          snake_case			:  Dict     							= force_dequant






class     UpperCAmelCase						(		A_					):



   @property
   def 							_SCREAMING_SNAKE_CASE  (self						:   Tuple					)						->      Mapping[str, Mapping[int, str]]:


          '''simple docstring'''


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





