Studio: source CPU llama.cpp prebuilts from unslothai/llama.cpp - #6311
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Code Review
This pull request simplifies the installation routing logic for llama.cpp prebuilts by unconditionally routing all supported hosts (including CPU-only hosts on Linux and Windows) to the unslothai/llama.cpp fork, which now ships CPU bundles. This removes the previous fallback logic to the upstream ggml-org repository. The review feedback suggests two robust improvements: using defensive variable expansion in the shell script to prevent unbound variable errors under 'set -u', and normalizing line endings in test files to ensure cross-platform compatibility on Windows.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5048bb766d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…ff the CPU prebuilt
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0e34f99f8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…o the resolve probe runs cross-OS
# Conflicts: # studio/backend/tests/test_install_resolve_prebuilt.py
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Reviewed the routing change and replicated the branch onto current main to isolate the CI failures. Routing logic looks correct and backwards compatible. I simulated the full host matrix (Linux/Windows/macOS x x86_64/arm64 x NVIDIA/ROCm/CPU) against the fork manifest on this branch vs main: every GPU and macOS path resolves identically, and only the intended CPU paths change (Linux/Windows x64+arm64 now pull the fork CPU bundle; unknown Linux arches correctly fall back to a source build). The explicit On the review comments: the arch and SDK-host points are already handled at head - the CPU kind is gated on One real blocker, on the Windows CPU path. The fork's Windows x64 CPU Before this merges, the fork's Windows CPU bundle (the |
|
Follow-up: I tested the fork CPU bundles across the full GitHub-hosted CPU runner matrix (Linux and Windows x64 + arm64, macOS Intel + arm64), installing each via install_llama_prebuilt.py exactly as this PR routes, then loading a GGUF through llama-server and chatting. Correcting my earlier note: the fork's Windows CPU llama-server is not broken. Launched directly it loads a 2B GGUF and answers correctly on every Windows runner (x64 and arm64), including with Studio's exact flags ( The Windows Studio load failure is a separate thing. llama-server hard-crashes with exit 0xC0000409 (STATUS_STACK_BUFFER_OVERRUN) before writing any log, but only when spawned by Studio, and only with the fork bundle (the ggml-org bundle Studio used before loads fine). I could not reproduce it by invoking llama-server directly with Studio's exact command line, so it is specific to how Studio launches/manages the process on Windows with this bundle (subprocess spawn, the concurrent embedder, or the environment), not the bundle contents or its flags. Pinning it down needs running Studio on Windows and tracing its llama-server spawn. Separately, the matrix found a real portability bug in the Linux arm64 CPU bundle: it requires GLIBC_2.38 / GLIBCXX_3.4.32, so it fails to load on Ubuntu 22.04 arm64 (glibc 2.35) with a version-not-found loader error, while the x64 bundle runs fine there. The fork's arm64 CPU build should target an older base image to match the x64 one. Everything else is green: Linux x64 (ubuntu-slim/latest/24.04/22.04/26.04), Linux arm64 24.04/26.04, and macOS all install the fork CPU/Metal bundle and answer correctly. |
|
Thanks for running the full matrix, and for the routing simulation earlier. Both follow-up items check out when tested against the artifacts, with one correction on each. The original Windows blocker: fixed at the source. Your staging failure traced to the packaging step in unslothai/llama.cpp picking the oldest VS redist libomp140 (the 14.29 toolset), which predates This PR's CI re-ran after that release and is green, including the full Windows Studio GGUF CI run (https://github.com/unslothai/unsloth/actions/runs/28908666714) with "Studio install + inference without Visual Studio". Those jobs run the exact flow you describe: install via this PR's routing, assert the prebuilt landed, boot Studio, load a GGUF through The Studio-spawn 0xC0000409: probably a pre-fix bundle. Which If the marker says b9899 or later and the crash still reproduces, there is a real Studio-spawn interaction to trace and I'll dig into it. But the green job's log shows it installed The Linux arm64 glibc floor: real, but not a regression of this PR. I compared the fork bundle against ggml-org's Worth fixing in the fork's unsloth-prebuilt-cpu workflow as a follow-up: move the arm64 leg to ubuntu-22.04-arm, after validating its default gcc (the GCC-14 workaround exists because 24.04's stock toolchain miscompiles ggml). The same fix applies upstream, which has the identical floor. |
|
Final update on the Windows Studio question I flagged earlier. I stood up full Unsloth Studio on a
So the Two things worth landing regardless of this PR (both outside its scope, both real):
Net: the routing this PR adds is correct and backward compatible, the CPU bundles exist and are hash-valid across the full GitHub-hosted runner matrix (Linux x64/arm64, Windows x64/arm64, macOS Intel/arm64), and the specific Windows Studio scenario now works on the current bundle. |
Finishes what #5963 started: moves the last llama.cpp prebuilt artifacts off ggml-org and onto the unslothai/llama.cpp fork. #5963 already moved CUDA, ROCm and macOS. This PR moves the CPU bundles (Linux + Windows, x86_64 + arm64), so the installer no longer pulls any ggml-org prebuilt on the default path.
unslothai/llama.cpp#23 is already merged, so this just needs the daily workflow to run once to publish a release with the CPU bundles (which look like https://github.com/oobabooga/llama.cpp/releases/tag/b9625-mix-2d6bd50).
What changed
Routing to the fork is now unconditional, in three mirrored layers (CPU-only Linux/Windows used to route to ggml-org; only GPU and macOS used the fork):
setup.sh: replaced the_LINUX_HAS_GPUdetection and if/elif/else with a single_HELPER_RELEASE_REPO="unslothai/llama.cpp".setup.ps1:$HelperReleaseRepois now an unconditional fork assignment.install_llama_prebuilt.py: droppedpublished_repo_for_host()(it had become a constant) and the deadamd_toolingprobe.arm64 CPU selectors added to the manifest path (x86_64 CPU already selected from the fork manifest; arm64 was the gap):
resolve_release_asset_choice: newwindows-arm64branch._linux_published_attempts: the CPU branch is now arch-aware (linux-arm64vslinux-cpu).setup.sharm64 GPU last-resort fallback now pulls the fork'sapp-*-linux-arm64-cpu.tar.gzinstead of ggml-org'subuntu-arm64.The ggml-org filename branches stay in place, reachable only via an explicit
--published-repo ggml-orgoverride, so the diff stays small and reversible. There is no s390x/riscv/ppc CPU path to regress; the only hosts that pulled ggml-org CPU artifacts were x86_64 and arm64, both now on the fork.Follow-up
scripts/unsloth/assemble_metadata.pyon unslothai/llama.cpp master still emits two arm64 upstream passthrough checksums (linux-arm64-upstream,windows-arm64-upstream). After this PR gets merged, those checksums can be dropped.