

"""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        _lowercase					(     __UpperCAmelCase     ):
     _lowerCamelCase     =       '''falcon'''
     _lowerCamelCase     =       ['''past_key_values''']







     def __init__(      self ,						UpperCamelCase_=6_5024 ,						UpperCamelCase_=4544 ,						UpperCamelCase_=32 ,						UpperCamelCase_=71 ,						UpperCamelCase_=1E-5 ,						UpperCamelCase_=0.0_2 ,						UpperCamelCase_=True ,						UpperCamelCase_=0.0 ,						UpperCamelCase_=0.0 ,						UpperCamelCase_=None ,						UpperCamelCase_=False ,						UpperCamelCase_=False ,						UpperCamelCase_=True ,						UpperCamelCase_=True ,						UpperCamelCase_=False ,						UpperCamelCase_=11 ,						UpperCamelCase_=11 ,						**UpperCamelCase_ ,						):
      __magic_name__     =      vocab_size
      # Backward compatibility with n_embed kwarg
      __magic_name__     =      kwargs.pop('''n_embed''' ,						UpperCamelCase_       )
      __magic_name__     =      hidden_size if n_embed is None else n_embed
      __magic_name__     =      num_hidden_layers
      __magic_name__     =      num_attention_heads
      __magic_name__     =      layer_norm_epsilon
      __magic_name__     =      initializer_range
      __magic_name__     =      use_cache
      __magic_name__     =      hidden_dropout
      __magic_name__     =      attention_dropout

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

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







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







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




"""simple docstring"""






import pytest

import datasets


# Import fixture modules as plugins
__lowerCamelCase										=		["tests.fixtures.files", "tests.fixtures.hub", "tests.fixtures.fsspec"]





def 	lowercase      (   __UpperCamelCase      ,   __UpperCamelCase						) ->      str:
 # Mark tests as "unit" by default if not marked as "integration" (or already marked as "unit")
 for item in items:
  if any(marker in item.keywords for marker in ['''integration''', '''unit''']						):
   continue
  item.add_marker(pytest.mark.unit						)





def 	lowercase      (   __UpperCamelCase						) ->      Union[str, Any]:
 config.addinivalue_line('''markers'''      ,   '''torchaudio_latest: mark test to run with torchaudio>=0.12'''						)





@pytest.fixture(autouse=__UpperCamelCase						)
def 	lowercase      (   __UpperCamelCase      ,   __UpperCamelCase						) ->      Dict:
 # test_hf_cache_home = tmp_path_factory.mktemp("cache")  # TODO: why a cache dir per test function does not work?
 __magic_name__     =      tmp_path_factory.getbasetemp() / '''cache'''
 __magic_name__     =      test_hf_cache_home / '''datasets'''
 __magic_name__     =      test_hf_cache_home / '''metrics'''
 __magic_name__     =      test_hf_cache_home / '''modules'''
 monkeypatch.setattr('''datasets.config.HF_DATASETS_CACHE'''      ,   str(__UpperCamelCase						)						)
 monkeypatch.setattr('''datasets.config.HF_METRICS_CACHE'''      ,   str(__UpperCamelCase						)						)
 monkeypatch.setattr('''datasets.config.HF_MODULES_CACHE'''      ,   str(__UpperCamelCase						)						)
 __magic_name__     =      test_hf_datasets_cache / '''downloads'''
 monkeypatch.setattr('''datasets.config.DOWNLOADED_DATASETS_PATH'''      ,   str(__UpperCamelCase						)						)
 __magic_name__     =      test_hf_datasets_cache / '''downloads''' / '''extracted'''
 monkeypatch.setattr('''datasets.config.EXTRACTED_DATASETS_PATH'''      ,   str(__UpperCamelCase						)						)





@pytest.fixture(autouse=__UpperCamelCase      ,   scope='''session'''						)
def 	lowercase      (   ) ->      Any:
 datasets.disable_progress_bar()





@pytest.fixture(autouse=__UpperCamelCase						)
def 	lowercase      (   __UpperCamelCase						) ->      str:
 # don't take tests into account when counting downloads
 monkeypatch.setattr('''datasets.config.HF_UPDATE_DOWNLOAD_COUNTS'''      ,   __UpperCamelCase						)





@pytest.fixture
def 	lowercase      (   __UpperCamelCase						) ->      int:
 # Required to suppress RemovedIn20Warning when feature(s) are not compatible with SQLAlchemy 2.0
 # To be removed once SQLAlchemy 2.0 supported
 monkeypatch.setattr('''sqlalchemy.util.deprecations.SILENCE_UBER_WARNING'''      ,   __UpperCamelCase						)

