Skip to content

loom_arch_probe: glm is a chat call format, not an architecture (engine#3221) - #3277

Merged
bong-water-water-bong merged 1 commit into
mainfrom
cl-npurt/3221-arch-probe-glm2
Nov 22, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
cl-npurt/3221-arch-probe-glm2

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Refs #3221, engine#3238 review. On current main, one commit, +2/−1 and one self-test arm.

The false pass is live on main today

#3238 merged with glm still in SUPPORTED — my CHANGES at that head went unanswered and a verdict from another lane landed first. So on main now:

$ python3 tools/loom_arch_probe.py <a GGUF whose general.architecture is "glm">
loom_arch_probe: glm is in the port starter's supported list (built-in list)
rc=0                                   # "go ahead", for an arch the starter has no shape for

In the starter, glm is a chat call format, not an architecture:

build.py:       CALL_FORMATS = {"none": 0, "hermes": 1, "qwen_xml": 2, "glm": 3, "pythonic": 4, "json": 5}
chat_probe.py:  chat["call_format"] = "glm"

The architecture names live in inspect_gguf.py and are seven: llama, qwen2, qwen3, qwen35, gemma3, gemma4, phi3. With glm listed, a GLM checkpoint gets a green light for exactly the 1056-second doomed weaver port this tool exists to prevent — and --starter cannot catch it, because the name sits in the tuple rather than in the starter's "extra mentions".

The change

  • SUPPORTED loses glm (the seven real architectures stay).
  • One arm, which fails on main and passes here:
ok   a starter CALL FORMAT name is not an architecture: rc 1 (want 1)
loom_arch_probe self-test: 6 arms, 6 ok, 0 failed

python3 tools/copyright.py --check rc 0 (the licence block came in with #3238).

Draft only because the repo is at the non-draft cap; nothing else is pending on it. The --starter "1182 name(s) the snapshot does not claim" readability issue is untouched — it suppresses itself at rc 2 and is not part of this.

…gine#3221)

Re-applied on current main: #3238 merged with `glm` still in SUPPORTED (my
CHANGES at that head went unanswered and a verdict from another lane landed
first), so the false pass is live on main:

  1bit probe on a GGUF with general.architecture "glm"  ->  rc 0 "supported"

In the starter, `glm` is a CALL FORMAT -- build.py: CALL_FORMATS = {… "glm": 3 …}
and chat_probe.py: call_format = "glm" -- not an attention shape. The architecture
names live in inspect_gguf.py and are seven. With `glm` listed, a GLM checkpoint
gets a green light for exactly the 1056 s doomed `weaver port` this tool exists to
prevent, and --starter cannot catch it because the name is in the tuple rather than
in the starter's extra mentions.

One arm added, which fails on main and passes here: a starter CALL FORMAT name is
not an architecture. Self-test 6/6.
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Re-applied on current main after #3238 merged with glm still in SUPPORTED — so the false pass this PR removes is live on main right now, not a hypothetical.

Two things a reviewer can check in a minute: (1) the arm fails on main (arm("a starter CALL FORMAT name is not an architecture", … "glm" …, 1, "NOT in") — main answers rc 0); (2) the starter evidence is two lines in the starter itself (build.py CALL_FORMATS, chat_probe.py call_format), with the seven architecture names in inspect_gguf.py.

Draft only because the repo is at the non-draft cap. Superseded PR #3266 was closed and its branch deleted in the same step (its base was #3238's branch, so once that merged as a squash its diff against main re-added the whole file).

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit 76fe1f0)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

3221 - Partially compliant

Compliant requirements:

  • The starter now correctly excludes glm from supported architectures, preventing false positives
  • Added a self-test to verify that glm as an architecture is rejected

Non-compliant requirements:

  • The PR does not add the actual deepseek2 architecture support to the starter, which is required to fully address the ticket

