




'''simple docstring'''







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


A     =logging.get_logger(__name__)

A     ={
    '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 			_a  (	__a ):
       __a				:     Optional[int]   				=					"""falcon"""
       __a				:     Tuple   				=					["""past_key_values"""]
       def __init__(	self						:	Dict   ,				lowercase						:	str=65_024   ,				lowercase						:	Dict=4_544   ,				lowercase						:	Optional[int]=32   ,				lowercase						:	Any=71   ,				lowercase						:	List[Any]=1E-5   ,				lowercase						:	Union[str, Any]=0.02   ,				lowercase						:	int=True   ,				lowercase						:	Union[str, Any]=0.0   ,				lowercase						:	str=0.0   ,				lowercase						:	List[Any]=None   ,				lowercase						:	List[str]=False   ,				lowercase						:	List[Any]=False   ,				lowercase						:	List[str]=True   ,				lowercase						:	Dict=True   ,				lowercase						:	Tuple=False   ,				lowercase						:	int=11   ,				lowercase						:	Any=11   ,				**lowercase						:	str   ,				):



           '''simple docstring'''

           UpperCAmelCase			       =		vocab_size
           # Backward compatibility with n_embed kwarg
           UpperCAmelCase			       =		kwargs.pop('''n_embed'''   ,				lowercase				)
           UpperCAmelCase			       =		hidden_size if n_embed is None else n_embed
           UpperCAmelCase			       =		num_hidden_layers
           UpperCAmelCase			       =		num_attention_heads
           UpperCAmelCase			       =		layer_norm_epsilon
           UpperCAmelCase			       =		initializer_range
           UpperCAmelCase			       =		use_cache
           UpperCAmelCase			       =		hidden_dropout
           UpperCAmelCase			       =		attention_dropout

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

           super().__init__(bos_token_id=lowercase   ,				eos_token_id=lowercase   ,				**lowercase				)
       @property
       def     A      (	self						:	Any				):



           '''simple docstring'''

           return self.hidden_size // self.num_attention_heads







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



           '''simple docstring'''

           return not self.alibi










'''simple docstring'''







import os
from distutils.util import strtobool





def 						snake_case_							(_a	:							Union[str, Any]    ,   _a	:							List[Any]     ):
    for e in env_keys:
        UpperCAmelCase			       =		int(os.environ.get(_a    ,   -1     )     )
        if val >= 0:
            return val
    return default





def 						snake_case_							(_a	:							Dict    ,   _a	:							Any=False     ):
    UpperCAmelCase			       =		os.environ.get(_a    ,   str(_a     )     )
    return strtobool(_a     ) == 1  # As its name indicates `strtobool` actually returns an int...







def 						snake_case_							(_a	:							str    ,   _a	:							Optional[Any]="no"     ):
    UpperCAmelCase			       =		os.environ.get(_a    ,   str(_a     )     )
    return value




