Skip to content

ci: build and publish our own macOS llama.cpp prebuilts daily#18

Merged
danielhanchen merged 1 commit into
masterfrom
add-macos-prebuilt-pipeline
May 31, 2026
Merged

ci: build and publish our own macOS llama.cpp prebuilts daily#18
danielhanchen merged 1 commit into
masterfrom
add-macos-prebuilt-pipeline

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

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.cpp moved its arm64 release runner to macos-26 without pinning a deployment target, so every arm64 release from b9428 onward is stamped minos=26 and 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-cpu build 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

  • resolve job resolves the latest upstream ggml-org/llama.cpp release tag and skips if we already published it.
  • build matrix compiles from the upstream source at that tag: arm64 (Metal) on macos-14, x64 (CPU) on macos-15-intel. A load gate (scripts/unsloth/assert_macho_minos.sh) fails the build unless every shipped Mach-O has minos <= 13.3, carries the expected arch slice, and launches.
  • publish job generates llama-prebuilt-manifest.json and llama-prebuilt-sha256.json (scripts/unsloth/gen_manifest.py, in the exact schema the installer parses) and creates a llama-prebuilt-macos-<tag> release with both slices plus source archives.
  • Runs daily at 22:13 UTC. The macOS-only release tag keeps it separate from the existing Linux bundles.

Files

  • .github/workflows/unsloth-macos-prebuilt.yml
  • scripts/unsloth/gen_manifest.py
  • scripts/unsloth/assert_macho_minos.sh

Consumer side

The Studio installer already understands macos-arm64 / macos-x64 published artifacts; the matching setup.sh change to route macOS at this fork is in a separate unslothai/unsloth PR.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant