From e4169d0296208af9d4b9a5d00c3db4db32da9e28 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Thu, 3 Sep 2026 08:33:48 +0000 Subject: [PATCH 01/12] unsloth: compare add/add conflicts on content, not on the braces around it additive_merge.py refuses a conflict when both sides add a line the other also adds, on the grounds that one construct added twice would be duplicated by a union. Two independent case arms in the same switch always share their scaffolding, so that check fires on `{` and `} break;` and refuses exactly the add/add it exists to resolve. That is what stopped the 09-02 nightly on its last pin: refused tools/mtmd/clip.cpp: both sides add the same line(s), so this is one change made twice: {, } break; where one side added a PROJECTOR_TYPE_KIMIK3 arm and the other a PROJECTOR_TYPE_DEEPSEEK4V one, with no line of actual content in common. Compare the sides on their identifying lines instead: braces, brackets, parens, semicolons and commas around at most one bare block-terminating keyword are scaffolding and carry no identity. `break;` is scaffolding, `return true;` is not, and anything naming a type, constant or function is not. Two arms that really are the same change still share their case label and their body, so a genuine duplicate is still refused. A side whose addition is nothing but scaffolding now refuses too: with the scaffolding discounted there is no content left to tell the two additions apart, so unioning would be a guess. --- scripts/unsloth/additive_merge.py | 39 +++++++++++++++++++++++++- scripts/unsloth/test_additive_merge.py | 36 ++++++++++++++++++++++-- 2 files changed, 71 insertions(+), 4 deletions(-) diff --git a/scripts/unsloth/additive_merge.py b/scripts/unsloth/additive_merge.py index 3ecf17c415a..0265b00172f 100644 --- a/scripts/unsloth/additive_merge.py +++ b/scripts/unsloth/additive_merge.py @@ -13,6 +13,12 @@ the merge base is non-empty means at least one side *edited* shared text, and picking a side or unioning them is a guess. This script never guesses. +The two additions are compared on their CONTENT, not on the braces around it. +A case arm is `case X:`, a body, and `} break;`, and two arms for different +architectures share that last part whatever they do. Treating the scaffolding +as evidence that the same change was made twice refuses exactly the conflict +this script exists for; see STRUCTURAL below. + Reads a conflicted work tree, writes resolutions in place, exits 0 if every conflict in every file was resolved and 1 otherwise. `--report` emits JSON describing what it did for the caller to quote in a PR body. @@ -22,6 +28,7 @@ import argparse import json +import re import subprocess import sys from pathlib import Path @@ -87,6 +94,26 @@ def nonblank(lines: list[str]) -> list[str]: return [ln.strip() for ln in lines if ln.strip()] +# A line that closes or opens a block and nothing else. Two INDEPENDENT case +# arms in the same switch share these by construction -- `{`, `} break;`, `}` +# are what a case arm is made of, not what makes it that case arm -- so finding +# them on both sides says nothing about whether the two sides added the same +# construct. Matching them as "shared" is what refused the real add/add of +# PROJECTOR_TYPE_KIMIK3 next to PROJECTOR_TYPE_DEEPSEEK4V in tools/mtmd/clip.cpp +# with "one change made twice: {, } break;", when the two arms had no line of +# actual content in common. +# +# Deliberately narrow: braces, brackets, parens, semicolons and commas, around +# at most one bare block-terminating keyword. `break;` matches, `return true;` +# does not, and anything naming a type, a constant or a function does not. +STRUCTURAL = re.compile(r"^[\s{}()\[\];,]*(?:break|continue|return|pass)?[\s{}()\[\];,]*$") + + +def identifying(lines: list[str]) -> set[str]: + """The lines that say WHICH construct this is, ignoring block scaffolding.""" + return {ln for ln in nonblank(lines) if not STRUCTURAL.match(ln)} + + def resolve_region(ours: list[str], base: list[str], theirs: list[str]) -> list[str]: """Return the union, or raise if this region is not a pure add/add.""" if nonblank(base): @@ -100,14 +127,24 @@ def resolve_region(ours: list[str], base: list[str], theirs: list[str]) -> list[ if ours == theirs: # Both sides added byte-identical text; one copy is the resolution. return list(ours) - shared = set(nonblank(ours)) & set(nonblank(theirs)) + shared = identifying(ours) & identifying(theirs) if shared: # Overlapping content is the signature of one construct added twice, # not two independent additions. Unioning it would duplicate code. + # Scaffolding lines are excluded above, so what is left is content both + # sides genuinely wrote, which is the thing that makes this a duplicate. raise Unresolvable( "both sides add the same line(s), so this is one change made twice: " + ", ".join(sorted(shared)[:3]) ) + if not identifying(ours) or not identifying(theirs): + # Everything one side added is scaffolding, so there is no content to + # tell the two additions apart and the exclusion above has nothing left + # to work with. Refuse rather than union braces onto braces. + raise Unresolvable( + "one side adds only block scaffolding, so the two additions cannot " + "be told apart" + ) # Upstream first, then ours: the same order a human repin produces. return list(theirs) + list(ours) diff --git a/scripts/unsloth/test_additive_merge.py b/scripts/unsloth/test_additive_merge.py index 0a3e535d7a5..561b1a24dc8 100644 --- a/scripts/unsloth/test_additive_merge.py +++ b/scripts/unsloth/test_additive_merge.py @@ -86,12 +86,42 @@ def run(repo, *extra): check("identical add/add is not a conflict at all", rc == 1 and "no conflicted files" in json.dumps(rep)) base = "a\nz\n" -ours = "a\ncase FOO:\n break;\nz\n" -theirs = "a\ncase BAR:\n break;\nz\n" +ours = "a\ncase FOO:\n log(\"same\");\n break;\nz\n" +theirs = "a\ncase BAR:\n log(\"same\");\n break;\nz\n" repo, f = make_conflict(base, ours, theirs) rc, rep = run(repo) -check("overlapping add/add refuses (shared 'break;')", +check("overlapping add/add refuses on shared CONTENT", rc == 1 and "made twice" in json.dumps(rep), rep) +reason = rep["refused"][0]["reason"] if rep.get("refused") else "" +check("overlapping add/add names the content line, not the braces", + 'log("same");' in reason and "break;" not in reason, reason) + +# --- 3b. two independent case arms: braces are shared, content is not ------- +# The real tools/mtmd/clip.cpp shape. Refusing this on `{` and `} break;` is +# what took the 09-02 nightly's last pin down. +base = "switch (t) {\n}\n" +ours = ("switch (t) {\n case PROJECTOR_TYPE_KIMIK3:\n {\n" + " builder = std::make_unique(ctx, img);\n" + " } break;\n}\n") +theirs = ("switch (t) {\n case PROJECTOR_TYPE_DEEPSEEK4V:\n {\n" + " builder = std::make_unique(ctx, img);\n" + " } break;\n}\n") +repo, f = make_conflict(base, ours, theirs) +rc, rep = run(repo) +txt = f.read_text() +check("independent case arms resolve despite shared braces", rc == 0 and rep["ok"], rep) +check("independent case arms keep both", "KIMIK3" in txt and "DEEPSEEK4V" in txt and "<<<<" not in txt, txt) +check("independent case arms keep both bodies once", + txt.count("} break;") == 2 and txt.count("clip_graph_kimik3") == 1, txt) + +# --- 3c. one side adds only scaffolding: nothing distinguishes the two ------ +base = "a\nz\n" +ours = "a\n}\nz\n" +theirs = "a\ncase BAR:\n break;\nz\n" +repo, f = make_conflict(base, ours, theirs) +rc, rep = run(repo) +check("scaffolding-only addition refuses", + rc == 1 and "scaffolding" in json.dumps(rep), rep) # --- 4. one file good, one file bad: refuse the whole merge ---------------- d = Path(tempfile.mkdtemp(prefix="am_")) From 71d6b39f65162350e366f05d35c72d8293855921 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Thu, 3 Sep 2026 08:38:02 +0000 Subject: [PATCH 02/12] unsloth: let two case arms with different labels share a body line Discounting the braces is not enough on its own. Once upstream landed DEEPSEEK4V, the KIMIK3 arm and the DEEPSEEK4V arm of the same switch both set `hparams.rope_theta = 10000.0f;`, so the shared-line check refuses on a coincidence: conflict tools/mtmd/clip.cpp: both sides add the same line(s), so this is one change made twice: hparams.rope_theta = 10000.0f; Two arms of one switch labelled differently are two constructs, whatever lines their bodies have in common, so when both sides add case arms and no label appears on both sides, the union is the resolution. The labels are the proof, and they are also what keeps the duplicate check working: the same change made twice keeps its label, so it never reaches this branch and is still refused. A duplicated label would not compile. --- scripts/unsloth/additive_merge.py | 32 ++++++++++++++++ scripts/unsloth/pr-set.json | 14 +++---- scripts/unsloth/test_additive_merge.py | 51 ++++++++++++++++++++++++-- 3 files changed, 87 insertions(+), 10 deletions(-) diff --git a/scripts/unsloth/additive_merge.py b/scripts/unsloth/additive_merge.py index 0265b00172f..5364dc1b7c1 100644 --- a/scripts/unsloth/additive_merge.py +++ b/scripts/unsloth/additive_merge.py @@ -114,6 +114,24 @@ def identifying(lines: list[str]) -> set[str]: return {ln for ln in nonblank(lines) if not STRUCTURAL.match(ln)} +# `case FOO:`, `case FOO :`, `default:`. A fallthrough label may carry no body +# at all, which is the shape the nightly hits most often. +CASE_LABEL = re.compile(r"^(?:case\s+[^:]+|default\s*):") + + +def case_arms(lines: list[str]) -> set[str] | None: + """The case labels this side adds, or None if it is not a run of case arms. + + None, not an empty set: "adds no case arm" and "adds case arms, none of + which the other side adds" have to be told apart, and only the second one + licenses the union below. + """ + ident = [ln for ln in nonblank(lines) if not STRUCTURAL.match(ln)] + if not ident or not CASE_LABEL.match(ident[0]): + return None + return {ln for ln in ident if CASE_LABEL.match(ln)} + + def resolve_region(ours: list[str], base: list[str], theirs: list[str]) -> list[str]: """Return the union, or raise if this region is not a pure add/add.""" if nonblank(base): @@ -127,6 +145,20 @@ def resolve_region(ours: list[str], base: list[str], theirs: list[str]) -> list[ if ours == theirs: # Both sides added byte-identical text; one copy is the resolution. return list(ours) + ours_arms, theirs_arms = case_arms(ours), case_arms(theirs) + if ours_arms and theirs_arms and ours_arms.isdisjoint(theirs_arms): + # Both sides added case arms, and not one label is on both sides. Two + # arms of the same switch labelled differently are two constructs, so + # any line they happen to share is body text, not a duplicate: the real + # tools/mtmd/clip.cpp collision has a KIMIK3 arm and a DEEPSEEK4V arm + # that both set `hparams.rope_theta = 10000.0f;`, and refusing on that + # coincidence is what the shared-line check is for, backwards. + # + # The same change made twice would keep its label, so it lands in the + # check below instead. This is the one place where a shared line is + # allowed, and it is allowed because the labels prove the arms are + # distinct -- a duplicated label would not even compile. + return list(theirs) + list(ours) shared = identifying(ours) & identifying(theirs) if shared: # Overlapping content is the signature of one construct added twice, diff --git a/scripts/unsloth/pr-set.json b/scripts/unsloth/pr-set.json index f52560db096..f3765de7fa2 100644 --- a/scripts/unsloth/pr-set.json +++ b/scripts/unsloth/pr-set.json @@ -22,14 +22,14 @@ "https://github.com/ggml-org/llama.cpp/pull/25731/commits/44eb88e9aba218b24c0f374f2ec1c4d7d7920877", "https://github.com/unslothai/llama.cpp/pull/70/commits/edfd4c1a3b7a653303a85257ddac2a1f3ce39a2f", "https://github.com/unslothai/llama.cpp/pull/91/commits/c86ed269986f2dced6325c5c58bda966a2e2ead1", - "https://github.com/unslothai/llama.cpp/pull/95/commits/3db8cb5b2e9bf291057b9f19960e8601a162da81", - "https://github.com/ggml-org/llama.cpp/pull/27754/commits/949f7efb097eb20ef36fecdb1afaebff9a4ae7ed", - "https://github.com/unslothai/llama.cpp/pull/137/commits/4e1865e34ec5f6ca39403215c89129c13731be70", - "https://github.com/unslothai/llama.cpp/pull/158/commits/abfc45b9cb21eae4848cb82196e659f42c9a8341", - "https://github.com/unslothai/llama.cpp/pull/157/commits/6c6da89266ba7839d825c9997782af4f4d26b81b", - "https://github.com/unslothai/llama.cpp/pull/149/commits/b65a2dce12c14a489e19a059cb6ee59112f1b733", + "https://github.com/unslothai/llama.cpp/pull/95/commits/db908313fc679541e9ac88b8e3effd136dc125c7", + "https://github.com/ggml-org/llama.cpp/pull/27754/commits/bf550e99d3316a8c0e0280de6422f85f1a557190", + "https://github.com/unslothai/llama.cpp/pull/137/commits/8378dcec2b032c054cafc8e7a79584b621cd0348", + "https://github.com/unslothai/llama.cpp/pull/158/commits/384ddf4a249ece277237553019aeb3a688284ad4", + "https://github.com/unslothai/llama.cpp/pull/157/commits/01fbc1dede48cbe1728fee05057a7263db007aef", + "https://github.com/unslothai/llama.cpp/pull/149/commits/c7dce133d745f9af9acf5839c65141fe2d705394", "https://github.com/unslothai/llama.cpp/pull/144/commits/5a08a717da20caa6c5c4dfaa85024adf6fc4e7fa", - "https://github.com/unslothai/llama.cpp/pull/152/commits/258345efa640eb099eb1af3c9ee8f8e6e8e7b0d3", + "https://github.com/unslothai/llama.cpp/pull/152/commits/6f9c19833ac849eb70feb332784485a648f048a5", "https://github.com/unslothai/llama.cpp/pull/154/commits/31e432e758f8cc4b2c5f27902721500173bf39db", "https://github.com/ggml-org/llama.cpp/pull/28133/commits/3a798bf2f3e0a5ee90c0a7bcef60fb3ef1b4b8b3" ] diff --git a/scripts/unsloth/test_additive_merge.py b/scripts/unsloth/test_additive_merge.py index 561b1a24dc8..0f91e9afd12 100644 --- a/scripts/unsloth/test_additive_merge.py +++ b/scripts/unsloth/test_additive_merge.py @@ -86,15 +86,15 @@ def run(repo, *extra): check("identical add/add is not a conflict at all", rc == 1 and "no conflicted files" in json.dumps(rep)) base = "a\nz\n" -ours = "a\ncase FOO:\n log(\"same\");\n break;\nz\n" -theirs = "a\ncase BAR:\n log(\"same\");\n break;\nz\n" +ours = "a\nstatic void helper() {\n log(\"same\");\n}\nz\n" +theirs = "a\nstatic void helper2() {\n log(\"same\");\n}\nz\n" repo, f = make_conflict(base, ours, theirs) rc, rep = run(repo) check("overlapping add/add refuses on shared CONTENT", rc == 1 and "made twice" in json.dumps(rep), rep) reason = rep["refused"][0]["reason"] if rep.get("refused") else "" check("overlapping add/add names the content line, not the braces", - 'log("same");' in reason and "break;" not in reason, reason) + reason.endswith('twice: log("same");'), reason) # --- 3b. two independent case arms: braces are shared, content is not ------- # The real tools/mtmd/clip.cpp shape. Refusing this on `{` and `} break;` is @@ -114,6 +114,51 @@ def run(repo, *extra): check("independent case arms keep both bodies once", txt.count("} break;") == 2 and txt.count("clip_graph_kimik3") == 1, txt) +# --- 3b2. two case arms that share a body line, which is a coincidence ------ +# The clip.cpp shape after upstream landed DEEPSEEK4V: both arms set the same +# rope_theta, and refusing on that is the shared-line check backwards. +base = "switch (t) {\n}\n" +ours = ("switch (t) {\n case PROJECTOR_TYPE_KIMIK3:\n {\n" + " hparams.image_resize_algo = RESIZE_ALGO_BILINEAR;\n" + " hparams.rope_theta = 10000.0f;\n } break;\n}\n") +theirs = ("switch (t) {\n case PROJECTOR_TYPE_DEEPSEEK4V:\n {\n" + " hparams.image_resize_algo = RESIZE_ALGO_BICUBIC;\n" + " hparams.rope_theta = 10000.0f;\n } break;\n}\n") +repo, f = make_conflict(base, ours, theirs) +rc, rep = run(repo) +txt = f.read_text() +check("case arms with a coincidentally shared body line resolve", rc == 0 and rep["ok"], rep) +check("case arms with a shared body line keep both arms", + txt.count("rope_theta") == 2 and "KIMIK3" in txt and "DEEPSEEK4V" in txt, txt) + +# --- 3b3. the SAME arm added twice keeps its label, so it still refuses ----- +base = "switch (t) {\n}\n" +ours = ("switch (t) {\n case PROJECTOR_TYPE_KIMIK3:\n {\n" + " hparams.rope_theta = 10000.0f;\n } break;\n}\n") +theirs = ("switch (t) {\n case PROJECTOR_TYPE_KIMIK3:\n {\n" + " hparams.rope_theta = 50000.0f;\n } break;\n}\n") +repo, f = make_conflict(base, ours, theirs) +rc, rep = run(repo) +check("the same case label on both sides still refuses", + rc == 1 and "made twice" in json.dumps(rep), rep) + +# --- 3b4. only one side is case arms: no label proof, ordinary rules apply -- +base = "a\nz\n" +ours = "a\ncase FOO:\n f(1);\n break;\nz\n" +theirs = "a\nstatic void helper() { f(1); }\nz\n" +repo, f = make_conflict(base, ours, theirs) +rc, rep = run(repo) +check("one side not a case arm falls back to the shared-line check", + rc == 0 and rep["ok"], rep) + +base = "a\nz\n" +ours = "a\ncase FOO:\n f(1);\n break;\nz\n" +theirs = "a\nstatic void helper();\n f(1);\nz\n" +repo, f = make_conflict(base, ours, theirs) +rc, rep = run(repo) +check("one side not a case arm still refuses on a shared content line", + rc == 1 and "made twice" in json.dumps(rep), rep) + # --- 3c. one side adds only scaffolding: nothing distinguishes the two ------ base = "a\nz\n" ours = "a\n}\nz\n" From 8c080a70b5e203522ebc1e2317dcf553deba5870 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Thu, 3 Sep 2026 09:14:34 +0000 Subject: [PATCH 03/12] unsloth: unbreak the pin set on b10775 Five pins stopped merging. Two of them had been overtaken by upstream, one was carrying work the base tag now has, one is not ours to fix, and one is obsolete. ggml-org#25731 -> unslothai#172 carried onto b10775; the head repo is ggml-org, so the repin bot cannot touch it unslothai#70 refreshed onto b10775 unslothai#91 -> unslothai#171 merged into fork master, so it cannot be repinned; re-carried onto b10775 unslothai#154 dropped, upstream deleted the function ggml-org#28133 dropped, b10775 contains it The whole set now merges onto b10775 with eleven clean merges and one additive one, and the merged tree passes merge_checks.py. --- scripts/unsloth/pr-set.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/unsloth/pr-set.json b/scripts/unsloth/pr-set.json index f52560db096..e00f1fbcf09 100644 --- a/scripts/unsloth/pr-set.json +++ b/scripts/unsloth/pr-set.json @@ -19,9 +19,9 @@ ], "prs": [ "https://github.com/unslothai/llama.cpp/pull/107/commits/74acc40c37ae2eb36031981feda392b793944f72", - "https://github.com/ggml-org/llama.cpp/pull/25731/commits/44eb88e9aba218b24c0f374f2ec1c4d7d7920877", - "https://github.com/unslothai/llama.cpp/pull/70/commits/edfd4c1a3b7a653303a85257ddac2a1f3ce39a2f", - "https://github.com/unslothai/llama.cpp/pull/91/commits/c86ed269986f2dced6325c5c58bda966a2e2ead1", + "https://github.com/unslothai/llama.cpp/pull/172/commits/5b836b6f1dc494a59e92337ed5e4516324b54bfb", + "https://github.com/unslothai/llama.cpp/pull/70/commits/883f2c9ba78f3847148454adf025da29385fff3e", + "https://github.com/unslothai/llama.cpp/pull/171/commits/95e08993a63e64365a5eec4741fa1262c3770f98", "https://github.com/unslothai/llama.cpp/pull/95/commits/3db8cb5b2e9bf291057b9f19960e8601a162da81", "https://github.com/ggml-org/llama.cpp/pull/27754/commits/949f7efb097eb20ef36fecdb1afaebff9a4ae7ed", "https://github.com/unslothai/llama.cpp/pull/137/commits/4e1865e34ec5f6ca39403215c89129c13731be70", @@ -29,8 +29,6 @@ "https://github.com/unslothai/llama.cpp/pull/157/commits/6c6da89266ba7839d825c9997782af4f4d26b81b", "https://github.com/unslothai/llama.cpp/pull/149/commits/b65a2dce12c14a489e19a059cb6ee59112f1b733", "https://github.com/unslothai/llama.cpp/pull/144/commits/5a08a717da20caa6c5c4dfaa85024adf6fc4e7fa", - "https://github.com/unslothai/llama.cpp/pull/152/commits/258345efa640eb099eb1af3c9ee8f8e6e8e7b0d3", - "https://github.com/unslothai/llama.cpp/pull/154/commits/31e432e758f8cc4b2c5f27902721500173bf39db", - "https://github.com/ggml-org/llama.cpp/pull/28133/commits/3a798bf2f3e0a5ee90c0a7bcef60fb3ef1b4b8b3" + "https://github.com/unslothai/llama.cpp/pull/152/commits/258345efa640eb099eb1af3c9ee8f8e6e8e7b0d3" ] } From 9326b69213bf8964e7614e77651ac31e8ca40c78 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Thu, 3 Sep 2026 09:42:29 +0000 Subject: [PATCH 04/12] unsloth: carry ggml-org#27754 too, it merges clean and does not compile --- scripts/unsloth/pr-set.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/unsloth/pr-set.json b/scripts/unsloth/pr-set.json index e00f1fbcf09..98bd71c198b 100644 --- a/scripts/unsloth/pr-set.json +++ b/scripts/unsloth/pr-set.json @@ -23,7 +23,7 @@ "https://github.com/unslothai/llama.cpp/pull/70/commits/883f2c9ba78f3847148454adf025da29385fff3e", "https://github.com/unslothai/llama.cpp/pull/171/commits/95e08993a63e64365a5eec4741fa1262c3770f98", "https://github.com/unslothai/llama.cpp/pull/95/commits/3db8cb5b2e9bf291057b9f19960e8601a162da81", - "https://github.com/ggml-org/llama.cpp/pull/27754/commits/949f7efb097eb20ef36fecdb1afaebff9a4ae7ed", + "https://github.com/unslothai/llama.cpp/pull/173/commits/aed95865bbb38a4edf7e4a4f065c34a088396457", "https://github.com/unslothai/llama.cpp/pull/137/commits/4e1865e34ec5f6ca39403215c89129c13731be70", "https://github.com/unslothai/llama.cpp/pull/158/commits/abfc45b9cb21eae4848cb82196e659f42c9a8341", "https://github.com/unslothai/llama.cpp/pull/157/commits/6c6da89266ba7839d825c9997782af4f4d26b81b", From 184488ad3477340c562faa713ddf695eb54b51fe Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Thu, 3 Sep 2026 11:35:46 +0000 Subject: [PATCH 05/12] Revert the pin file to master repin.py writes its new pins back into scripts/unsloth/pr-set.json, and running it here to reproduce the failing conflict left that file modified. It has nothing to do with this change, and the pins it wrote point at local merge commits that were never pushed, so the lint correctly rejected them. The pin changes live in their own PR. --- scripts/unsloth/pr-set.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/unsloth/pr-set.json b/scripts/unsloth/pr-set.json index f3765de7fa2..f52560db096 100644 --- a/scripts/unsloth/pr-set.json +++ b/scripts/unsloth/pr-set.json @@ -22,14 +22,14 @@ "https://github.com/ggml-org/llama.cpp/pull/25731/commits/44eb88e9aba218b24c0f374f2ec1c4d7d7920877", "https://github.com/unslothai/llama.cpp/pull/70/commits/edfd4c1a3b7a653303a85257ddac2a1f3ce39a2f", "https://github.com/unslothai/llama.cpp/pull/91/commits/c86ed269986f2dced6325c5c58bda966a2e2ead1", - "https://github.com/unslothai/llama.cpp/pull/95/commits/db908313fc679541e9ac88b8e3effd136dc125c7", - "https://github.com/ggml-org/llama.cpp/pull/27754/commits/bf550e99d3316a8c0e0280de6422f85f1a557190", - "https://github.com/unslothai/llama.cpp/pull/137/commits/8378dcec2b032c054cafc8e7a79584b621cd0348", - "https://github.com/unslothai/llama.cpp/pull/158/commits/384ddf4a249ece277237553019aeb3a688284ad4", - "https://github.com/unslothai/llama.cpp/pull/157/commits/01fbc1dede48cbe1728fee05057a7263db007aef", - "https://github.com/unslothai/llama.cpp/pull/149/commits/c7dce133d745f9af9acf5839c65141fe2d705394", + "https://github.com/unslothai/llama.cpp/pull/95/commits/3db8cb5b2e9bf291057b9f19960e8601a162da81", + "https://github.com/ggml-org/llama.cpp/pull/27754/commits/949f7efb097eb20ef36fecdb1afaebff9a4ae7ed", + "https://github.com/unslothai/llama.cpp/pull/137/commits/4e1865e34ec5f6ca39403215c89129c13731be70", + "https://github.com/unslothai/llama.cpp/pull/158/commits/abfc45b9cb21eae4848cb82196e659f42c9a8341", + "https://github.com/unslothai/llama.cpp/pull/157/commits/6c6da89266ba7839d825c9997782af4f4d26b81b", + "https://github.com/unslothai/llama.cpp/pull/149/commits/b65a2dce12c14a489e19a059cb6ee59112f1b733", "https://github.com/unslothai/llama.cpp/pull/144/commits/5a08a717da20caa6c5c4dfaa85024adf6fc4e7fa", - "https://github.com/unslothai/llama.cpp/pull/152/commits/6f9c19833ac849eb70feb332784485a648f048a5", + "https://github.com/unslothai/llama.cpp/pull/152/commits/258345efa640eb099eb1af3c9ee8f8e6e8e7b0d3", "https://github.com/unslothai/llama.cpp/pull/154/commits/31e432e758f8cc4b2c5f27902721500173bf39db", "https://github.com/ggml-org/llama.cpp/pull/28133/commits/3a798bf2f3e0a5ee90c0a7bcef60fb3ef1b4b8b3" ] From 4c7a9b2c81e5e069d691686300192fc693d4f259 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Thu, 3 Sep 2026 22:48:43 +0000 Subject: [PATCH 06/12] unsloth: refresh the DiffusionGemma carry and pin the new tests --- scripts/unsloth/pr-set.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/unsloth/pr-set.json b/scripts/unsloth/pr-set.json index 98bd71c198b..0d35a6659d5 100644 --- a/scripts/unsloth/pr-set.json +++ b/scripts/unsloth/pr-set.json @@ -18,8 +18,8 @@ "tag + pins), so keep its pin listed until the change lands upstream." ], "prs": [ - "https://github.com/unslothai/llama.cpp/pull/107/commits/74acc40c37ae2eb36031981feda392b793944f72", - "https://github.com/unslothai/llama.cpp/pull/172/commits/5b836b6f1dc494a59e92337ed5e4516324b54bfb", + "https://github.com/unslothai/llama.cpp/pull/177/commits/6851db7ab130637d92eec86da67cb2e36072ab16", + "https://github.com/unslothai/llama.cpp/pull/172/commits/2cd60b78527071ce2b563a42fc01f5ddff730a38", "https://github.com/unslothai/llama.cpp/pull/70/commits/883f2c9ba78f3847148454adf025da29385fff3e", "https://github.com/unslothai/llama.cpp/pull/171/commits/95e08993a63e64365a5eec4741fa1262c3770f98", "https://github.com/unslothai/llama.cpp/pull/95/commits/3db8cb5b2e9bf291057b9f19960e8601a162da81", @@ -29,6 +29,7 @@ "https://github.com/unslothai/llama.cpp/pull/157/commits/6c6da89266ba7839d825c9997782af4f4d26b81b", "https://github.com/unslothai/llama.cpp/pull/149/commits/b65a2dce12c14a489e19a059cb6ee59112f1b733", "https://github.com/unslothai/llama.cpp/pull/144/commits/5a08a717da20caa6c5c4dfaa85024adf6fc4e7fa", - "https://github.com/unslothai/llama.cpp/pull/152/commits/258345efa640eb099eb1af3c9ee8f8e6e8e7b0d3" + "https://github.com/unslothai/llama.cpp/pull/152/commits/258345efa640eb099eb1af3c9ee8f8e6e8e7b0d3", + "https://github.com/unslothai/llama.cpp/pull/176/commits/7ad75127117d1804fbf29adbe381131f1e2d63cd" ] } From 706f564d0a2a7195e7fbc6717bc0f3e002ab73a0 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Thu, 3 Sep 2026 23:47:09 +0000 Subject: [PATCH 07/12] Repin five carries onto b10786 The base tag moved from b10775 to b10786 while this was open, and five pins needed work to survive it. Four of the five merge without a single conflict and produce a tree that does not compile, which is the failure mode the compile gate in #175 exists for; three of those four are the same upstream change. - #172 inkling, #173 glm5next, #177 diffusion-gemma: n_ff_exp became a per-layer array behind an accessor. Reading the old scalar field is a compile error, and inside a create_tensor dimension list the member function quietly decays to a pointer-to-member instead. #172 and #173 also override preprocess(), which the mtmd base classes made const. - #152 per-run buffers: b10786 added a load-ordering pass that reads a llama_buf_map entry as one buffer, and this pin made an entry a run of buffers. - #144 qwen4exp MTP: the only one that conflicts, in both places it touches, over the same n_ff_exp change. Verified on b10786: all 13 pins merge (11 clean, 2 additive), the CPU llama target builds, and the CUDA build plus the feature matrix are in the PR comment. --- scripts/unsloth/pr-set.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/unsloth/pr-set.json b/scripts/unsloth/pr-set.json index 0d35a6659d5..15fa05d5db5 100644 --- a/scripts/unsloth/pr-set.json +++ b/scripts/unsloth/pr-set.json @@ -18,18 +18,18 @@ "tag + pins), so keep its pin listed until the change lands upstream." ], "prs": [ - "https://github.com/unslothai/llama.cpp/pull/177/commits/6851db7ab130637d92eec86da67cb2e36072ab16", - "https://github.com/unslothai/llama.cpp/pull/172/commits/2cd60b78527071ce2b563a42fc01f5ddff730a38", + "https://github.com/unslothai/llama.cpp/pull/177/commits/ea0cdfd764f6ba8b2493902d29ce5e4a969e1641", + "https://github.com/unslothai/llama.cpp/pull/172/commits/f639c770a08d4b880555f60a1780aaacfdd1471e", "https://github.com/unslothai/llama.cpp/pull/70/commits/883f2c9ba78f3847148454adf025da29385fff3e", "https://github.com/unslothai/llama.cpp/pull/171/commits/95e08993a63e64365a5eec4741fa1262c3770f98", "https://github.com/unslothai/llama.cpp/pull/95/commits/3db8cb5b2e9bf291057b9f19960e8601a162da81", - "https://github.com/unslothai/llama.cpp/pull/173/commits/aed95865bbb38a4edf7e4a4f065c34a088396457", + "https://github.com/unslothai/llama.cpp/pull/173/commits/a4c3a3b9eca30c2b4a4be29a5acd8c0700f7f680", "https://github.com/unslothai/llama.cpp/pull/137/commits/4e1865e34ec5f6ca39403215c89129c13731be70", "https://github.com/unslothai/llama.cpp/pull/158/commits/abfc45b9cb21eae4848cb82196e659f42c9a8341", "https://github.com/unslothai/llama.cpp/pull/157/commits/6c6da89266ba7839d825c9997782af4f4d26b81b", "https://github.com/unslothai/llama.cpp/pull/149/commits/b65a2dce12c14a489e19a059cb6ee59112f1b733", - "https://github.com/unslothai/llama.cpp/pull/144/commits/5a08a717da20caa6c5c4dfaa85024adf6fc4e7fa", - "https://github.com/unslothai/llama.cpp/pull/152/commits/258345efa640eb099eb1af3c9ee8f8e6e8e7b0d3", + "https://github.com/unslothai/llama.cpp/pull/144/commits/a9e9c3c5fed8a0bb5cc617532d0d16b8f59c13e0", + "https://github.com/unslothai/llama.cpp/pull/152/commits/b2b5ed9ff86427a530b762a45d3fdbd453bcd4e8", "https://github.com/unslothai/llama.cpp/pull/176/commits/7ad75127117d1804fbf29adbe381131f1e2d63cd" ] } From 50e18cf79e0527f9b4ef758d4b1377e783522c59 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Fri, 4 Sep 2026 00:42:20 +0000 Subject: [PATCH 08/12] Repin #177: diffusion-gemma now runs in test-llama-archs The exclusion blamed the arch's graph input for a null self_kq_mask buffer. It was the fixture: a scalar sliding-window pattern makes every layer sliding, so the plain mask is built and used by nothing and never gets allocated. With a per-layer pattern the arch decodes and matches CPU on all three devices. --- scripts/unsloth/pr-set.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/unsloth/pr-set.json b/scripts/unsloth/pr-set.json index 15fa05d5db5..f116c960067 100644 --- a/scripts/unsloth/pr-set.json +++ b/scripts/unsloth/pr-set.json @@ -18,7 +18,7 @@ "tag + pins), so keep its pin listed until the change lands upstream." ], "prs": [ - "https://github.com/unslothai/llama.cpp/pull/177/commits/ea0cdfd764f6ba8b2493902d29ce5e4a969e1641", + "https://github.com/unslothai/llama.cpp/pull/177/commits/4137a7d3669c3fe94431b68e2e04b8804e620760", "https://github.com/unslothai/llama.cpp/pull/172/commits/f639c770a08d4b880555f60a1780aaacfdd1471e", "https://github.com/unslothai/llama.cpp/pull/70/commits/883f2c9ba78f3847148454adf025da29385fff3e", "https://github.com/unslothai/llama.cpp/pull/171/commits/95e08993a63e64365a5eec4741fa1262c3770f98", From 651962e358a71156e53b6462a5019ab6c7cc8cd5 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Fri, 4 Sep 2026 10:19:40 +0000 Subject: [PATCH 09/12] unsloth: pin the upstream PRs directly now that they carry the fixes --- scripts/unsloth/pr-set.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/unsloth/pr-set.json b/scripts/unsloth/pr-set.json index f116c960067..22306c8b9ab 100644 --- a/scripts/unsloth/pr-set.json +++ b/scripts/unsloth/pr-set.json @@ -18,12 +18,12 @@ "tag + pins), so keep its pin listed until the change lands upstream." ], "prs": [ - "https://github.com/unslothai/llama.cpp/pull/177/commits/4137a7d3669c3fe94431b68e2e04b8804e620760", - "https://github.com/unslothai/llama.cpp/pull/172/commits/f639c770a08d4b880555f60a1780aaacfdd1471e", + "https://github.com/ggml-org/llama.cpp/pull/24423/commits/c6f8d604b67611b73f7965c0bd39d26e7365a489", + "https://github.com/ggml-org/llama.cpp/pull/25731/commits/36df1bf409c8b257689321a971a66973ee817ee1", "https://github.com/unslothai/llama.cpp/pull/70/commits/883f2c9ba78f3847148454adf025da29385fff3e", "https://github.com/unslothai/llama.cpp/pull/171/commits/95e08993a63e64365a5eec4741fa1262c3770f98", "https://github.com/unslothai/llama.cpp/pull/95/commits/3db8cb5b2e9bf291057b9f19960e8601a162da81", - "https://github.com/unslothai/llama.cpp/pull/173/commits/a4c3a3b9eca30c2b4a4be29a5acd8c0700f7f680", + "https://github.com/ggml-org/llama.cpp/pull/27754/commits/629b50552801912b3e2078f9799e4d77213197d7", "https://github.com/unslothai/llama.cpp/pull/137/commits/4e1865e34ec5f6ca39403215c89129c13731be70", "https://github.com/unslothai/llama.cpp/pull/158/commits/abfc45b9cb21eae4848cb82196e659f42c9a8341", "https://github.com/unslothai/llama.cpp/pull/157/commits/6c6da89266ba7839d825c9997782af4f4d26b81b", From 66d618bd8a65e5eb27fa4e8df64f9975f03acad1 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Fri, 4 Sep 2026 10:46:02 +0000 Subject: [PATCH 10/12] unsloth: repin #171 onto b10796 --- scripts/unsloth/pr-set.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/unsloth/pr-set.json b/scripts/unsloth/pr-set.json index 22306c8b9ab..248094236b6 100644 --- a/scripts/unsloth/pr-set.json +++ b/scripts/unsloth/pr-set.json @@ -21,7 +21,7 @@ "https://github.com/ggml-org/llama.cpp/pull/24423/commits/c6f8d604b67611b73f7965c0bd39d26e7365a489", "https://github.com/ggml-org/llama.cpp/pull/25731/commits/36df1bf409c8b257689321a971a66973ee817ee1", "https://github.com/unslothai/llama.cpp/pull/70/commits/883f2c9ba78f3847148454adf025da29385fff3e", - "https://github.com/unslothai/llama.cpp/pull/171/commits/95e08993a63e64365a5eec4741fa1262c3770f98", + "https://github.com/unslothai/llama.cpp/pull/171/commits/46cbf0e95786fe8f5b7c0e86d57aaf8f8eceea7f", "https://github.com/unslothai/llama.cpp/pull/95/commits/3db8cb5b2e9bf291057b9f19960e8601a162da81", "https://github.com/ggml-org/llama.cpp/pull/27754/commits/629b50552801912b3e2078f9799e4d77213197d7", "https://github.com/unslothai/llama.cpp/pull/137/commits/4e1865e34ec5f6ca39403215c89129c13731be70", From 32414cc90af3ce49bd5cacbff0d423aec0340d02 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Fri, 4 Sep 2026 11:18:52 +0000 Subject: [PATCH 11/12] unsloth: pin the IQ1 grids from #61 now that it sits on the base tag --- scripts/unsloth/pr-set.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/unsloth/pr-set.json b/scripts/unsloth/pr-set.json index 248094236b6..cf764e20a5c 100644 --- a/scripts/unsloth/pr-set.json +++ b/scripts/unsloth/pr-set.json @@ -21,7 +21,7 @@ "https://github.com/ggml-org/llama.cpp/pull/24423/commits/c6f8d604b67611b73f7965c0bd39d26e7365a489", "https://github.com/ggml-org/llama.cpp/pull/25731/commits/36df1bf409c8b257689321a971a66973ee817ee1", "https://github.com/unslothai/llama.cpp/pull/70/commits/883f2c9ba78f3847148454adf025da29385fff3e", - "https://github.com/unslothai/llama.cpp/pull/171/commits/46cbf0e95786fe8f5b7c0e86d57aaf8f8eceea7f", + "https://github.com/unslothai/llama.cpp/pull/61/commits/46cbf0e95786fe8f5b7c0e86d57aaf8f8eceea7f", "https://github.com/unslothai/llama.cpp/pull/95/commits/3db8cb5b2e9bf291057b9f19960e8601a162da81", "https://github.com/ggml-org/llama.cpp/pull/27754/commits/629b50552801912b3e2078f9799e4d77213197d7", "https://github.com/unslothai/llama.cpp/pull/137/commits/4e1865e34ec5f6ca39403215c89129c13731be70", From 9900606b1114e36202966dc0d92ea37930738521 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Fri, 4 Sep 2026 11:40:54 +0000 Subject: [PATCH 12/12] unsloth: repin #176 onto b10796 --- scripts/unsloth/pr-set.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/unsloth/pr-set.json b/scripts/unsloth/pr-set.json index cf764e20a5c..bdca9a2dd56 100644 --- a/scripts/unsloth/pr-set.json +++ b/scripts/unsloth/pr-set.json @@ -30,6 +30,6 @@ "https://github.com/unslothai/llama.cpp/pull/149/commits/b65a2dce12c14a489e19a059cb6ee59112f1b733", "https://github.com/unslothai/llama.cpp/pull/144/commits/a9e9c3c5fed8a0bb5cc617532d0d16b8f59c13e0", "https://github.com/unslothai/llama.cpp/pull/152/commits/b2b5ed9ff86427a530b762a45d3fdbd453bcd4e8", - "https://github.com/unslothai/llama.cpp/pull/176/commits/7ad75127117d1804fbf29adbe381131f1e2d63cd" + "https://github.com/unslothai/llama.cpp/pull/176/commits/09ce1a4d2939844e211f7b4d30a296f4c1aed9a8" ] }