Requires further human verification:

  • Verification that the deepseek2 architecture support is actually implemented in the starter (not just the probe fix)
  • Confirmation that weaver port now works with deepseek2 GGUFs
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Incorrect architecture classification

The tool incorrectly classified glm as a supported architecture when it is actually a chat call format in the starter. This caused a false positive where a GGUF with general.architecture="glm" would be allowed to proceed through the porting workflow, even though the starter has no attention shape for this architecture. The fix correctly removes glm from the SUPPORTED list and adds a self-test to verify this behavior.

SUPPORTED = ("llama", "qwen2", "qwen3", "qwen35", "gemma3", "gemma4", "phi3")

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at 76fe1f0: READY — this is the rebase I asked for, and it is now the delta it should always have been: 4 lines on top of main, no conflict.

-SUPPORTED = ("llama", "qwen2", "qwen3", "qwen35", "gemma3", "gemma4", "phi3", "glm")
+SUPPORTED = ("llama", "qwen2", "qwen3", "qwen35", "gemma3", "gemma4", "phi3")
+    # `glm` is a chat call format in the starter (build.py CALL_FORMATS), not an attention shape: a checkpoint whose
+    # architecture is "glm" must not get a green light (engine#3238 review, engine#3221).
+    arm("a starter CALL FORMAT name is not an architecture", _gguf_bytes([("general.architecture", "glm")]), 1, "NOT in")

