


from __future__ import annotations

from math import pi

# Define the Reduced Planck Constant ℏ (H bar), speed of light C, value of
# Pi and the function
__UpperCamelCase				:  Optional[int]      					=							1.0_5457_1817E-34  # unit of ℏ : J * s

__UpperCamelCase				:  Dict      					=							3E8  # unit of c : m * s^-1
def      snake_case_						( __lowercase			,       __lowercase			,       __lowercase       )     ->   dict[str, float]:


   if (force, area, distance).count(0       ) != 1:
      raise ValueError('''One and only one argument must be 0'''       )
   if force < 0:
      raise ValueError('''Magnitude of force can not be negative'''       )
   if distance < 0:
      raise ValueError('''Distance can not be negative'''       )
   if area < 0:
      raise ValueError('''Area can not be negative'''       )
   if force == 0:
      UpperCAmelCase_							:      List[Any]						=   (REDUCED_PLANCK_CONSTANT * SPEED_OF_LIGHT * pi**2 * area) / (
          2_4_0 * (distance) ** 4
      )
      return {"force": force}
   elif area == 0:
      UpperCAmelCase_							:      Any						=   (2_4_0 * force * (distance) ** 4) / (
          REDUCED_PLANCK_CONSTANT * SPEED_OF_LIGHT * pi**2
      )
      return {"area": area}
   elif distance == 0:
      UpperCAmelCase_							:      str						=   (
          (REDUCED_PLANCK_CONSTANT * SPEED_OF_LIGHT * pi**2 * area) / (2_4_0 * force)
      ) ** (1 / 4)
      return {"distance": distance}
   raise ValueError('''One and only one argument must be 0'''       )


# Run doctest
if __name__ == "__main__":
       import doctest

       doctest.testmod()



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


__UpperCamelCase				:  str      					=							logging.get_logger(__name__)

__UpperCamelCase				:  Any      					=							{
    'tiiuae/falcon-40b': 'https://huggingface.co/tiiuae/falcon-40b/resolve/main/config.json',
    'tiiuae/falcon-7b': 'https://huggingface.co/tiiuae/falcon-7b/resolve/main/config.json',
}





class  lowerCAmelCase__(    snake_case__						):






    '''simple docstring'''





    A_  :     int			= 'falcon'
    A_  :     int			= ['past_key_values']





    def __init__(	self				:   Optional[Any]       ,   __snake_case				:   Tuple=65_024       ,   __snake_case				:   List[str]=4_544       ,   __snake_case				:   Optional[Any]=32       ,   __snake_case				:   Any=71       ,   __snake_case				:   str=1E-5       ,   __snake_case				:   List[str]=0.02       ,   __snake_case				:   List[Any]=True       ,   __snake_case				:   Dict=0.0       ,   __snake_case				:   Optional[Any]=0.0       ,   __snake_case				:   Any=None       ,   __snake_case				:   List[Any]=False       ,   __snake_case				:   Dict=False       ,   __snake_case				:   Optional[int]=True       ,   __snake_case				:   List[Any]=True       ,   __snake_case				:   Optional[Any]=False       ,   __snake_case				:   Dict=11       ,   __snake_case				:   List[str]=11       ,   **__snake_case				:   int       ,   ):





       '''simple docstring'''
       UpperCAmelCase_							:      int						=   vocab_size
       # Backward compatibility with n_embed kwarg
       UpperCAmelCase_							:      Union[str, Any]						=   kwargs.pop('''n_embed'''       ,   __snake_case	)
       UpperCAmelCase_							:      str						=   hidden_size if n_embed is None else n_embed
       UpperCAmelCase_							:      Tuple						=   num_hidden_layers
       UpperCAmelCase_							:      Tuple						=   num_attention_heads
       UpperCAmelCase_							:      Optional[int]						=   layer_norm_epsilon
       UpperCAmelCase_							:      int						=   initializer_range
       UpperCAmelCase_							:      Optional[int]						=   use_cache
       UpperCAmelCase_							:      List[Any]						=   hidden_dropout
       UpperCAmelCase_							:      Any						=   attention_dropout

       UpperCAmelCase_							:      Tuple						=   bos_token_id
       UpperCAmelCase_							:      List[Any]						=   eos_token_id
       UpperCAmelCase_							:      Any						=   num_attention_heads if num_kv_heads is None else num_kv_heads
       UpperCAmelCase_							:      Optional[int]						=   alibi
       UpperCAmelCase_							:      Dict						=   new_decoder_architecture
       UpperCAmelCase_							:      List[Any]						=   multi_query  # Ignored when new_decoder_architecture is True
       UpperCAmelCase_							:      Tuple						=   parallel_attn
       UpperCAmelCase_							:      List[Any]						=   bias

       super().__init__(bos_token_id=__snake_case       ,   eos_token_id=__snake_case       ,   **__snake_case	)





    @property
    def 					_lowerCamelCase (	self				:   Optional[int]	):





       '''simple docstring'''
       return self.hidden_size // self.num_attention_heads





    @property
    def 					_lowerCamelCase (	self				:   Optional[int]	):





       '''simple docstring'''
       return not self.alibi