ci: build and publish our own macOS llama.cpp prebuilts daily#18
Merged
Conversation
Build macOS arm64 (Metal) and x64 (CPU) from ggml-org/llama.cpp at its latest release tag and publish a macOS-only release on this fork that Unsloth Studio installs from. The only change over upstream's macos-cpu build is pinning -DCMAKE_OSX_DEPLOYMENT_TARGET=13.3, so the binaries declare a minimum macOS of 13.3 and dyld-load on every current Mac instead of inheriting the runner OS as their minimum (upstream's arm64 release runner moved to macos-26, which stamped minos=26 and broke loading on macOS < 26). - resolve job: pick the latest upstream tag, skip if already published - build matrix: arm64 on macos-14, x64 on macos-15-intel, with a load gate (minos <= 13.3, arch slice present, llama-cli/llama-quantize launch) - publish job: generate manifest + sha256 in the schema the installer consumes and create the release, runs daily at 22:13 UTC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a daily workflow that builds our own macOS llama.cpp prebuilts and publishes them as a macOS-only release on this fork, which Unsloth Studio installs from.
Why
Upstream
ggml-org/llama.cppmoved its arm64 release runner tomacos-26without pinning a deployment target, so every arm64 release fromb9428onward is stampedminos=26and fails to dyld-load on macOS < 26. Studio's host-version-aware selection already walks back to the last loadable upstream prebuilt, but that leaves macOS < 26 users on a steadily aging binary. Owning the build removes the dependency on upstream's runner config.The only change over upstream's own
macos-cpubuild is pinning-DCMAKE_OSX_DEPLOYMENT_TARGET=13.3(the same flag upstream already sets on its x64 slice), so the binaries declare a minimum macOS of 13.3 and load on every current Mac. The x64 slice is built for resilience as Apple winds down Intel.How it works
resolvejob resolves the latest upstreamggml-org/llama.cpprelease tag and skips if we already published it.buildmatrix compiles from the upstream source at that tag: arm64 (Metal) onmacos-14, x64 (CPU) onmacos-15-intel. A load gate (scripts/unsloth/assert_macho_minos.sh) fails the build unless every shipped Mach-O hasminos <= 13.3, carries the expected arch slice, and launches.publishjob generatesllama-prebuilt-manifest.jsonandllama-prebuilt-sha256.json(scripts/unsloth/gen_manifest.py, in the exact schema the installer parses) and creates allama-prebuilt-macos-<tag>release with both slices plus source archives.Files
.github/workflows/unsloth-macos-prebuilt.ymlscripts/unsloth/gen_manifest.pyscripts/unsloth/assert_macho_minos.shConsumer side
The Studio installer already understands
macos-arm64/macos-x64published artifacts; the matchingsetup.shchange to route macOS at this fork is in a separate unslothai/unsloth PR.