"""simple docstring"""

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


UpperCAmelCase       =  logging.get_logger(__name__)

UpperCAmelCase       =  {
    'tanreinama/GPTSAN-2.8B-spout_is_uniform': (
        'https://huggingface.co/tanreinama/GPTSAN-2.8B-spout_is_uniform/resolve/main/config.json'
    ),
}







class      UpperCAmelCase_       (						UpperCamelCase__):
							snake_case__        =      '''gptsan-japanese'''
							snake_case__        =      [
							    '''past_key_values''',
							]
							snake_case__        =      {
							    '''hidden_size''': '''d_model''',
							    '''num_attention_heads''': '''num_heads''',
							    '''num_hidden_layers''': '''num_layers''',
							}






							def __init__(		self :      Any     ,						__UpperCamelCase :      int=3_6000     ,						__UpperCamelCase :      str=1280     ,						__UpperCamelCase :      Dict=1024     ,						__UpperCamelCase :      Optional[int]=8192     ,						__UpperCamelCase :      Optional[Any]=4096     ,						__UpperCamelCase :      Optional[int]=128     ,						__UpperCamelCase :      Tuple=10     ,						__UpperCamelCase :      str=0     ,						__UpperCamelCase :      Tuple=16     ,						__UpperCamelCase :      int=16     ,						__UpperCamelCase :      int=128     ,						__UpperCamelCase :      Any=0.0     ,						__UpperCamelCase :      int=1E-5     ,						__UpperCamelCase :      int=False     ,						__UpperCamelCase :      int=0.0     ,						__UpperCamelCase :      int="float32"     ,						__UpperCamelCase :      List[Any]=False     ,						__UpperCamelCase :      str=False     ,						__UpperCamelCase :      Dict=False     ,						__UpperCamelCase :      List[str]=0.0_0_2     ,						__UpperCamelCase :      str=False     ,						__UpperCamelCase :      Any=True     ,						__UpperCamelCase :      str=3_5998     ,						__UpperCamelCase :      Tuple=3_5995     ,						__UpperCamelCase :      List[str]=3_5999     ,						**__UpperCamelCase :      Dict     ,						)       ->       Optional[int]:
												_UpperCamelCase      						=	vocab_size
												_UpperCamelCase      						=	max_position_embeddings
												_UpperCamelCase      						=	d_model
												_UpperCamelCase      						=	d_ff
												_UpperCamelCase      						=	d_ext
												_UpperCamelCase      						=	d_spout
												_UpperCamelCase      						=	num_switch_layers
												_UpperCamelCase      						=	num_ext_layers
												_UpperCamelCase      						=	num_switch_layers + num_ext_layers
												_UpperCamelCase      						=	num_heads
												_UpperCamelCase      						=	num_experts
												_UpperCamelCase      						=	expert_capacity
												_UpperCamelCase      						=	dropout_rate
												_UpperCamelCase      						=	layer_norm_epsilon
												_UpperCamelCase      						=	router_bias
												_UpperCamelCase      						=	router_jitter_noise
												_UpperCamelCase      						=	router_dtype
												_UpperCamelCase      						=	router_ignore_padding_tokens
												_UpperCamelCase      						=	output_hidden_states
												_UpperCamelCase      						=	output_attentions
												_UpperCamelCase      						=	initializer_factor
												_UpperCamelCase      						=	output_router_logits
												_UpperCamelCase      						=	use_cache

												super().__init__(
												    separator_token_id=__lowerCamelCase     ,						pad_token_id=__lowerCamelCase     ,						eos_token_id=__lowerCamelCase     ,						**__lowerCamelCase     ,						)







import numpy as np


def 	UpperCamelCase__(       UpperCamelCase__			:       np.array  )->np.array:
       return (2 / (1 + np.exp(-2 * vector  ))) - 1


if __name__ == "__main__":
       import doctest

       doctest.testmod()





