




from collections import OrderedDict
from typing import Mapping

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


lowerCamelCase	:	List[str]				=   logging.get_logger(__name__)

lowerCamelCase	:	Any				=   {
    'facebook/xmod-base': 'https://huggingface.co/facebook/xmod-base/resolve/main/config.json',
    'facebook/xmod-large-prenorm': 'https://huggingface.co/facebook/xmod-large-prenorm/resolve/main/config.json',
    'facebook/xmod-base-13-125k': 'https://huggingface.co/facebook/xmod-base-13-125k/resolve/main/config.json',
    'facebook/xmod-base-30-125k': 'https://huggingface.co/facebook/xmod-base-30-125k/resolve/main/config.json',
    'facebook/xmod-base-30-195k': 'https://huggingface.co/facebook/xmod-base-30-195k/resolve/main/config.json',
    'facebook/xmod-base-60-125k': 'https://huggingface.co/facebook/xmod-base-60-125k/resolve/main/config.json',
    'facebook/xmod-base-60-265k': 'https://huggingface.co/facebook/xmod-base-60-265k/resolve/main/config.json',
    'facebook/xmod-base-75-125k': 'https://huggingface.co/facebook/xmod-base-75-125k/resolve/main/config.json',
    'facebook/xmod-base-75-269k': 'https://huggingface.co/facebook/xmod-base-75-269k/resolve/main/config.json',
}




class 						__lowercase		(UpperCamelCase__							):




      """simple docstring"""





      _snake_case												=						"""xmod"""

      def __init__(				self    ,				A=3_0_5_2_2    ,				A=7_6_8    ,				A=1_2    ,				A=1_2    ,				A=3_0_7_2    ,				A="gelu"    ,				A=0.1    ,				A=0.1    ,				A=5_1_2    ,				A=2    ,				A=0.02    ,				A=1e-1_2    ,				A=1    ,				A=0    ,				A=2    ,				A="absolute"    ,				A=True    ,				A=None    ,				A=False    ,				A=2    ,				A=False    ,				A=True    ,				A=True    ,				A=("en_XX",)    ,				A=None    ,				**A    ,				)		->    Any:
          super().__init__(pad_token_id=A    ,				bos_token_id=A    ,				eos_token_id=A    ,				**A     )

          snake_case				:    List[str]           =	vocab_size
          snake_case				:    Union[str, Any]           =	hidden_size
          snake_case				:    Optional[Any]           =	num_hidden_layers
          snake_case				:    Optional[Any]           =	num_attention_heads
          snake_case				:    Union[str, Any]           =	hidden_act
          snake_case				:    List[Any]           =	intermediate_size
          snake_case				:    str           =	hidden_dropout_prob
          snake_case				:    Dict           =	attention_probs_dropout_prob
          snake_case				:    List[Any]           =	max_position_embeddings
          snake_case				:    Optional[int]           =	type_vocab_size
          snake_case				:    Tuple           =	initializer_range
          snake_case				:    Tuple           =	layer_norm_eps
          snake_case				:    str           =	position_embedding_type
          snake_case				:    Union[str, Any]           =	use_cache
          snake_case				:    Optional[int]           =	classifier_dropout
          snake_case				:    str           =	pre_norm
          snake_case				:    Union[str, Any]           =	adapter_reduction_factor
          snake_case				:    Any           =	adapter_layer_norm
          snake_case				:    Union[str, Any]           =	adapter_reuse_layer_norm
          snake_case				:    str           =	ln_before_adapter
          snake_case				:    Any           =	list(A     )
          snake_case				:    Optional[Any]           =	default_language




class 						__lowercase		(UpperCamelCase__							):




      """simple docstring"""





      @property
      def      UpperCAmelCase				(				self     )		->    Mapping[str, Mapping[int, str]]:
          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),
              ]     )











from typing import List

from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCamelCase	:	Optional[int]				=   logging.get_logger(__name__)

lowerCamelCase	:	Tuple				=   {
    'snap-research/efficientformer-l1-300': (
        'https://huggingface.co/snap-research/efficientformer-l1-300/resolve/main/config.json'
    ),
}




class 						__lowercase		(UpperCamelCase__							):




      """simple docstring"""





      _snake_case												=						"""efficientformer"""

      def __init__(				self    ,				A = [3, 2, 6, 4]    ,				A = [4_8, 9_6, 2_2_4, 4_4_8]    ,				A = [True, True, True, True]    ,				A = 4_4_8    ,				A = 3_2    ,				A = 4    ,				A = 7    ,				A = 5    ,				A = 8    ,				A = 4    ,				A = 0.0    ,				A = 1_6    ,				A = 3    ,				A = 3    ,				A = 3    ,				A = 2    ,				A = 1    ,				A = 0.0    ,				A = 1    ,				A = True    ,				A = True    ,				A = 1e-5    ,				A = "gelu"    ,				A = 0.02    ,				A = 1e-1_2    ,				A = 2_2_4    ,				A = 1e-0_5    ,				**A    ,				)		->    None:
         super().__init__(**A     )

         snake_case				:    Dict           =	hidden_act
         snake_case				:    int           =	hidden_dropout_prob
         snake_case				:    Any           =	hidden_sizes
         snake_case				:    Optional[Any]           =	num_hidden_layers
         snake_case				:    List[Any]           =	num_attention_heads
         snake_case				:    List[Any]           =	initializer_range
         snake_case				:    str           =	layer_norm_eps
         snake_case				:    Dict           =	patch_size
         snake_case				:    Optional[int]           =	num_channels
         snake_case				:    int           =	depths
         snake_case				:    Optional[int]           =	mlp_expansion_ratio
         snake_case				:    Any           =	downsamples
         snake_case				:    Dict           =	dim
         snake_case				:    Optional[int]           =	key_dim
         snake_case				:    Union[str, Any]           =	attention_ratio
         snake_case				:    Any           =	resolution
         snake_case				:    Dict           =	pool_size
         snake_case				:    Any           =	downsample_patch_size
         snake_case				:    Tuple           =	downsample_stride
         snake_case				:    Any           =	downsample_pad
         snake_case				:    Union[str, Any]           =	drop_path_rate
         snake_case				:    List[str]           =	num_metaad_blocks
         snake_case				:    Union[str, Any]           =	distillation
         snake_case				:    List[str]           =	use_layer_scale
         snake_case				:    int           =	layer_scale_init_value
         snake_case				:    Union[str, Any]           =	image_size
         snake_case				:    Dict           =	batch_norm_eps





