[PR #620] [CLOSED] ds4 GGUF: refuse at load a layer whose experts the CPU lane cannot compute (it answered zeros); abort if one gets there #628

Closed
opened 2026-10-29 21:27:39 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/620
Author: @SeriousRising
Created: 10/28/2026
Status: ❌ Closed

Base: main ← Head: ds4-cpu-lane-format-refusal


📝 Commits (1)

  • b05f897 ds4 GGUF: refuse at load a layer whose experts the CPU lane cannot compute (it answered zeros); abort if one gets there

📊 Changes

1 file changed (+33 additions, -8 deletions)

View changed files

📝 src/ds4/ds4_model.cu (+33 -8)

📄 Description

Fixes #617.

What. src/ds4/ds4_model.cu, one file:

  • lane_fmt_ok(l, why): the checks cpu_experts_iq / cpu_experts_both make before computing (the low-bit role's gg::iq_cpu_fmt, the activation row sizes, and for a layer with one MXFP4 role mx_act_bytes). expert_layout_mx calls it for every GGUF layer that is not all-MXFP4 and fails the load: <layer>: the CPU lane cannot compute experts of types <gate> / <down>: <reason>.
  • The two runtime branches that answered zeros (once-per-process stderr line, memset 0) now print the layer and the reason and abort(). The load check makes them unreachable; they stay as a backstop.

Behaviour change: a build without ggml-cpu (-DSTRATA_NATIVE_EXPERTS=OFF) now refuses a low-bit pack at load, also one whose experts would all fit in VRAM. maya.py never makes such a build (it always passes -DSTRATA_NATIVE_EXPERTS=ON), so installs are not affected. Why at load rather than after placement: see #617 (placement moves at run time).

Output: unchanged for every pack that loads. 2x CMP 170HX 64 GB (sm_80, CUDA 12.8; PCIe Gen2 x16 + Gen2 x4), DeepSeek-V4.1-Flash-1017 GSQ-RCO IQ2_XXS (routed experts IQ1_M / IQ2_XXS / IQ2_XS, 2218 on the CPU lane), --tp 1 --gpus 0,1 --dspark on --cpu-threads 14 --suffix-draft 0:

  • the pack (trunk and DSpark drafter layers) loads with no refusal; 2000 fixed prompt ids + 256 greedy tokens give the same ids and DSpark counts as v1.1.35;
  • ds4_gguf_test: ALL OK;
  • the refusal: a build of this branch with -DSTRATA_NATIVE_EXPERTS=OFF on the same pack stops at load with maya-ds4: layers.0.ffn.experts.: the CPU lane cannot compute experts of types IQ1_M / IQ1_M: this build has no ggml-cpu (STRATA_NATIVE_EXPERTS=OFF): the low-bit experts' CPU lane is not in it (exit 1), where v1.1.35 loads and answers zeros for those experts.

No speed change (a load-time check). Not tested: the runtime abort() backstop (no path reaches it).

Checks (as .github/workflows/tests.yml): tools/check_hip_compat.py OK; server tests 463 OK (12 skipped); installer and tools tests 584 OK (31 skipped) - the same counts as v1.1.35.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mw00/project-maya/pull/620 **Author:** [@SeriousRising](https://github.com/SeriousRising) **Created:** 10/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `ds4-cpu-lane-format-refusal` --- ### 📝 Commits (1) - [`b05f897`](https://github.com/mw00/project-maya/commit/b05f8971c83619aeaba3a824c4cc91d5d926e2c2) ds4 GGUF: refuse at load a layer whose experts the CPU lane cannot compute (it answered zeros); abort if one gets there ### 📊 Changes **1 file changed** (+33 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/ds4/ds4_model.cu` (+33 -8) </details> ### 📄 Description Fixes #617. **What.** `src/ds4/ds4_model.cu`, one file: - `lane_fmt_ok(l, why)`: the checks `cpu_experts_iq` / `cpu_experts_both` make before computing (the low-bit role's `gg::iq_cpu_fmt`, the activation row sizes, and for a layer with one MXFP4 role `mx_act_bytes`). `expert_layout_mx` calls it for every GGUF layer that is not all-MXFP4 and fails the load: `<layer>: the CPU lane cannot compute experts of types <gate> / <down>: <reason>`. - The two runtime branches that answered zeros (once-per-process stderr line, `memset` 0) now print the layer and the reason and `abort()`. The load check makes them unreachable; they stay as a backstop. **Behaviour change:** a build without ggml-cpu (`-DSTRATA_NATIVE_EXPERTS=OFF`) now refuses a low-bit pack at load, also one whose experts would all fit in VRAM. `maya.py` never makes such a build (it always passes `-DSTRATA_NATIVE_EXPERTS=ON`), so installs are not affected. Why at load rather than after placement: see #617 (placement moves at run time). **Output: unchanged** for every pack that loads. 2x CMP 170HX 64 GB (sm_80, CUDA 12.8; PCIe Gen2 x16 + Gen2 x4), DeepSeek-V4.1-Flash-1017 GSQ-RCO IQ2_XXS (routed experts IQ1_M / IQ2_XXS / IQ2_XS, 2218 on the CPU lane), `--tp 1 --gpus 0,1 --dspark on --cpu-threads 14 --suffix-draft 0`: - the pack (trunk and DSpark drafter layers) loads with no refusal; 2000 fixed prompt ids + 256 greedy tokens give the same ids and DSpark counts as v1.1.35; - `ds4_gguf_test`: ALL OK; - the refusal: a build of this branch with `-DSTRATA_NATIVE_EXPERTS=OFF` on the same pack stops at load with `maya-ds4: layers.0.ffn.experts.: the CPU lane cannot compute experts of types IQ1_M / IQ1_M: this build has no ggml-cpu (STRATA_NATIVE_EXPERTS=OFF): the low-bit experts' CPU lane is not in it` (exit 1), where v1.1.35 loads and answers zeros for those experts. No speed change (a load-time check). **Not tested:** the runtime `abort()` backstop (no path reaches it). **Checks** (as `.github/workflows/tests.yml`): `tools/check_hip_compat.py` OK; server tests 463 OK (12 skipped); installer and tools tests 584 OK (31 skipped) - the same counts as v1.1.35. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:27:39 +07:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mw00/project-maya#628
No description provided.