


'''simple docstring'''




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


_A:					Any							=				logging.get_logger(__name__)

_A:					List[str]							=				{
    """tanreinama/GPTSAN-2.8B-spout_is_uniform""": (
        """https://huggingface.co/tanreinama/GPTSAN-2.8B-spout_is_uniform/resolve/main/config.json"""
    ),
}






class UpperCAmelCase							(		UpperCAmelCase_							):
    _A :			Dict						   =       """gptsan-japanese"""
    _A :			Tuple						   =       [
        """past_key_values""",
    ]
    _A :			List[Any]						   =       {
        """hidden_size""": """d_model""",
        """num_attention_heads""": """num_heads""",
        """num_hidden_layers""": """num_layers""",
    }



    def __init__(  self     ,			__A=36_000     ,			__A=1_280     ,			__A=1_024     ,			__A=8_192     ,			__A=4_096     ,			__A=128     ,			__A=10     ,			__A=0     ,			__A=16     ,			__A=16     ,			__A=128     ,			__A=0.0     ,			__A=1E-5     ,			__A=False     ,			__A=0.0     ,			__A="float32"     ,			__A=False     ,			__A=False     ,			__A=False     ,			__A=0.0_0_2     ,			__A=False     ,			__A=True     ,			__A=35_998     ,			__A=35_995     ,			__A=35_999     ,			**__A     ,			):
     __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=__A     ,			pad_token_id=__A     ,			eos_token_id=__A     ,			**__A     ,			)












'''simple docstring'''




from __future__ import annotations







def _lowerCAmelCase     (      _lowerCAmelCase       ,    _lowerCAmelCase       ,    _lowerCAmelCase       ,    )->     tuple:
 if (electron_conc, hole_conc, intrinsic_conc).count(0    ) != 1:
  raise ValueError('You cannot supply more or less than 2 values'    )
 elif electron_conc < 0:
  raise ValueError('Electron concentration cannot be negative in a semiconductor'    )
 elif hole_conc < 0:
  raise ValueError('Hole concentration cannot be negative in a semiconductor'    )
 elif intrinsic_conc < 0:
  raise ValueError(
      'Intrinsic concentration cannot be negative in a semiconductor'    )
 elif electron_conc == 0:
  return (
      "electron_conc",
      intrinsic_conc**2 / hole_conc,
  )
 elif hole_conc == 0:
  return (
      "hole_conc",
      intrinsic_conc**2 / electron_conc,
  )
 elif intrinsic_conc == 0:
  return (
      "intrinsic_conc",
      (electron_conc * hole_conc) ** 0.5,
  )
 else:
  return (-1, -1)


if __name__ == "__main__":
    import doctest

    doctest.testmod()





