gate(ROCM): M4 for Qwen3.5-0.8B GDN -- the oracle-backed near-tie gate as the RED anchor of the forward-divergence fix - #559
Conversation
…lden lane in the Qwen3-0.6B near-tie gate Issue mudler#41 M4 milestone. The oracle is upstream vLLM AT THE PIN (555967922, runtime 0.23.1rc1.dev1511+g555967922 -- verified == the parity-pin block) built from source as a ROCm wheel for gfx1100 in rocm/vllm-dev:base and committed as the image vllm-rocm-oracle:555967922-gfx1100 (recipe: .agents/specs/rocm-m4-oracle.md). Gate result on this box (4x RX 7900 XTX, ROCm 7.14, enforce_eager, batch=1, flock ~/gpu.lock): oracle K=10 per-prompt greedy deterministic in every cell; our ROCm engine 16/16 prompts PASS -- 11/16 strict token-exact vs base greedy, 5/16 near-tie band, max teacher-forced gap 0.125 nats, 0 forward-divergent, 125/125 assertions, backend proof all 8 Qwen3-dense ops selections>0 and declines==0 on device 5. The p0 France/Italy flip is a literal 0.0000-nat tie in the oracle's own logits (the Metal M3b signature, reproduced on ROCm). Change shape: the parity gate's Metal/Tenstorrent device-golden lane gains the kROCM arm (identical anchor+band logic, ROCm's own oracle-backed golden pair); dgx base goldens byte-untouched; the *_rocm goldens are additive. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: pi:kimi-k3 [pi]
…e, committed as the RED anchor of the forward-divergence fix Issue mudler#41 M4, second model. The GDN sibling of the Qwen3-dense gate: test_qwen35_paged_engine drives the standard 16-prompt battery through the full paged engine and holds our ROCm tokens against the pinned vLLM-ROCm oracle (555967922 / 0.23.1rc1.dev1511+g555967922, same container as the 0.6B lane) via the anchor + <=0.5-nat near-tie band, with the GDN backend proof (all 15 dispatched ops selections>0 and declines==0). VERDICT AT LANDING: RED BY DESIGN -- the gate FAILS 13/16 prompts (0/16 strict, 3/16 near-tie band, max teacher-forced gap 14.125 nats; first-token divergences on 6 prompts). This is the known 0.8B CPU/ROCm divergence, now oracle-measured: a REAL forward divergence, not a distributional near-tie. The oracle K=10 capture is deterministic in every cell. Backend proof is GREEN (kPagedAttention 1,536 / kGdnDecode 4,320 selections, 0 declines) -- the divergence is numerical, not dispatch. This commit is the RED test of the fix lifecycle: the gate goes GREEN when the 0.8B forward lands. Goldens carry a manifest.json (oracle identity + the real HF revision 2fc06364...); the gate resolves the checkpoint through parity::HfSnapshot at that pinned revision (check-snapshot-pins clean). hf_snapshot.h gains the kQwen35_08BRevision pin + resolver, and a forward declaration fixing the call-before-declaration order hipcc rejects (mudler#555 carries the canonical main-side fix). FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: pi:kimi-k3 [pi]
…RED anchor at landing, 13/16 forward-divergent, max gap 14.125 nats) FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: pi:kimi-k3 [pi]
6f6ee84 to
5efcebc
Compare
|
Reviewed as part of a sweep over the open external PRs. The measurement behind this is real — I recomputed the verdict independently from the committed goldens and got exactly your numbers: 13/16 fail, 3 pass, max gap 14125 mnats at (prompt 8, tok 8), 6 prompts differing at token 0. Golden provenance also checks out: Three things before this can land. 1. It would turn
The guard is behaving correctly: the existing 2. The gate does not fail safe by device.
Related, and cheap: the checkpoint-absent path at 3. The RED anchor does not have teeth against the defect it names. The pass/fail decision is The shape that works is to land the gate with GREEN goldens alongside #570, keeping the RED capture as recorded evidence in the spec and the parity ledger, where it already lives in full. One more worth fixing while you are here: the anchor-drift message ends "— re-run qwen3-neartie-gap.py to refresh the gap golden". After #570, that Numbers to correct in the prose: the six token-0 divergences are 0.375/0.750/0.750/0.938/1.000/1.062 nats, so the max is 1.062 not 1.188, and only 5 of the 6 are over the 0.5-nat band. And On CI: No AMD hardware here, so nothing was executed on ROCm; findings 1–3 are static, and the verdict arithmetic above came from your committed files. |
M4 for Qwen3.5-0.8B (GDN) — the oracle-backed gate, committed as the RED anchor (issue #41)
Stacked on #549 (the 0.6B lane + oracle spec). This PR adds the second M4 gate:
test_qwen35_paged_engine.cpp— the GDN sibling of the Qwen3-dense SACRED gate — plus its goldens, captured from the same pinned vLLM-ROCm oracle.Verdict at landing: RED BY DESIGN — the gate tells the truth about the known 0.8B divergence
This is the
Qwen3.5-0.8B CPU/ROCm divergence remains openitem from STATUS.md, now oracle-quantified. The earlier characterization localized the drift to the attention block (bf16-softmax amplification); this gate is the committed RED test that turns GREEN when the forward fix lands.Change shape
tests/parity/test_qwen35_paged_engine.cpp(checkpoint-gated viaparity::HfSnapshotat the pinned HF revision2fc06364...; check-snapshot-pins clean)tests/parity/goldens/qwen35_greedy_0_8b/(greedy + dist + our_ids + gaps + manifest.json recording the oracle identity)tests/parity/hf_snapshot.h: thekQwen35_08BRevisionpin + resolver, and a forward declaration fixing the call-before-declaration order hipcc rejects (the bug fix(build): main is RED — hf_snapshot.h calls HfSnapshot before it is declared (#551, #546) #555 fixes canonically on main; the forward decl is harmless either way)tests/CMakeLists.txtregistrationThe 0.6B gate from #549 re-verified GREEN in this tree (16/16).
UPDATE 2026-08-12: the divergence this gate pinned is root-caused and fixed in #570 (
AttnQkNormRopeGateROCm dispatch keyed on source-dtype instead of output-dtype — bf16 src + f32 out mis-launched all-bf16). With the fix stacked, this gate is GREEN: 16/16 (15/16 strict, max gap 0.125 nats). The goldens in this PR are the pre-fix RED capture; #570 re-derives them from the fixed engine and re-teacher-forces the oracle.