Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

CI: share the Qwen3.5-2B tool-calling GGUF cache across Linux, macOS and Windows (#8069)

Daniel Han3e4240f72342
diff --git a/.github/workflows/studio-inference-smoke.yml b/.github/workflows/studio-inference-smoke.yml
index e0773acd68c..3bb952c6911 100644
--- a/.github/workflows/studio-inference-smoke.yml
+++ b/.github/workflows/studio-inference-smoke.yml
@@ -337,7 +337,7 @@ jobs:
# (Qwen3.5-2B at Q4_K_XL = ~1.28 GiB). Caching HF_HOME would
# store xet chunks + blobs + snapshots = ~4 GiB compressed --
# 4-5x file-size inflation, dominated by xet chunks. Use main's
- # `--local-dir gguf-cache` pattern to cache the flat .gguf only.
+ # `--local-dir` pattern to cache the flat .gguf only.
# Unsloth's /api/inference/load accepts either a HF repo (which
# uses HF_HOME) or an absolute file path; passing the absolute
# path keeps the test off HF_HOME entirely so the cache size
@@ -369,13 +369,21 @@ jobs:
python-version: '3.12'
cache: 'pip'
+ # Cross-OS shared entry with the mac and Windows tool-calling phases:
+ # same repo, same file, same flat --local-dir payload, byte-identical on
+ # all three runners. The directory is renamed gguf-cache -> gguf-cache-tools
+ # to match them, and the key version is bumped in the SAME commit because
+ # actions/cache identifies an entry by key AND a hash of `path` -- moving
+ # the path without bumping the key gives a permanent restore miss plus a
+ # refused save ("Unable to reserve cache with key ...").
- name: Restore GGUF model file
id: cache-gguf
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
continue-on-error: true
with:
- path: gguf-cache
- key: ${{ runner.os }}-gguf-${{ env.GGUF_REPO }}-${{ env.GGUF_FILE }}-v1
+ path: gguf-cache-tools
+ key: gguf-unsloth/Qwen3.5-2B-GGUF-Qwen3.5-2B-UD-Q4_K_XL.gguf-v3
+ enableCrossOsArchive: true
- name: Download GGUF if cache miss
id: download-gguf
@@ -385,15 +393,16 @@ jobs:
HF_TOKEN: ${{ github.event_name != 'pull_request' && secrets.HF_TOKEN || '' }}
run: |
python -m pip install --upgrade huggingface_hub
- mkdir -p gguf-cache
- bash .github/scripts/hf-download-with-retry.sh "$GGUF_REPO" "$GGUF_FILE" gguf-cache
+ mkdir -p gguf-cache-tools
+ bash .github/scripts/hf-download-with-retry.sh "$GGUF_REPO" "$GGUF_FILE" gguf-cache-tools
- name: Save GGUF model file
- if: always() && github.ref == 'refs/heads/main' && steps.download-gguf.outcome == 'success'
+ if: always() && github.ref == 'refs/heads/main' && steps.download-gguf.outcome == 'success' && hashFiles('gguf-cache-tools/**/*.gguf') != ''
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
- path: gguf-cache
- key: ${{ runner.os }}-gguf-${{ env.GGUF_REPO }}-${{ env.GGUF_FILE }}-v1
+ path: gguf-cache-tools
+ key: gguf-unsloth/Qwen3.5-2B-GGUF-Qwen3.5-2B-UD-Q4_K_XL.gguf-v3
+ enableCrossOsArchive: true
- name: Install Unsloth (--local, --no-torch)
uses: ./.github/actions/install-unsloth-local
@@ -437,7 +446,7 @@ jobs:
-H 'content-type: application/json' \
-d "{\"username\":\"unsloth\",\"password\":\"$NEW\"}" | jq -r .access_token)
echo "API_KEY=$TOKEN" >> "$GITHUB_ENV"
- GGUF_PATH="$GITHUB_WORKSPACE/gguf-cache/${GGUF_FILE}"
+ GGUF_PATH="$GITHUB_WORKSPACE/gguf-cache-tools/${GGUF_FILE}"
ls -lh "$GGUF_PATH"
curl -fs -X POST "http://127.0.0.1:${STUDIO_PORT}/api/inference/load" \
-H "Authorization: Bearer $TOKEN" -H 'content-type: application/json' \
diff --git a/.github/workflows/studio-mac-inference-smoke.yml b/.github/workflows/studio-mac-inference-smoke.yml
index 0a09892f0a7..316dfb80416 100644
--- a/.github/workflows/studio-mac-inference-smoke.yml
+++ b/.github/workflows/studio-mac-inference-smoke.yml
@@ -411,15 +411,21 @@ jobs:
echo "GGUF_FILE=Qwen3.5-2B-UD-Q4_K_XL.gguf" >> "$GITHUB_ENV"
echo "STUDIO_PORT=18898" >> "$GITHUB_ENV"
- # Key suffix bumped v1 -> v2 with the directory rename, and this is not
- # cosmetic. actions/cache identifies an entry by key AND a version hash
- # derived from the `path` input, but key uniqueness is global per ref. The
- # old gguf-cache entry still holds the -v1 key, so a restore into
- # gguf-cache-tools misses on version while the save is refused with
- # "Unable to reserve cache with key ... another job may be creating this
- # cache". Without the bump this phase re-downloads the model on every run,
- # forever. Measured on staging before the bump: two consecutive runs both
- # logged "Cache not found for input keys" and both failed to save.
+ # Cross-OS shared entry with the Linux tool-calling job in
+ # studio-inference-smoke.yml: same repo, same file, same flat
+ # --local-dir payload, byte-identical on all three runners. The key
+ # therefore carries no `runner.os`, and enableCrossOsArchive is what
+ # lets Windows -- which tars with --force-local -- join it.
+ #
+ # The suffix is bumped v2 -> v3 because the Linux side moves its
+ # directory to gguf-cache-tools in the same commit, and that is not
+ # cosmetic: actions/cache identifies an entry by key AND a version hash
+ # derived from the `path` input, while key uniqueness is global per ref.
+ # Move the path without bumping the key and the restore misses on
+ # version while the save is refused with "Unable to reserve cache with
+ # key ... another job may be creating this cache" -- measured on staging
+ # during the Mac consolidation: two consecutive runs both logged "Cache
+ # not found for input keys" and both failed to save.
- name: Restore GGUF model file
id: cache-gguf-tools
if: ${{ !cancelled() && steps.assert-llama.outcome == 'success' }}
@@ -428,7 +434,8 @@ jobs:
timeout-minutes: 15
with:
path: gguf-cache-tools
- key: ${{ runner.os }}-gguf-unsloth/Qwen3.5-2B-GGUF-Qwen3.5-2B-UD-Q4_K_XL.gguf-v2
+ key: gguf-unsloth/Qwen3.5-2B-GGUF-Qwen3.5-2B-UD-Q4_K_XL.gguf-v3
+ enableCrossOsArchive: true
- name: Download GGUF if cache miss
id: download-gguf-tools
@@ -450,7 +457,8 @@ jobs:
timeout-minutes: 15
with:
path: gguf-cache-tools
- key: ${{ runner.os }}-gguf-unsloth/Qwen3.5-2B-GGUF-Qwen3.5-2B-UD-Q4_K_XL.gguf-v2
+ key: gguf-unsloth/Qwen3.5-2B-GGUF-Qwen3.5-2B-UD-Q4_K_XL.gguf-v3
+ enableCrossOsArchive: true
- name: Reset auth + boot Unsloth (API-only, default tool policy)
id: boot-tools
diff --git a/.github/workflows/studio-windows-inference-smoke.yml b/.github/workflows/studio-windows-inference-smoke.yml
index 97a6d4f103c..95a8d8e0f7e 100644
--- a/.github/workflows/studio-windows-inference-smoke.yml
+++ b/.github/workflows/studio-windows-inference-smoke.yml
@@ -583,14 +583,21 @@ jobs:
echo "STUDIO_PORT=18898" >> "$GITHUB_ENV"
echo "HF_HOME=${{ github.workspace }}/hf-cache-tools" >> "$GITHUB_ENV"
- # Key suffix bumped v1 -> v2 with the directory rename, and this is not
- # cosmetic. actions/cache identifies an entry by key AND a version hash
- # derived from the `path` input, but key uniqueness is global per ref. The
- # old gguf-cache entry still holds the -v1 key, so a restore into
- # gguf-cache-tools misses on version while the save is refused with
- # "Unable to reserve cache with key ... another job may be creating this
- # cache". Measured on staging during the Mac consolidation: two consecutive
- # runs both logged "Cache not found for input keys" and both failed to save.
+ # Cross-OS shared entry with the Linux tool-calling job in
+ # studio-inference-smoke.yml: same repo, same file, same flat
+ # --local-dir payload, byte-identical on all three runners. The key
+ # therefore carries no `runner.os`, and enableCrossOsArchive is what
+ # lets Windows -- which tars with --force-local -- join it.
+ #
+ # The suffix is bumped v2 -> v3 because the Linux side moves its
+ # directory to gguf-cache-tools in the same commit, and that is not
+ # cosmetic: actions/cache identifies an entry by key AND a version hash
+ # derived from the `path` input, while key uniqueness is global per ref.
+ # Move the path without bumping the key and the restore misses on
+ # version while the save is refused with "Unable to reserve cache with
+ # key ... another job may be creating this cache" -- measured on staging
+ # during the Mac consolidation: two consecutive runs both logged "Cache
+ # not found for input keys" and both failed to save.
- name: Restore GGUF model cache
if: ${{ !cancelled() && steps.shim.outcome == 'success' }}
id: cache-gguf-tools
@@ -599,7 +606,8 @@ jobs:
continue-on-error: true
with:
path: gguf-cache-tools
- key: ${{ runner.os }}-gguf-unsloth/Qwen3.5-2B-GGUF-Qwen3.5-2B-UD-Q4_K_XL.gguf-v2
+ key: gguf-unsloth/Qwen3.5-2B-GGUF-Qwen3.5-2B-UD-Q4_K_XL.gguf-v3
+ enableCrossOsArchive: true
- name: Download GGUF if cache miss
id: download-gguf-tools
@@ -614,12 +622,13 @@ jobs:
bash .github/scripts/hf-download-with-retry.sh "$GGUF_REPO" "$GGUF_FILE" gguf-cache-tools
- name: Save GGUF model cache
- if: always() && github.ref == 'refs/heads/main' && steps.download-gguf-tools.outcome == 'success'
+ if: always() && github.ref == 'refs/heads/main' && steps.download-gguf-tools.outcome == 'success' && hashFiles('gguf-cache-tools/**/*.gguf') != ''
timeout-minutes: 15
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: gguf-cache-tools
- key: ${{ runner.os }}-gguf-unsloth/Qwen3.5-2B-GGUF-Qwen3.5-2B-UD-Q4_K_XL.gguf-v2
+ key: gguf-unsloth/Qwen3.5-2B-GGUF-Qwen3.5-2B-UD-Q4_K_XL.gguf-v3
+ enableCrossOsArchive: true
- name: Reset auth + boot Unsloth (API-only, default tool policy)
id: boot-tools