




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


UpperCAmelCase_		:				Optional[int]									=     logging.get_logger(__name__)

UpperCAmelCase_		:				List[str]									=     {
    "google/pegasus-large": "https://huggingface.co/google/pegasus-large/resolve/main/config.json",
    # See all PEGASUS models at https://huggingface.co/models?filter=pegasus
}




class 		__A      (			UpperCamelCase__			):
						UpperCamelCase     						=					"""pegasus"""
						UpperCamelCase     						=					["""past_key_values"""]
						UpperCamelCase     						=					{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}

						def __init__(		self   :int    , __snake_case   :Any=5_02_65    , __snake_case   :Optional[Any]=10_24    , __snake_case   :int=12    , __snake_case   :Optional[int]=40_96    , __snake_case   :Tuple=16    , __snake_case   :Optional[Any]=12    , __snake_case   :Any=40_96    , __snake_case   :Dict=16    , __snake_case   :str=0.0    , __snake_case   :Optional[int]=0.0    , __snake_case   :str=True    , __snake_case   :List[Any]=True    , __snake_case   :Optional[int]="gelu"    , __snake_case   :Any=10_24    , __snake_case   :Tuple=0.1    , __snake_case   :List[Any]=0.0    , __snake_case   :Dict=0.0    , __snake_case   :int=0.02    , __snake_case   :Any=0    , __snake_case   :List[str]=False    , __snake_case   :str=0    , __snake_case   :Union[str, Any]=1    , __snake_case   :Union[str, Any]=1    , **__snake_case   :Optional[int]    , ):
										'''simple docstring'''

										__magic_name__	:	List[str]								=vocab_size
										__magic_name__	:	Optional[Any]								=max_position_embeddings
										__magic_name__	:	Union[str, Any]								=d_model
										__magic_name__	:	Tuple								=encoder_ffn_dim
										__magic_name__	:	Any								=encoder_layers
										__magic_name__	:	Any								=encoder_attention_heads
										__magic_name__	:	List[Any]								=decoder_ffn_dim
										__magic_name__	:	Tuple								=decoder_layers
										__magic_name__	:	Tuple								=decoder_attention_heads
										__magic_name__	:	Optional[Any]								=dropout
										__magic_name__	:	str								=attention_dropout
										__magic_name__	:	List[Any]								=activation_dropout
										__magic_name__	:	Tuple								=activation_function
										__magic_name__	:	Any								=init_std
										__magic_name__	:	List[str]								=encoder_layerdrop
										__magic_name__	:	Tuple								=decoder_layerdrop
										__magic_name__	:	Optional[Any]								=use_cache
										__magic_name__	:	Any								=encoder_layers
										__magic_name__	:	List[Any]								=scale_embedding  # scale factor will be sqrt(d_model) if True
										super().__init__(
										    pad_token_id=__snake_case    , eos_token_id=__snake_case    , is_encoder_decoder=__snake_case    , decoder_start_token_id=__snake_case    , forced_eos_token_id=__snake_case    , **__snake_case    , )

						@property
						def     A__						(		self   :int ):
										'''simple docstring'''

										return self.encoder_attention_heads


						@property
						def     A__						(		self   :List[Any] ):
										'''simple docstring'''

										return self.d_model










from math import pow, sqrt




def 		lowerCAmelCase_   (	*lowerCamelCase   ):
				__magic_name__	:	Tuple								=len(lowerCamelCase   ) > 0 and all(value > 0.0 for value in values   )
				return result




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(sqrt(molar_mass_a / molar_mass_a   )	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase   )
				    else ValueError("""Input Error: Molar mass values must greater than 0."""   )
				)




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(effusion_rate * sqrt(molar_mass_a / molar_mass_a   )	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   )
				    else ValueError(
				        """Input Error: Molar mass and effusion rate values must greater than 0."""   )
				)




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(effusion_rate / sqrt(molar_mass_a / molar_mass_a   )	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   )
				    else ValueError(
				        """Input Error: Molar mass and effusion rate values must greater than 0."""   )
				)




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(molar_mass / pow(effusion_rate_a / effusion_rate_a	,     2   )	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   )
				    else ValueError(
				        """Input Error: Molar mass and effusion rate values must greater than 0."""   )
				)




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   ):
				return (
				    round(pow(effusion_rate_a / effusion_rate_a	,     2   ) / molar_mass	,     6   )
				    if validate(lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   )
				    else ValueError(
				        """Input Error: Molar mass and effusion rate values must greater than 0."""   )
				)




