


'''simple docstring'''





from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfigWithPast
from ...utils import logging


__lowerCamelCase       				=	logging.get_logger(__name__)

__lowerCamelCase       				=	{
    '''uclanlp/plbart-base''': '''https://huggingface.co/uclanlp/plbart-base/resolve/main/config.json''',
    # See all PLBART models at https://huggingface.co/models?filter=plbart
}




class 							UpperCAmelCase ( lowerCAmelCase__	):
 UpperCAmelCase				=				"""plbart"""
 UpperCAmelCase				=				["""past_key_values"""]
 UpperCAmelCase				=				{"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}


 def __init__(			self       :  Tuple ,					__lowerCamelCase       :  Union[str, Any]=5_0_0_0_5 ,					__lowerCamelCase       :  str=1_0_2_4 ,					__lowerCamelCase       :  Optional[int]=6 ,					__lowerCamelCase       :  Any=3_0_7_2 ,					__lowerCamelCase       :  List[str]=1_2 ,					__lowerCamelCase       :  Union[str, Any]=6 ,					__lowerCamelCase       :  Any=3_0_7_2 ,					__lowerCamelCase       :  Optional[Any]=1_2 ,					__lowerCamelCase       :  Optional[Any]=0.0 ,					__lowerCamelCase       :  List[str]=0.0 ,					__lowerCamelCase       :  Optional[Any]=True ,					__lowerCamelCase       :  List[Any]=True ,					__lowerCamelCase       :  Any="gelu" ,					__lowerCamelCase       :  Any=7_6_8 ,					__lowerCamelCase       :  Optional[int]=0.1 ,					__lowerCamelCase       :  Optional[Any]=0.1 ,					__lowerCamelCase       :  Union[str, Any]=0.0 ,					__lowerCamelCase       :  Union[str, Any]=0.02 ,					__lowerCamelCase       :  str=0.0 ,					__lowerCamelCase       :  Optional[Any]=True ,					__lowerCamelCase       :  List[str]=1 ,					__lowerCamelCase       :  Any=0 ,					__lowerCamelCase       :  Union[str, Any]=2 ,					__lowerCamelCase       :  Union[str, Any]=2 ,					**__lowerCamelCase       :  Tuple ,					):
    UpperCAmelCase__  :List[Any]            =			vocab_size
    UpperCAmelCase__  :List[str]            =			max_position_embeddings
    UpperCAmelCase__  :Any            =			d_model
    UpperCAmelCase__  :str            =			encoder_ffn_dim
    UpperCAmelCase__  :Union[str, Any]            =			encoder_layers
    UpperCAmelCase__  :List[Any]            =			encoder_attention_heads
    UpperCAmelCase__  :int            =			decoder_ffn_dim
    UpperCAmelCase__  :List[Any]            =			decoder_layers
    UpperCAmelCase__  :Union[str, Any]            =			decoder_attention_heads
    UpperCAmelCase__  :str            =			dropout
    UpperCAmelCase__  :Optional[int]            =			attention_dropout
    UpperCAmelCase__  :Dict            =			activation_dropout
    UpperCAmelCase__  :List[str]            =			activation_function
    UpperCAmelCase__  :int            =			init_std
    UpperCAmelCase__  :Union[str, Any]            =			encoder_layerdrop
    UpperCAmelCase__  :Any            =			decoder_layerdrop
    UpperCAmelCase__  :Optional[Any]            =			classifier_dropout
    UpperCAmelCase__  :Any            =			use_cache
    UpperCAmelCase__  :Any            =			encoder_layers
    UpperCAmelCase__  :Dict            =			scale_embedding  # scale factor will be sqrt(d_model) if True
    super().__init__(
        pad_token_id=lowerCAmelCase_ ,					bos_token_id=lowerCAmelCase_ ,					eos_token_id=lowerCAmelCase_ ,					is_encoder_decoder=lowerCAmelCase_ ,					forced_eos_token_id=lowerCAmelCase_ ,					**lowerCAmelCase_ ,					)




class 							UpperCAmelCase ( lowerCAmelCase__	):


 @property
 def 					__SCREAMING_SNAKE_CASE				(			self       :  Dict   ):
    return OrderedDict(
        [
            ('''input_ids''', {0: '''batch''', 1: '''sequence'''}),
            ('''attention_mask''', {0: '''batch''', 1: '''sequence'''}),
        ]   )





 @property
 def 					__SCREAMING_SNAKE_CASE				(			self       :  Union[str, Any]   ):






    if self.use_past:
       return OrderedDict(
           [
               ('''last_hidden_state''', {0: '''batch''', 1: '''sequence'''}),
               ('''past_keys''', {0: '''batch''', 2: '''sequence'''}),
               ('''encoder_last_hidden_state''', {0: '''batch''', 1: '''sequence'''}),
           ]   )
    else:
       return OrderedDict(
           [
               ('''last_hidden_state''', {0: '''batch''', 1: '''sequence'''}),
               ('''encoder_last_hidden_state''', {0: '''batch''', 1: '''sequence'''}),
           ]   )





'''simple docstring'''





from scipy.constants import g


def 					a__    (				UpperCamelCase_	:			float,      UpperCamelCase_	:			float	):
   if mass < 0:
      # handling of negative values of mass
      raise ValueError('''The mass of a body cannot be negative'''	)
   if height < 0:
      # handling of negative values of height
      raise ValueError('''The height above the ground cannot be negative'''	)
   return mass * g * height


if __name__ == "__main__":
    from doctest import testmod

    testmod(name='''potential_energy''')



