





'''simple docstring'''






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


lowerCAmelCase									=   logging.get_logger(__name__)

lowerCAmelCase									=   {"""ctrl""": """https://huggingface.co/ctrl/resolve/main/config.json"""}
class 		lowerCamelCase	(   _A							):
	snake_case_   = "ctrl"
	snake_case_   = ["past_key_values"]
	snake_case_   = {
	    "max_position_embeddings": "n_positions",
	    "hidden_size": "n_embd",
	    "num_attention_heads": "n_head",
	    "num_hidden_layers": "n_layer",
	}



	def __init__( self		,   a_=246_534		,   a_=256		,   a_=1_280		,   a_=8_192		,   a_=48		,   a_=16		,   a_=0.1		,   a_=0.1		,   a_=1e-6		,   a_=0.02		,   a_=True		,   **a_		,   ):
			lowerCAmelCase  :     Optional[Any]       						= vocab_size
			lowerCAmelCase  :     str       						= n_positions
			lowerCAmelCase  :     Dict       						= n_embd
			lowerCAmelCase  :     Any       						= n_layer
			lowerCAmelCase  :     Optional[int]       						= n_head
			lowerCAmelCase  :     Optional[int]       						= dff
			lowerCAmelCase  :     Dict       						= resid_pdrop
			lowerCAmelCase  :     int       						= embd_pdrop
			lowerCAmelCase  :     str       						= layer_norm_epsilon
			lowerCAmelCase  :     List[Any]       						= initializer_range

			lowerCAmelCase  :     Any       						= use_cache

			super().__init__(**a_						)










'''simple docstring'''






from __future__ import annotations






def   __A    (				a_    :	float   ,a_    :	float   ,a_    :	float   ,):
		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()



