code: 
  
  
  
  
  
  
  """simple docstring"""
  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
  
  
  snake_case   :   Optional[int]    		=		logging.get_logger(__name__)
  
  snake_case   :   List[str]    		=		{
      '''MBZUAI/swiftformer-xs''': '''https://huggingface.co/MBZUAI/swiftformer-xs/resolve/main/config.json''',
  }
  
  
  
  class 					UpperCamelCase__   (							UpperCamelCase_):
  
  
  
  
  
  
  
      """simple docstring"""
      __UpperCAmelCase											=   """swiftformer"""
  
  
  
  
  
  
  
      def __init__(		self   :  Dict							,						UpperCamelCase_   :  Optional[Any]=3							,						UpperCamelCase_   :  Dict=[3, 3, 6, 4]							,						UpperCamelCase_   :  Dict=[4_8, 5_6, 1_1_2, 2_2_0]							,						UpperCamelCase_   :  int=4							,						UpperCamelCase_   :  Dict=[True, True, True, True]							,						UpperCamelCase_   :  Optional[Any]="gelu"							,						UpperCamelCase_   :  Tuple=3							,						UpperCamelCase_   :  Dict=2							,						UpperCamelCase_   :  List[str]=1							,						UpperCamelCase_   :  List[Any]=0.0							,						UpperCamelCase_   :  Optional[Any]=True							,						UpperCamelCase_   :  Optional[Any]=1e-5							,						UpperCamelCase_   :  str=1e-5							,						**UpperCamelCase_   :  Union[str, Any]							,						):
  
  
  
  
  
             '''simple docstring'''
  
             super().__init__(**__SCREAMING_SNAKE_CASE   )
             __magic_name__										=						num_channels
             __magic_name__										=						depths
             __magic_name__										=						embed_dims
             __magic_name__										=						mlp_ratio
             __magic_name__										=						downsamples
             __magic_name__										=						hidden_act
             __magic_name__										=						down_patch_size
             __magic_name__										=						down_stride
             __magic_name__										=						down_pad
             __magic_name__										=						drop_path_rate
             __magic_name__										=						use_layer_scale
             __magic_name__										=						layer_scale_init_value
             __magic_name__										=						batch_norm_eps
  
  
  
  class 					UpperCamelCase__   (							UpperCamelCase_):
  
  
  
  
  
  
  
      """simple docstring"""
      __UpperCAmelCase											=   version.parse("""1.11""")
  
  
  
  
  
  
  
      @property
      def 							a__ (		self   :  Optional[Any]   ):
  
  
  
  
  
             '''simple docstring'''
  
             return OrderedDict(
                 [
                     ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
                 ]   )
  
  
  
  
  
  
  
      @property
      def 							a__ (		self   :  Dict   ):
  
  
  
  
  
             '''simple docstring'''
  
             return 1e-4
  
  
  
  
style_context: 
  
  
  
  
  
  
  """simple docstring"""
  from ...configuration_utils import PretrainedConfig
  from ...utils import logging
  
  
  snake_case   :   int    		=		logging.get_logger(__name__)
  
  snake_case   :   List[str]    		=		{
      """uw-madison/nystromformer-512""": """https://huggingface.co/uw-madison/nystromformer-512/resolve/main/config.json""",
      # See all Nystromformer models at https://huggingface.co/models?filter=nystromformer
  }
  
  
  
  class 					UpperCamelCase__   (							a_):
  
  
  
  
  
  
  
      """simple docstring"""
      __UpperCAmelCase											=   """nystromformer"""
  
  
  
  
  
  
  
      def __init__(		self   :  Dict							,						UpperCamelCase_   :  Optional[Any]=3_0_0_0_0							,						UpperCamelCase_   :  Dict=7_6_8							,						UpperCamelCase_   :  Tuple=1_2							,						UpperCamelCase_   :  Any=1_2							,						UpperCamelCase_   :  List[str]=3_0_7_2							,						UpperCamelCase_   :  Tuple="gelu_new"							,						UpperCamelCase_   :  Optional[Any]=0.1							,						UpperCamelCase_   :  str=0.1							,						UpperCamelCase_   :  Tuple=5_1_0							,						UpperCamelCase_   :  Optional[int]=2							,						UpperCamelCase_   :  Optional[int]=6_4							,						UpperCamelCase_   :  Tuple=6_4							,						UpperCamelCase_   :  Optional[int]=6_5							,						UpperCamelCase_   :  Optional[int]=False							,						UpperCamelCase_   :  List[str]=0.02							,						UpperCamelCase_   :  List[Any]=1e-5							,						UpperCamelCase_   :  Union[str, Any]=1							,						UpperCamelCase_   :  Tuple=0							,						UpperCamelCase_   :  List[Any]=2							,						**UpperCamelCase_   :  str							,						):
  
  
  
  
  
             '''simple docstring'''
  
             __magic_name__										=						vocab_size
             __magic_name__										=						max_position_embeddings
             __magic_name__										=						hidden_size
             __magic_name__										=						num_hidden_layers
             __magic_name__										=						num_attention_heads
             __magic_name__										=						intermediate_size
             __magic_name__										=						hidden_act
             __magic_name__										=						hidden_dropout_prob
             __magic_name__										=						attention_probs_dropout_prob
             __magic_name__										=						initializer_range
             __magic_name__										=						type_vocab_size
             __magic_name__										=						segment_means_seq_len
             __magic_name__										=						num_landmarks
             __magic_name__										=						conv_kernel_size
             __magic_name__										=						inv_coeff_init_option
             __magic_name__										=						layer_norm_eps
             super().__init__(pad_token_id=UpperCamelCase_							,						bos_token_id=UpperCamelCase_							,						eos_token_id=UpperCamelCase_							,						**UpperCamelCase_   )