
'''simple docstring'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowercase__											=logging.get_logger(__name__)

lowercase__											={'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/config.json'}







class   a_ (      UpperCamelCase__					):
			lowerCamelCase__	:			Union[str, Any]       =    'openai-gpt'
			lowerCamelCase__	:			str       =    {
			    'max_position_embeddings': 'n_positions',
			    'hidden_size': 'n_embd',
			    'num_attention_heads': 'n_head',
			    'num_hidden_layers': 'n_layer',
			}




			def __init__(       self					,   UpperCAmelCase=4_04_78					,   UpperCAmelCase=5_12					,   UpperCAmelCase=7_68					,   UpperCAmelCase=12					,   UpperCAmelCase=12					,   UpperCAmelCase="gelu"					,   UpperCAmelCase=0.1					,   UpperCAmelCase=0.1					,   UpperCAmelCase=0.1					,   UpperCAmelCase=1e-5					,   UpperCAmelCase=0.02					,   UpperCAmelCase="cls_index"					,   UpperCAmelCase=True					,   UpperCAmelCase=None					,   UpperCAmelCase=True					,   UpperCAmelCase=0.1					,   **UpperCAmelCase					,   ):
				a_      				=						vocab_size
				a_      				=						n_positions
				a_      				=						n_embd
				a_      				=						n_layer
				a_      				=						n_head
				a_      				=						afn
				a_      				=						resid_pdrop
				a_      				=						embd_pdrop
				a_      				=						attn_pdrop
				a_      				=						layer_norm_epsilon
				a_      				=						initializer_range
				a_      				=						summary_type
				a_      				=						summary_use_proj
				a_      				=						summary_activation
				a_      				=						summary_first_dropout
				a_      				=						summary_proj_to_labels
				super().__init__(**UpperCAmelCase	)


'''simple docstring'''
from math import log

from scipy.constants import Boltzmann, physical_constants

lowercase__											=3_00  # TEMPERATURE (unit = K)






def      UpperCamelCase_				(      A__  ,      A__  ,      A__  ,      ):

	if donor_conc <= 0:
		raise ValueError("""Donor concentration should be positive"""						)
	elif acceptor_conc <= 0:
		raise ValueError("""Acceptor concentration should be positive"""						)
	elif intrinsic_conc <= 0:
		raise ValueError("""Intrinsic concentration should be positive"""						)
	elif donor_conc <= intrinsic_conc:
		raise ValueError(
		    """Donor concentration should be greater than intrinsic concentration"""						)
	elif acceptor_conc <= intrinsic_conc:
		raise ValueError(
		    """Acceptor concentration should be greater than intrinsic concentration"""						)
	else:
		return (
		    Boltzmann
		    * T
		    * log((donor_conc * acceptor_conc) / intrinsic_conc**2						)
		    / physical_constants["electron volt"][0]
		)


if __name__ == "__main__":
		import doctest

		doctest.testmod()
