

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


a_      =     logging.get_logger(__name__)

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






class _UpperCamelCase				(				__A ):
			'''simple docstring'''







			lowerCamelCase__							     ='gptsan-japanese'
			lowerCamelCase__							     =[
			    'past_key_values',
			]
			lowerCamelCase__							     ={
			    'hidden_size': 'd_model',
			    'num_attention_heads': 'num_heads',
			    'num_hidden_layers': 'num_layers',
			}
			def __init__(      self				:			int   ,   a				:			Any=3_6000   ,   a				:			Optional[int]=1280   ,   a				:			Tuple=1024   ,   a				:			Optional[Any]=8192   ,   a				:			List[str]=4096   ,   a				:			Optional[Any]=128   ,   a				:			Optional[Any]=10   ,   a				:			List[Any]=0   ,   a				:			Union[str, Any]=16   ,   a				:			str=16   ,   a				:			Tuple=128   ,   a				:			List[str]=0.0   ,   a				:			Union[str, Any]=1e-5   ,   a				:			int=False   ,   a				:			Optional[int]=0.0   ,   a				:			Union[str, Any]="float32"   ,   a				:			str=False   ,   a				:			Dict=False   ,   a				:			Dict=False   ,   a				:			Optional[Any]=0.002   ,   a				:			Tuple=False   ,   a				:			List[str]=True   ,   a				:			int=3_5998   ,   a				:			Union[str, Any]=3_5995   ,   a				:			int=3_5999   ,   **a				:			Optional[int]   ,   )				->							Optional[Any]:

				"""simple docstring"""

				SCREAMING_SNAKE_CASE :   List[str]					  =							vocab_size
				SCREAMING_SNAKE_CASE :   List[Any]					  =							max_position_embeddings
				SCREAMING_SNAKE_CASE :   List[Any]					  =							d_model
				SCREAMING_SNAKE_CASE :   Union[str, Any]					  =							d_ff
				SCREAMING_SNAKE_CASE :   Optional[Any]					  =							d_ext
				SCREAMING_SNAKE_CASE :   List[str]					  =							d_spout
				SCREAMING_SNAKE_CASE :   Optional[Any]					  =							num_switch_layers
				SCREAMING_SNAKE_CASE :   str					  =							num_ext_layers
				SCREAMING_SNAKE_CASE :   int					  =							num_switch_layers + num_ext_layers
				SCREAMING_SNAKE_CASE :   str					  =							num_heads
				SCREAMING_SNAKE_CASE :   Optional[int]					  =							num_experts
				SCREAMING_SNAKE_CASE :   Optional[int]					  =							expert_capacity
				SCREAMING_SNAKE_CASE :   List[str]					  =							dropout_rate
				SCREAMING_SNAKE_CASE :   Optional[Any]					  =							layer_norm_epsilon
				SCREAMING_SNAKE_CASE :   List[str]					  =							router_bias
				SCREAMING_SNAKE_CASE :   Union[str, Any]					  =							router_jitter_noise
				SCREAMING_SNAKE_CASE :   Tuple					  =							router_dtype
				SCREAMING_SNAKE_CASE :   Dict					  =							router_ignore_padding_tokens
				SCREAMING_SNAKE_CASE :   Tuple					  =							output_hidden_states
				SCREAMING_SNAKE_CASE :   Union[str, Any]					  =							output_attentions
				SCREAMING_SNAKE_CASE :   str					  =							initializer_factor
				SCREAMING_SNAKE_CASE :   Union[str, Any]					  =							output_router_logits
				SCREAMING_SNAKE_CASE :   Optional[int]					  =							use_cache

				super().__init__(
				    separator_token_id=a   ,   pad_token_id=a   ,   eos_token_id=a   ,   **a   ,   )
'''simple docstring'''

def __UpperCamelCase( _A       :					float	,      _A       :					list[float]     ):
   '''simple docstring'''
   if discount_rate < 0:
      raise ValueError('''Discount rate cannot be negative'''     )
   if not cash_flows:
      raise ValueError('''Cash flows list cannot be empty'''     )
   UpperCAmelCase__				:					str 					=	sum(
       cash_flow / ((1 + discount_rate) ** i) for i, cash_flow in enumerate(_A     )     )
   return round(_A	,      ndigits=2     )


if __name__ == "__main__":
  import doctest

  doctest.testmod()




