Skip to content

Commit

Permalink
automatically download exl2 model in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lapp0 committed Oct 4, 2024
1 parent f5b7726 commit 8bd29f5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/generate/test_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,16 @@ def model_llamacpp(tmp_path_factory):

@pytest.fixture(scope="session")
def model_exllamav2(tmp_path_factory):
from huggingface_hub import snapshot_download

tmp_dir = tmp_path_factory.mktemp("model_download")
model_path = snapshot_download(
repo_id="blockblockblock/TinyLlama-1.1B-Chat-v1.0-bpw4.6-exl2",
cache_dir=tmp_dir,
)

return models.exl2(
model_path="blockblockblock/TinyLlama-1.1B-Chat-v1.0-bpw4-exl2",
model_path=model_path,
cache_q4=True,
paged=False,
)
Expand Down

0 comments on commit 8bd29f5

Please sign in to comment.