From 7880f139adc62b18912e0b28cf594ee8947418b2 Mon Sep 17 00:00:00 2001 From: abetlen Date: Sun, 22 Mar 2026 15:05:25 -0700 Subject: [PATCH 1/4] Fix model download in test workflow --- .github/workflows/test.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 95f6e5a27..50fd483b9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,9 +20,18 @@ jobs: with: python-version: "3.9" - name: Install huggingface-hub - run: pip install huggingface-hub + run: python -m pip install huggingface-hub - name: Download model - run: huggingface-cli download ${{ env.REPO_ID }} ${{ env.MODEL_FILE }} + run: | + python - <<'PY' + import os + from huggingface_hub import hf_hub_download + + hf_hub_download( + repo_id=os.environ["REPO_ID"], + filename=os.environ["MODEL_FILE"], + ) + PY - name: Cache model uses: actions/cache@v4 with: From af557a0e636d7e6a2c087b2bb2cdfe2a78b9143a Mon Sep 17 00:00:00 2001 From: abetlen Date: Sun, 22 Mar 2026 15:08:47 -0700 Subject: [PATCH 2/4] Use hf CLI in test workflow --- .github/workflows/test.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 50fd483b9..1f283d16d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,16 +22,7 @@ jobs: - name: Install huggingface-hub run: python -m pip install huggingface-hub - name: Download model - run: | - python - <<'PY' - import os - from huggingface_hub import hf_hub_download - - hf_hub_download( - repo_id=os.environ["REPO_ID"], - filename=os.environ["MODEL_FILE"], - ) - PY + run: hf download ${{ env.REPO_ID }} ${{ env.MODEL_FILE }} - name: Cache model uses: actions/cache@v4 with: From 62eb63292c65a5e78b656f7945b121c8b912210b Mon Sep 17 00:00:00 2001 From: abetlen Date: Sun, 22 Mar 2026 15:14:18 -0700 Subject: [PATCH 3/4] Use hf CLI name in CI and docs --- .github/workflows/test.yaml | 2 +- CHANGELOG.md | 2 ++ README.md | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1f283d16d..1d2b1983c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,7 +20,7 @@ jobs: with: python-version: "3.9" - name: Install huggingface-hub - run: python -m pip install huggingface-hub + run: pip install huggingface-hub - name: Download model run: hf download ${{ env.REPO_ID }} ${{ env.MODEL_FILE }} - name: Cache model diff --git a/CHANGELOG.md b/CHANGELOG.md index 16954eb88..48a207eb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- fix(ci): Use the `hf` CLI instead of the deprecated `huggingface-cli` name in GitHub Actions and docs + ## [0.3.16] - feat: Update llama.cpp to ggerganov/llama.cpp@4227c9be4268ac844921b90f31595f81236bd317 diff --git a/README.md b/README.md index 382f7cbed..d2ba297ca 100644 --- a/README.md +++ b/README.md @@ -328,7 +328,7 @@ llm = Llama.from_pretrained( ) ``` -By default [`from_pretrained`](https://llama-cpp-python.readthedocs.io/en/latest/api-reference/#llama_cpp.Llama.from_pretrained) will download the model to the huggingface cache directory, you can then manage installed model files with the [`huggingface-cli`](https://huggingface.co/docs/huggingface_hub/en/guides/cli) tool. +By default [`from_pretrained`](https://llama-cpp-python.readthedocs.io/en/latest/api-reference/#llama_cpp.Llama.from_pretrained) will download the model to the huggingface cache directory, you can then manage installed model files with the [`hf`](https://huggingface.co/docs/huggingface_hub/en/guides/cli) tool. ### Chat Completion From 848cc5a5b9dab765c48d20dba36aac28e9b36267 Mon Sep 17 00:00:00 2001 From: abetlen Date: Sun, 22 Mar 2026 15:17:48 -0700 Subject: [PATCH 4/4] Reference PR in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48a207eb8..1f577c1a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- fix(ci): Use the `hf` CLI instead of the deprecated `huggingface-cli` name in GitHub Actions and docs +- fix(ci): Use the `hf` CLI instead of the deprecated `huggingface-cli` name in GitHub Actions and docs by @abetlen in #2149 ## [0.3.16]