



'''simple docstring'''






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


A_				:					Any							=      logging.get_logger(__name__)

A_				:					Optional[int]							=      {
    """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 				lowercase			(    _lowerCamelCase							):


 """simple docstring"""


 UpperCAmelCase		      =    """nystromformer"""







 def __init__(				self    ,a_=30_000    ,a_=768    ,a_=12    ,a_=12    ,a_=3_072    ,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_    ,)						->  Tuple:
        _UpperCAmelCase    :		List[Any]     	=					vocab_size
        _UpperCAmelCase    :		Any     	=					max_position_embeddings
        _UpperCAmelCase    :		Optional[int]     	=					hidden_size
        _UpperCAmelCase    :		Dict     	=					num_hidden_layers
        _UpperCAmelCase    :		List[str]     	=					num_attention_heads
        _UpperCAmelCase    :		Tuple     	=					intermediate_size
        _UpperCAmelCase    :		Union[str, Any]     	=					hidden_act
        _UpperCAmelCase    :		Tuple     	=					hidden_dropout_prob
        _UpperCAmelCase    :		Dict     	=					attention_probs_dropout_prob
        _UpperCAmelCase    :		int     	=					initializer_range
        _UpperCAmelCase    :		Optional[Any]     	=					type_vocab_size
        _UpperCAmelCase    :		Optional[Any]     	=					segment_means_seq_len
        _UpperCAmelCase    :		Optional[int]     	=					num_landmarks
        _UpperCAmelCase    :		List[str]     	=					conv_kernel_size
        _UpperCAmelCase    :		Optional[int]     	=					inv_coeff_init_option
        _UpperCAmelCase    :		Optional[int]     	=					layer_norm_eps
        super().__init__(pad_token_id=a_    ,bos_token_id=a_    ,eos_token_id=a_    ,**a_				)






import numpy as np







def _a					(			SCREAMING_SNAKE_CASE						:     Union[str, Any]						)       ->       List[str]:

 """simple docstring"""






 __lowerCAmelCase:  Union[str, Any]        = np.exp(SCREAMING_SNAKE_CASE						)

 # Add up the all the exponentials
 __lowerCAmelCase:  Dict        = np.sum(SCREAMING_SNAKE_CASE						)

 # Divide every exponent by the sum of all exponents
 __lowerCAmelCase:  int        = exponent_vector / sum_of_exponents

 return softmax_vector


if __name__ == "__main__":
  print(softmax((0,)))





