Skip to content

Commit

Permalink
pull model in CI (#2)
Browse files Browse the repository at this point in the history
* pull model in CI

* cache hf model
  • Loading branch information
dhconnelly authored Dec 4, 2024
1 parent 648714b commit af0371f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/cmake-x86_64-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Hugging Face Login
run: |
pip install -U "huggingface_hub[cli]"
huggingface-cli login --token ${{secrets.HF_TOKEN}} --add-to-git-credential
- name: Verify HF login
run: huggingface-cli whoami

- name: Cache model
id: cache-hf-llama-3-2-1b-instruct
uses: actions/cache@v3
env:
cache-name: cache-hf-llama-3-2-1b-instruct
with:
path: ~/.cache/huggingface/hub/models--meta-llama--Llama-3.2-1B-Instruct
key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: Pull model
run: huggingface-cli download meta-llama/Llama-3.2-1B-Instruct

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
Expand Down

0 comments on commit af0371f

Please sign in to comment.