






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


SCREAMING_SNAKE_CASE								=  logging.get_logger(__name__)

SCREAMING_SNAKE_CASE								=  {
    '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 							__magic_name__      (  __lowercase     ):






 '''simple docstring'''




 _SCREAMING_SNAKE_CASE							:     Optional[Any]	=   "nystromformer"


 def __init__(		self							,					_A=30000							,					_A=768							,					_A=12							,					_A=12							,					_A=3072							,					_A="gelu_new"							,					_A=0.1							,					_A=0.1							,					_A=510							,					_A=2							,					_A=64							,					_A=64							,					_A=65							,					_A=False							,					_A=0.02							,					_A=1e-5							,					_A=1							,					_A=0							,					_A=2							,					**_A							,					)	->						str:

     """simple docstring"""



     _UpperCAmelCase			: Optional[int]     					=			vocab_size
     _UpperCAmelCase			: Tuple     					=			max_position_embeddings
     _UpperCAmelCase			: Any     					=			hidden_size
     _UpperCAmelCase			: List[Any]     					=			num_hidden_layers
     _UpperCAmelCase			: Union[str, Any]     					=			num_attention_heads
     _UpperCAmelCase			: Optional[int]     					=			intermediate_size
     _UpperCAmelCase			: int     					=			hidden_act
     _UpperCAmelCase			: Any     					=			hidden_dropout_prob
     _UpperCAmelCase			: str     					=			attention_probs_dropout_prob
     _UpperCAmelCase			: Tuple     					=			initializer_range
     _UpperCAmelCase			: str     					=			type_vocab_size
     _UpperCAmelCase			: Optional[int]     					=			segment_means_seq_len
     _UpperCAmelCase			: str     					=			num_landmarks
     _UpperCAmelCase			: Any     					=			conv_kernel_size
     _UpperCAmelCase			: List[Any]     					=			inv_coeff_init_option
     _UpperCAmelCase			: Union[str, Any]     					=			layer_norm_eps
     super().__init__(pad_token_id=_A							,					bos_token_id=_A							,					eos_token_id=_A							,					**_A)












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


SCREAMING_SNAKE_CASE								=  logging.get_logger(__name__)

SCREAMING_SNAKE_CASE								=  {
    'MBZUAI/swiftformer-xs': 'https://huggingface.co/MBZUAI/swiftformer-xs/resolve/main/config.json',
}
class 							A_      (  __lowercase     ):






 '''simple docstring'''




 _SCREAMING_SNAKE_CASE							:     Dict	=   "swiftformer"


 def __init__(		self							,					_A=3							,					_A=[3, 3, 6, 4]							,					_A=[48, 56, 112, 220]							,					_A=4							,					_A=[True, True, True, True]							,					_A="gelu"							,					_A=3							,					_A=2							,					_A=1							,					_A=0.0							,					_A=True							,					_A=1e-5							,					_A=1e-5							,					**_A							,					)	->						List[Any]:

     """simple docstring"""



     super().__init__(**_A)
     _UpperCAmelCase			: Tuple     					=			num_channels
     _UpperCAmelCase			: Optional[int]     					=			depths
     _UpperCAmelCase			: Union[str, Any]     					=			embed_dims
     _UpperCAmelCase			: Dict     					=			mlp_ratio
     _UpperCAmelCase			: Tuple     					=			downsamples
     _UpperCAmelCase			: str     					=			hidden_act
     _UpperCAmelCase			: int     					=			down_patch_size
     _UpperCAmelCase			: Dict     					=			down_stride
     _UpperCAmelCase			: Dict     					=			down_pad
     _UpperCAmelCase			: Tuple     					=			drop_path_rate
     _UpperCAmelCase			: Tuple     					=			use_layer_scale
     _UpperCAmelCase			: int     					=			layer_scale_init_value
     _UpperCAmelCase			: int     					=			batch_norm_eps



class 							A_      (  __lowercase     ):






 '''simple docstring'''




 _SCREAMING_SNAKE_CASE							:     List[Any]	=   version.parse("1.11"     )


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

     """simple docstring"""



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


 @property
 def 	snake_case__			(		self)	->						float:

     """simple docstring"""



     return 1e-4




