


from ..utils import DummyObject, requires_backends







class 							UpperCamelCase__ (						metaclass=__magic_name__ ):
					__SCREAMING_SNAKE_CASE							:	Optional[Any]            = ["torch", "scipy"]

					def __init__(  self							: str				,       *UpperCamelCase__							: List[str]				,       **UpperCamelCase__							: List[Any]							):






										'''simple docstring'''






										requires_backends(self				,       ["""torch""", """scipy"""]							)

					@classmethod
					def 	UpperCAmelCase__							(  cls							: Dict				,       *UpperCamelCase__							: Optional[int]				,       **UpperCamelCase__							: int							):






										'''simple docstring'''






										requires_backends(cls				,       ["""torch""", """scipy"""]							)







					@classmethod
					def 	UpperCAmelCase__							(  cls							: str				,       *UpperCamelCase__							: Optional[int]				,       **UpperCamelCase__							: Optional[int]							):






										'''simple docstring'''






										requires_backends(cls				,       ["""torch""", """scipy"""]							)









'''simple docstring'''


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


_SCREAMING_SNAKE_CASE									=				logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE									=				{
    "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_		(		__magic_name__		):
 __lowerCamelCase    :				Any								=       "falcon"
 __lowerCamelCase    :				List[str]								=       ["past_key_values"]




 def __init__(						self      ,  _lowerCAmelCase=65024      ,  _lowerCAmelCase=4544      ,  _lowerCAmelCase=32      ,  _lowerCAmelCase=71      ,  _lowerCAmelCase=1E-5      ,  _lowerCAmelCase=0.02      ,  _lowerCAmelCase=True      ,  _lowerCAmelCase=0.0      ,  _lowerCAmelCase=0.0      ,  _lowerCAmelCase=None      ,  _lowerCAmelCase=False      ,  _lowerCAmelCase=False      ,  _lowerCAmelCase=True      ,  _lowerCAmelCase=True      ,  _lowerCAmelCase=False      ,  _lowerCAmelCase=11      ,  _lowerCAmelCase=11      ,  **_lowerCAmelCase      ,  )     ->				Union[str, Any]:
     _lowerCAmelCase						      =   vocab_size
     # Backward compatibility with n_embed kwarg
     _lowerCAmelCase						      =   kwargs.pop("n_embed"      ,  _lowerCAmelCase		)
     _lowerCAmelCase						      =   hidden_size if n_embed is None else n_embed
     _lowerCAmelCase						      =   num_hidden_layers
     _lowerCAmelCase						      =   num_attention_heads
     _lowerCAmelCase						      =   layer_norm_epsilon
     _lowerCAmelCase						      =   initializer_range
     _lowerCAmelCase						      =   use_cache
     _lowerCAmelCase						      =   hidden_dropout
     _lowerCAmelCase						      =   attention_dropout

     _lowerCAmelCase						      =   bos_token_id
     _lowerCAmelCase						      =   eos_token_id
     _lowerCAmelCase						      =   num_attention_heads if num_kv_heads is None else num_kv_heads
     _lowerCAmelCase						      =   alibi
     _lowerCAmelCase						      =   new_decoder_architecture
     _lowerCAmelCase						      =   multi_query  # Ignored when new_decoder_architecture is True
     _lowerCAmelCase						      =   parallel_attn
     _lowerCAmelCase						      =   bias

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




 @property
 def 				_snake_case (						self		)     ->				Optional[Any]:
     return self.hidden_size // self.num_attention_heads





 @property
 def 				_snake_case (						self		)     ->				Optional[Any]:
     return not self.alibi


