From 1902e83a671e79a9a3d421431215288a482daa1a Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 2 Apr 2026 18:49:45 +0000 Subject: [PATCH 1/3] fix(studio): revert llama.cpp default tag to latest The latest ggml-org/llama.cpp release (b8637) now includes Gemma 4 support. Revert the temporary "b8637" pin from #4796 to "latest" so the prebuilt resolver always picks the newest release automatically without needing manual tag bumps. --- studio/install_llama_prebuilt.py | 2 +- studio/setup.ps1 | 2 +- studio/setup.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/studio/install_llama_prebuilt.py b/studio/install_llama_prebuilt.py index 9fe5b55e9f..91afe0d3ba 100755 --- a/studio/install_llama_prebuilt.py +++ b/studio/install_llama_prebuilt.py @@ -60,7 +60,7 @@ def env_int(name: str, default: int, *, minimum: int | None = None) -> int: return value -DEFAULT_LLAMA_TAG = os.environ.get("UNSLOTH_LLAMA_TAG", "b8637") +DEFAULT_LLAMA_TAG = os.environ.get("UNSLOTH_LLAMA_TAG", "latest") # Force all installs to use mainline llama.cpp from ggml-org. # Previously: DEFAULT_PUBLISHED_REPO = os.environ.get("UNSLOTH_LLAMA_RELEASE_REPO", "unslothai/llama.cpp") DEFAULT_PUBLISHED_REPO = "ggml-org/llama.cpp" diff --git a/studio/setup.ps1 b/studio/setup.ps1 index 47d7f0ee55..e26acd040a 100644 --- a/studio/setup.ps1 +++ b/studio/setup.ps1 @@ -29,7 +29,7 @@ $PackageDir = Split-Path -Parent $ScriptDir # -------------------------------------------------------------------------- $DefaultLlamaPrForce = "" $DefaultLlamaSource = "https://github.com/ggml-org/llama.cpp" -$DefaultLlamaTag = "b8637" +$DefaultLlamaTag = "latest" # Verbose can be enabled either by CLI flag or by UNSLOTH_VERBOSE=1. $script:UnslothVerbose = ($env:UNSLOTH_VERBOSE -eq '1') diff --git a/studio/setup.sh b/studio/setup.sh index 4e7bd366ef..b8505fcb13 100755 --- a/studio/setup.sh +++ b/studio/setup.sh @@ -19,7 +19,7 @@ RULE=$(printf '\342\224\200%.0s' {1..52}) # ────────────────────────────────────────────────────────────────────────── _DEFAULT_LLAMA_PR_FORCE="" _DEFAULT_LLAMA_SOURCE="https://github.com/ggml-org/llama.cpp" -_DEFAULT_LLAMA_TAG="b8637" +_DEFAULT_LLAMA_TAG="latest" # ── Colors (same palette as startup_banner / install_python_stack) ── if [ -n "${NO_COLOR:-}" ]; then From b6ffd94918e2d12db2e4cf08985908b08fe3a387 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 2 Apr 2026 18:51:30 +0000 Subject: [PATCH 2/3] docs: add comment explaining latest vs master for llama.cpp tag Document in all three files why "latest" is preferred over "master" and when "master" should be used as a temporary override. --- studio/install_llama_prebuilt.py | 4 ++++ studio/setup.ps1 | 4 ++++ studio/setup.sh | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/studio/install_llama_prebuilt.py b/studio/install_llama_prebuilt.py index 91afe0d3ba..1b02729649 100755 --- a/studio/install_llama_prebuilt.py +++ b/studio/install_llama_prebuilt.py @@ -60,6 +60,10 @@ def env_int(name: str, default: int, *, minimum: int | None = None) -> int: return value +# Prefer "latest" over "master" -- "master" bypasses the prebuilt resolver +# (no matching GitHub release), forces a source build, and causes HTTP 422 +# errors. Only use "master" temporarily when the latest release is missing +# support for a new model architecture. DEFAULT_LLAMA_TAG = os.environ.get("UNSLOTH_LLAMA_TAG", "latest") # Force all installs to use mainline llama.cpp from ggml-org. # Previously: DEFAULT_PUBLISHED_REPO = os.environ.get("UNSLOTH_LLAMA_RELEASE_REPO", "unslothai/llama.cpp") diff --git a/studio/setup.ps1 b/studio/setup.ps1 index e26acd040a..d478319098 100644 --- a/studio/setup.ps1 +++ b/studio/setup.ps1 @@ -27,6 +27,10 @@ $PackageDir = Split-Path -Parent $ScriptDir # Change these in the GitHub-hosted script so users get updated defaults. # User env vars always override these baked-in values. # -------------------------------------------------------------------------- +# Prefer "latest" over "master" -- "master" bypasses the prebuilt resolver +# (no matching GitHub release), forces a source build, and causes HTTP 422 +# errors. Only use "master" temporarily when the latest release is missing +# support for a new model architecture. $DefaultLlamaPrForce = "" $DefaultLlamaSource = "https://github.com/ggml-org/llama.cpp" $DefaultLlamaTag = "latest" diff --git a/studio/setup.sh b/studio/setup.sh index b8505fcb13..d9ce73661f 100755 --- a/studio/setup.sh +++ b/studio/setup.sh @@ -16,6 +16,11 @@ RULE=$(printf '\342\224\200%.0s' {1..52}) # _DEFAULT_LLAMA_SOURCE : git clone URL for source builds # _DEFAULT_LLAMA_TAG : llama.cpp ref to build ("latest" = newest release, # "master" = bleeding-edge, "bNNNN" = specific tag) +# Prefer "latest" over "master" -- "master" bypasses +# the prebuilt resolver (no matching GitHub release), +# forces a source build, and causes HTTP 422 errors. +# Only use "master" temporarily when the latest release +# is missing support for a new model architecture. # ────────────────────────────────────────────────────────────────────────── _DEFAULT_LLAMA_PR_FORCE="" _DEFAULT_LLAMA_SOURCE="https://github.com/ggml-org/llama.cpp" From 90724f6dabe15102f093f4061ae8884a25923e54 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 2 Apr 2026 19:14:00 +0000 Subject: [PATCH 3/3] fix(studio): suppress fatal error when prebuilt manifest is missing When DEFAULT_PUBLISHED_REPO is ggml-org/llama.cpp, the prebuilt resolver fails because ggml-org releases do not include a llama-prebuilt-manifest.json asset. This raised a PrebuiltFallback exception that was caught by the generic Exception handler and printed as "fatal helper error" to stderr, which triggers a NativeCommandError on PowerShell and looks alarming. Catch PrebuiltFallback separately and exit with EXIT_FALLBACK (code 2) instead of EXIT_ERROR (code 1). The message is still logged but without the "fatal helper error" prefix. The shell scripts already handle non-zero exits gracefully and fall back to source builds. --- studio/install_llama_prebuilt.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/studio/install_llama_prebuilt.py b/studio/install_llama_prebuilt.py index 1b02729649..5e8fe314b4 100755 --- a/studio/install_llama_prebuilt.py +++ b/studio/install_llama_prebuilt.py @@ -4733,6 +4733,12 @@ if __name__ == "__main__": f"fatal helper busy conflict: {textwrap.shorten(str(exc), width = 400, placeholder = '...')}" ) raise SystemExit(EXIT_BUSY) + except PrebuiltFallback as exc: + # Expected when the published repo (e.g. ggml-org/llama.cpp) has no + # prebuilt manifest. Exit quietly with EXIT_FALLBACK so the caller + # falls back to source build without a noisy "fatal helper error". + log(textwrap.shorten(str(exc), width = 400, placeholder = "...")) + raise SystemExit(EXIT_FALLBACK) except Exception as exc: message = textwrap.shorten(str(exc), width = 400, placeholder = "...") log(f"fatal helper error: {message}")