






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


_lowerCAmelCase       =				logging.get_logger(__name__)

_lowerCAmelCase       =				{
    "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   SCREAMING_SNAKE_CASE	(					_SCREAMING_SNAKE_CASE    ):





	"""simple docstring"""




	_A							:					Optional[int] 			=					"""falcon"""
	_A							:					Union[str, Any] 			=					["""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_  ,  ):
		A_		:    List[str]						     = vocab_size
		# Backward compatibility with n_embed kwarg
		A_		:    Optional[int]						     = kwargs.pop("""n_embed"""  ,  lowerCAmelCase_				)
		A_		:    List[Any]						     = hidden_size if n_embed is None else n_embed
		A_		:    Any						     = num_hidden_layers
		A_		:    Optional[Any]						     = num_attention_heads
		A_		:    Union[str, Any]						     = layer_norm_epsilon
		A_		:    Tuple						     = initializer_range
		A_		:    int						     = use_cache
		A_		:    Dict						     = hidden_dropout
		A_		:    int						     = attention_dropout

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

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





	@property
	def  lowerCamelCase(self				):
		return self.hidden_size // self.num_attention_heads





	@property
	def  lowerCamelCase(self				):
		return not self.alibi









"""simple docstring"""
from __future__ import annotations






def       __UpperCamelCase						(		snake_case__ , snake_case__ = None , snake_case__ = None       ):
	if start is None:
		A_		:    Dict						     = 0

	if end is None:
		A_		:    Dict						     = len(snake_case__       ) - 1

	if start >= end:
		return

	A_		:    List[Any]						     = (start + end) // 2

	slowsort(snake_case__ , snake_case__ , snake_case__       )
	slowsort(snake_case__ , mid + 1 , snake_case__       )

	if sequence[end] < sequence[mid]:
		A_     ,  A_		:    Dict						     = sequence[mid], sequence[end]

	slowsort(snake_case__ , snake_case__ , end - 1       )


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

							testmod()