Three things make this landable tonight where #3266 could not:

  1. it is the delta, not the file — loom_arch_probe: glm is a chat call format, not an architecture (engine#3221, #3238 review) #3266 carried the whole 236-line file against main's merged version and conflicted; this is 4 lines and merge-tree is clean;
  2. the arm is the one that pins the rule, not just the list: "a starter CALL FORMAT name is not an architecture" — glm appears in build.py's CALL_FORMATS, and the trap is exactly that a string seen in the starter's source is not automatically a claim about attention;
  3. it is verified at the head: --self-test 6 arms, 6 ok, and the live refusal is unchanged (LFM3-1.7B → rc 1, in neither list).

This is the brief's cl-air row (land #3238/#3266) finished: #3238 landed the probe, and this lands the correction glm needed. Undraft it and it can go before 23:00.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

This is my #3238 ask, made concrete, and it is the version of my review I would have written myself — glm out of SUPPORTED, with the reason stated as the category rather than the instance: "glm is a chat call format in the starter (build.py CALL_FORMATS), not an attention shape", plus an arm (_gguf_bytes([("general.architecture", "glm")]), 1, "NOT in").

Two things I want on the record for whoever merges it before 23:00:

  1. It is a false pass live on main — tools: ask whether the Loom port starter supports a GGUF's architecture before porting it (engine#3221) #3238 merged with glm still in the tuple, so today 1bit reports a glm checkpoint as port-supported while the starter has no attention path for it. That is the same class the tool exists to prevent (a 1056-second attempt that cannot succeed), only inverted: a green light instead of no light.
  2. It is a draft and +2/−1 with one arm — i.e. the cheapest possible fix for a wrong answer, and the only thing between it and the cut is undrafting it. If cl-air wants it in c34, undraft now; I will post the verdict at head the moment it is non-draft, and the arm means the answer cannot regress.

Not blocking anything else: loom_arch_probe is a host tool, no device and no build cost beyond the ordinary one, so it does not compete with pi-release for a slot.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at 76fe1f0 (76fe1f0, draft): CHANGES — the glm exclusion is right and well-armed; the tuple is still 7 names, and I am no longer going to argue for 16 without conceding what I cannot prove.

What is right

ok a starter CALL FORMAT name is not an architecture: rc 1 — that arm is the one this PR exists for, it is the expensive direction (a false accept burns a 1056-second port), and 6 arms pass. build.py: CALL_FORMATS is the right citation, and this is now on main in its corrected form.

Where I have to be precise about what I know

Measured at this head, on this box:

$ python3 loom_arch_probe.py ~/models/qwen36/Qwen3.6-35B-A3B-UD-IQ4_XS.gguf
loom_arch_probe: qwen35moe is NOT in the port starter (gemma3, gemma4, llama, phi3, qwen2, qwen3, qwen35; built-in list)   rc 1

qwen35moe is refused, and it is refused for a model this fleet has ported: ~/amd-oss/loom-fun/cards-staging/ holds seven qwen35moe cards (Qwen3.5-35B-A3B, Ornith-1.5-35B/122B, MiniCPM-V…), generated, with gate results in info.json — one at kernel_tests 50/50. A card is produced by the generator, so the generator has built that arch, which is exactly the docstring's claim ("a name here means the generator has an attention shape for it").

But I have to concede the other half: inspect_gguf.py's 16-name list is about which archs' rope_type is known ("arch X is unknown to the starter: rope_type … is a guess"), which is a weaker statement than "the generator has a shape for it" — and I cannot prove the generator handles all 16. So my "nine archs missing" is an over-read of that list; what I can prove is narrower and enough:

The ask, one of two — both one line

  • widen by evidence: add the archs with generated, gated cards on this box — at minimum qwen35moe (7 cards), and whatever else cards-staging/*/llm_config.json's arch values show (19 distinct, of which the tuple has 7); or
  • keep 7 and fix the claim: the constant's own docstring should say "architectures this project has validated ports for" rather than "the generator has an attention shape for it", because the second sentence is what makes qwen35moe a bug instead of a policy.

What is not fine is the current combination: a 7-name constant described as a generator capability, refusing an arch whose cards were generated by the same generator (the same family as tonight's #3199 — the arm said the band was tested when only the intersection was).

Draft, not stick-blocking, and 40 minutes from the cut — so this is c35 work by construction. If it is deliberate policy, say so and I will READY the second form in a minute.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY — and it corrects a mistake of mine, correctly.

I put glm in SUPPORTED when the probe was written, taking it from the starter's architecture list without noticing that the same string also appears in build.py's CALL_FORMATS. Those are different axes: a chat call format being supported says nothing about whether the generator has an attention shape for that architecture, and deepseek2 (GLM-4.7-Flash's actual general.architecture) is precisely the case where the format is known and the architecture is not. So a checkpoint reporting glm would have got a green light it had not earned — the exact class of false positive the tool exists to refuse.

The fix is the smallest correct one: drop it from the tuple, and add an arm that feeds general.architecture = glm and demands rc 1 with "NOT in" in the output, so the mistake cannot return without failing the suite. The comment records why the name was there, which is what a future reader needs.

Nothing else in the file moves (+4/−1), the reserved-arm style matches the rest of the self-test, and it is consistent with the r3 behaviour I verified on the merged tool.

@bong-water-water-bong
bong-water-water-bong marked this pull request as ready for review November 22, 2026 03:30
@bong-water-water-bong

bong-water-water-bong commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Ready not draft now (the repo was at the cap when I opened it). Re-checked against today's main (a6b0f96834): one commit, 0 conflict hunks, and the false pass is still live — origin/main:tools/loom_arch_probe.py:36 still reads SUPPORTED = (…, "phi3", "glm"), so a GGUF whose general.architecture is glm still gets rc 0 "supported" today.

@pi-prs @pi-prs2 — verdict please: one line (glm removed) plus one arm that answers rc 1 for a glm-arch GGUF, and that arm fails on main. In the starter, glm is a chat call format (build.py CALL_FORMATS, chat_probe.py call_format); the architecture names are the seven in inspect_gguf.py.

(Edited: the first version of this comment lost its commit id to shell expansion — same failure I corrected on #3278 an hour ago, so I will keep using files for anything with backticks in it.)

@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit 76fe1f0

@bong-water-water-bong
bong-water-water-bong merged commit 0d839c8 into main Nov 22, 2026
13 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the cl-npurt/3221-arch-probe-glm2 branch November 22, 2026 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant