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


__lowercase										= logging.get_logger(__name__)

__lowercase										= {
    '''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_					(       UpperCAmelCase_			):






    '''simple docstring'''






    a__     :						Any      =				"""falcon"""
    a__     :						str      =				["""past_key_values"""]







    def __init__(     self			,			__lowercase=65_024			,			__lowercase=4_544			,			__lowercase=32			,			__lowercase=71			,			__lowercase=1E-5			,			__lowercase=0.02			,			__lowercase=True			,			__lowercase=0.0			,			__lowercase=0.0			,			__lowercase=None			,			__lowercase=False			,			__lowercase=False			,			__lowercase=True			,			__lowercase=True			,			__lowercase=False			,			__lowercase=11			,			__lowercase=11			,			**__lowercase			,			)	->     Dict:
        __UpperCamelCase					:Optional[int]        =		vocab_size
        # Backward compatibility with n_embed kwarg
        __UpperCamelCase					:Dict        =		kwargs.pop('''n_embed'''			,			__lowercase)
        __UpperCamelCase					:Optional[int]        =		hidden_size if n_embed is None else n_embed
        __UpperCamelCase					:int        =		num_hidden_layers
        __UpperCamelCase					:Dict        =		num_attention_heads
        __UpperCamelCase					:Any        =		layer_norm_epsilon
        __UpperCamelCase					:List[Any]        =		initializer_range
        __UpperCamelCase					:List[Any]        =		use_cache
        __UpperCamelCase					:str        =		hidden_dropout
        __UpperCamelCase					:Optional[Any]        =		attention_dropout

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

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







    @property
    def       UpperCamelCase__       (     self)	->     Tuple:
        return self.hidden_size // self.num_attention_heads







    @property
    def       UpperCamelCase__       (     self)	->     Dict:
        return not self.alibi






import os

import pytest

from transformers.dynamic_module_utils import get_imports


__lowercase										= '''
import os
'''

__lowercase										= '''
def foo():
    import os
    return False
'''

__lowercase										= '''
def foo():
    def bar():
        if True:
            import os
        return False
    return bar()
'''

__lowercase										= '''
import os

try:
    import bar
except ImportError:
    raise ValueError()
'''

__lowercase										= '''
import os

def foo():
    try:
        import bar
    except ImportError:
        raise ValueError()
'''

__lowercase										= '''
import os

try:
    import bar
except (ImportError, AttributeError):
    raise ValueError()
'''

__lowercase										= '''
import os

try:
    import bar
except ImportError as e:
    raise ValueError()
'''

__lowercase										= '''
import os

try:
    import bar
except:
    raise ValueError()
'''

__lowercase										= '''
import os

try:
    import bar
    import baz
except ImportError:
    raise ValueError()
'''

__lowercase										= '''
import os

try:
    import bar
    import baz
except ImportError:
    x = 1
    raise ValueError()
'''

__lowercase										= [
    TOP_LEVEL_IMPORT,
    IMPORT_IN_FUNCTION,
    DEEPLY_NESTED_IMPORT,
    TOP_LEVEL_TRY_IMPORT,
    GENERIC_EXCEPT_IMPORT,
    MULTILINE_TRY_IMPORT,
    MULTILINE_BOTH_IMPORT,
    MULTIPLE_EXCEPTS_IMPORT,
    EXCEPT_AS_IMPORT,
    TRY_IMPORT_IN_FUNCTION,
]



@pytest.mark.parametrize('''case'''  ,      SCREAMING_SNAKE_CASE     )
def lowerCamelCase  (       SCREAMING_SNAKE_CASE  ,      SCREAMING_SNAKE_CASE     ):
    '''simple docstring'''







    __UpperCamelCase					:List[Any]        =		os.path.join(SCREAMING_SNAKE_CASE  ,      '''test_file.py'''     )
    with open(SCREAMING_SNAKE_CASE  ,      '''w'''     ) as _tmp_file:
        _tmp_file.write(SCREAMING_SNAKE_CASE     )

    __UpperCamelCase					:Dict        =		get_imports(SCREAMING_SNAKE_CASE     )
    assert parsed_imports == ["os"]





