[PR #514] [CLOSED] DeepSeek helper GPU: serve an uneven tensor-parallel group's layers too (MAYA_DS4_HELPER with MAYA_DS4_TP_GGUF_UNEVEN) #570

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

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/514
Author: @pepuscz
Created: 10/26/2026
Status: ❌ Closed

Base: main ← Head: pr/ds4-up-c2-helper-groups


📝 Commits (10+)

  • 8c8e72f ds4: DS4_HELPER on a group - a member other than 0 holding any helper or recent-slot field refuses the load
  • a5067f3 docs: the helper on a tensor-parallel group's layers - MAYA_DS4_HELPER with MAYA_DS4_TP_GGUF_UNEVEN
  • 001d578 ds4: DS4_HC_FUSE - a decoded token's hc_split and hc_pre_norm in one launch, the attention input rounded there
  • fddc0f2 ds4: DS4_ROUTE_FUSE - a decoded token's router stage on the lead in two launches instead of four
  • 8e9e97b ds4: DS4_ROUTE_FUSE - nothing published after a launch that did not go in; one eligibility check before any enqueue
  • 4182dd3 ds4: DS4_AR2_DECODE - the decode windows' all-reduces in ar2_kernel's exact mode
  • 94e6547 docs: a group of two's all-reduces in one pipelined launch - MAYA_DS4_AR2 and MAYA_DS4_AR2_DECODE
  • 856e033 ds4: DS4_HELPER on DS4_TP_GGUF_UNEVEN's groups - the helper takes a group's CPU-lane picks, on its lead (stage 2, draft)
  • 4b335ff ds4: DS4_HC_FUSE=2 - the HC split + norm fuse for a decode window's rows too (parked, not built)
  • aced0d1 ds4: DS4_HC_FUSE=2 - the FFN's split rounds its input too, for the shared expert's w1 / w3

📊 Changes

7 files changed (+2084 additions, -59 deletions)

View changed files

📝 docs/SETTINGS.md (+46 -1)
📝 src/ds4/ds4_gguf.cu (+18 -2)
📝 src/ds4/ds4_gguf.cuh (+14 -0)
📝 src/ds4/ds4_kernels.cu (+434 -0)
📝 src/ds4/ds4_kernels.cuh (+76 -0)
📝 src/ds4/ds4_model.cu (+1375 -55)
📝 tests/ds4_gguf_test.cu (+121 -1)

📄 Description

Part of #510 (PR C2 of 9: A, B, C, C2, D, E, F, G, H). Stacked on #513: until that merges, this PR also shows its commits; this PR's own are the last ones listed. Glad to rebase as main moves.

What. The helper GPU (#415) takes a layer's CPU-lane picks only on layers of one GPU (nm == 1). With MAYA_DS4_TP_GGUF_UNEVEN (#408) every trunk layer is a group's, so on a --tp 2 box the helper holds nothing.

Change. helper_layer(l) replaces the nm == 1 filter: a GGUF trunk layer of one GPU, or, with MAYA_DS4_TP_GGUF_UNEVEN, of a tensor-parallel group. A group's helper state (its pool's experts, the table) is member 0's: the Layer the routing is published from and the service thread answers. Its whole-expert sums join the lead's CPU part, added once before the MoE all-reduce. A member other than 0 holding any helper state refuses the load. The decode path needed no change. MAYA_DS4_HELPER_CHECK now checks one group layer apart from one-GPU layers.

Behaviour change. No new setting. Without MAYA_DS4_TP_GGUF_UNEVEN nothing changes, byte for byte. A user who already sets both MAYA_DS4_HELPER and MAYA_DS4_TP_GGUF_UNEVEN gets a helper that now holds and computes the group's experts, where today it holds none. The results are within the helper's own rounding, as for one-GPU layers.

Tested on one box, 2x RX 7900 XTX (gfx1100) + Radeon 8060S (gfx1151), HIP: this PR's head builds on its own (each PR of the series was built in order), and the full series passed its load checks and --bench (numbers in #510). Not built or run on CUDA.

🤖 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/514 **Author:** [@pepuscz](https://github.com/pepuscz) **Created:** 10/26/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr/ds4-up-c2-helper-groups` --- ### 📝 Commits (10+) - [`8c8e72f`](https://github.com/mw00/project-maya/commit/8c8e72f8efe8409a0992cb4048a356408e8d3728) ds4: DS4_HELPER on a group - a member other than 0 holding any helper or recent-slot field refuses the load - [`a5067f3`](https://github.com/mw00/project-maya/commit/a5067f3dd865320768c5286144c452da0ded7b5a) docs: the helper on a tensor-parallel group's layers - MAYA_DS4_HELPER with MAYA_DS4_TP_GGUF_UNEVEN - [`001d578`](https://github.com/mw00/project-maya/commit/001d5788f3522fc3004501924b9d525c30cc3b71) ds4: DS4_HC_FUSE - a decoded token's hc_split and hc_pre_norm in one launch, the attention input rounded there - [`fddc0f2`](https://github.com/mw00/project-maya/commit/fddc0f2d09cf35307e77ad96270a3d28377771c3) ds4: DS4_ROUTE_FUSE - a decoded token's router stage on the lead in two launches instead of four - [`8e9e97b`](https://github.com/mw00/project-maya/commit/8e9e97bb15180a14d759c1bdf06054c30a7c3739) ds4: DS4_ROUTE_FUSE - nothing published after a launch that did not go in; one eligibility check before any enqueue - [`4182dd3`](https://github.com/mw00/project-maya/commit/4182dd3deea1882b26a0bb0f1e6ceda9dba61455) ds4: DS4_AR2_DECODE - the decode windows' all-reduces in ar2_kernel's exact mode - [`94e6547`](https://github.com/mw00/project-maya/commit/94e65479944b392a769c800d73ff34044bda33b3) docs: a group of two's all-reduces in one pipelined launch - MAYA_DS4_AR2 and MAYA_DS4_AR2_DECODE - [`856e033`](https://github.com/mw00/project-maya/commit/856e03359b4eed9a6f9c354832afbb6c79b5814c) ds4: DS4_HELPER on DS4_TP_GGUF_UNEVEN's groups - the helper takes a group's CPU-lane picks, on its lead (stage 2, draft) - [`4b335ff`](https://github.com/mw00/project-maya/commit/4b335ff17822727dd49af950ed243b2202f280b8) ds4: DS4_HC_FUSE=2 - the HC split + norm fuse for a decode window's rows too (parked, not built) - [`aced0d1`](https://github.com/mw00/project-maya/commit/aced0d160799bfae3445968ac098a849936d894a) ds4: DS4_HC_FUSE=2 - the FFN's split rounds its input too, for the shared expert's w1 / w3 ### 📊 Changes **7 files changed** (+2084 additions, -59 deletions) <details> <summary>View changed files</summary> 📝 `docs/SETTINGS.md` (+46 -1) 📝 `src/ds4/ds4_gguf.cu` (+18 -2) 📝 `src/ds4/ds4_gguf.cuh` (+14 -0) 📝 `src/ds4/ds4_kernels.cu` (+434 -0) 📝 `src/ds4/ds4_kernels.cuh` (+76 -0) 📝 `src/ds4/ds4_model.cu` (+1375 -55) 📝 `tests/ds4_gguf_test.cu` (+121 -1) </details> ### 📄 Description Part of #510 (PR C2 of 9: A, B, C, C2, D, E, F, G, H). **Stacked on #513**: until that merges, this PR also shows its commits; this PR's own are the last ones listed. Glad to rebase as `main` moves. **What.** The helper GPU (#415) takes a layer's CPU-lane picks only on layers of one GPU (`nm == 1`). With `MAYA_DS4_TP_GGUF_UNEVEN` (#408) every trunk layer is a group's, so on a `--tp 2` box the helper holds nothing. **Change.** `helper_layer(l)` replaces the `nm == 1` filter: a GGUF trunk layer of one GPU, or, with `MAYA_DS4_TP_GGUF_UNEVEN`, of a tensor-parallel group. A group's helper state (its pool's experts, the table) is member 0's: the Layer the routing is published from and the service thread answers. Its whole-expert sums join the lead's CPU part, added once before the MoE all-reduce. A member other than 0 holding any helper state refuses the load. The decode path needed no change. `MAYA_DS4_HELPER_CHECK` now checks one group layer apart from one-GPU layers. **Behaviour change.** No new setting. Without `MAYA_DS4_TP_GGUF_UNEVEN` nothing changes, byte for byte. A user who already sets both `MAYA_DS4_HELPER` and `MAYA_DS4_TP_GGUF_UNEVEN` gets a helper that now holds and computes the group's experts, where today it holds none. The results are within the helper's own rounding, as for one-GPU layers. **Tested** on one box, 2x RX 7900 XTX (gfx1100) + Radeon 8060S (gfx1151), HIP: this PR's head builds on its own (each PR of the series was built in order), and the full series passed its load checks and `--bench` (numbers in #510). Not built or run on CUDA. 🤖 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:26:59 +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#570
No description provided.