
"""simple docstring"""





def       __a	(						__lowerCamelCase    ):
   return -num if num < 0 else num







def       __a	(						__lowerCamelCase    ):
   if len(__lowerCamelCase    ) == 0:
      raise ValueError("abs_min() arg is an empty sequence"    )
   UpperCAmelCase_   :   Dict     	=       x[0]
   for i in x:
      if abs_val(__lowerCamelCase    ) < abs_val(__lowerCamelCase    ):
         UpperCAmelCase_   :   str     	=       i
   return j







def       __a	(						__lowerCamelCase    ):
   if len(__lowerCamelCase    ) == 0:
      raise ValueError("abs_max() arg is an empty sequence"    )
   UpperCAmelCase_   :   List[str]     	=       x[0]
   for i in x:
      if abs(__lowerCamelCase    ) > abs(__lowerCamelCase    ):
         UpperCAmelCase_   :   List[str]     	=       i
   return j







def       __a	(						__lowerCamelCase    ):
   if len(__lowerCamelCase    ) == 0:
      raise ValueError("abs_max_sort() arg is an empty sequence"    )
   return sorted(__lowerCamelCase,						key=__lowerCamelCase    )[-1]







def       __a	(						):
   assert abs_val(0    ) == 0
   assert abs_val(34    ) == 34
   assert abs_val(-1000_0000_0000    ) == 1000_0000_0000

   UpperCAmelCase_   :   int     	=       [-3, -1, 2, -11]
   assert abs_max(__lowerCamelCase    ) == -11
   assert abs_max_sort(__lowerCamelCase    ) == -11
   assert abs_min(__lowerCamelCase    ) == -1


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    test_abs_val()
    print(abs_val(-34))  # --> 34



"""simple docstring"""


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


__UpperCamelCase										=     logging.get_logger(__name__)

__UpperCamelCase										=     {
    '''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   (							lowerCAmelCase__  ):
       SCREAMING_SNAKE_CASE_						      = "nystromformer"







       def __init__(					self,				lowerCAmelCase__=3_0000,				lowerCAmelCase__=768,				lowerCAmelCase__=12,				lowerCAmelCase__=12,				lowerCAmelCase__=3072,				lowerCAmelCase__="gelu_new",				lowerCAmelCase__=0.1,				lowerCAmelCase__=0.1,				lowerCAmelCase__=510,				lowerCAmelCase__=2,				lowerCAmelCase__=64,				lowerCAmelCase__=64,				lowerCAmelCase__=65,				lowerCAmelCase__=False,				lowerCAmelCase__=0.02,				lowerCAmelCase__=1e-5,				lowerCAmelCase__=1,				lowerCAmelCase__=0,				lowerCAmelCase__=2,				**lowerCAmelCase__,				) -> Optional[Any]:
            snake_case_   			=   vocab_size
            snake_case_   			=   max_position_embeddings
            snake_case_   			=   hidden_size
            snake_case_   			=   num_hidden_layers
            snake_case_   			=   num_attention_heads
            snake_case_   			=   intermediate_size
            snake_case_   			=   hidden_act
            snake_case_   			=   hidden_dropout_prob
            snake_case_   			=   attention_probs_dropout_prob
            snake_case_   			=   initializer_range
            snake_case_   			=   type_vocab_size
            snake_case_   			=   segment_means_seq_len
            snake_case_   			=   num_landmarks
            snake_case_   			=   conv_kernel_size
            snake_case_   			=   inv_coeff_init_option
            snake_case_   			=   layer_norm_eps
            super().__init__(pad_token_id=lowerCAmelCase__,				bos_token_id=lowerCAmelCase__,				eos_token_id=lowerCAmelCase__,				**lowerCAmelCase__)

