mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #411] [CLOSED] ds4: opt-in tensor parallel with uneven heads for GGUF packs #518
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#518
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mw00/project-maya/pull/411
Author: @NenadSteric
Created: 10/23/2026
Status: ❌ Closed
Base:
main← Head:pr/ds4-tp-uneven-heads📝 Commits (1)
3f5bcd2ds4: opt-in tensor parallel with uneven heads for GGUF packs📊 Changes
2 files changed (+27 additions, -5 deletions)
View changed files
📝
docs/SETTINGS.md(+10 -0)📝
src/ds4/ds4_model.cu(+17 -5)📄 Description
Follow-up to #377, which mentioned this patch under Next.
Problem
A GGUF pack only forms a tensor parallel group whose width divides the attention heads (64) and the output groups
(8). For Maya-S and Maya-XS that leaves no group at all:
--tpSo these packs always run as a plain layer split: one GPU computes each layer while the others wait.
Change
DS4_TP_UNEVEN_HEADS=1(experimental, default off) keeps a width that the heads do not divide. The group then takesthe heads the way a non-GGUF pack's group already does (
head_members): the heads go over the most members theysplit among evenly (64 over 3: 2 members of 32), and the remaining member computes only its FFN share. The head
(vocabulary 129280) does not split in 3 either, so a BF16 / Q8_0 head whose vocabulary does not split evenly takes
split128shares (337 / 337 / 336 blocks of 128), as an EXL3 head does.Unset, nothing changes: the width check is the old one, and the two split changes are only reachable where main
fails the load ("... do not split in 3 parts"). A short section in
docs/SETTINGS.mddescribes the setting.Why it matters
On 6x RTX 3090 / 256 GB RAM, DeepSeek V4.1 Flash 1017 Maya-S (DSpark on,
--mmap-experts off,DS4_FLOW_TP=1), thisbranch's
--tp 3(two groups of three GPUs; measured on v1.1.24) against main's layer split over the same six GPUs, in a replay of anagent coding session at 20K / 100K / 180K context:
--tp 3, this PR (two runs)So it helps what an agent session does: decode, and the turn reads that follow a cached prefix. Only a long prompt
read from an empty cache (a new server, or a long session resumed on one) is slower, since the layer split reads it
through six pipelined stages instead of two; an agent session does that at most once. It is also the plain patch: the group's lead also
holds the DSpark drafter, so with even FFN shares the other two members of that group keep 7.3 GB of VRAM each
unused. The follow-up below fills it.
Validation
Engine CLI logits of 1,024 fixed tokens on this branch (v1.1.25 + this commit; the same figures on v1.1.24), Maya-S over 6 GPUs,
--mmap-experts off,--window 1024, compared with main's layer split:DS4_CHUNK=256)--tp 3+DS4_TP_UNEVEN_HEADS=1+DS4_FLOW_TP=1--tp 1) vs main--tp 3with the setting unset vs main (both fall back to one GPU a layer group)All logits finite. On v1.1.20 the same patch gave KLD 0.0096 - 0.0103; the tokens that differ sit at near-ties (top-1
margin median 0.13 - 0.16).
CI-equivalent: HIP name mapping passes; server tests 342 OK (10 skipped); tools tests 384 OK (28 skipped).
Not tested: HIP at runtime; widths other than 3; EXL3 packs (they do not use this check).
Next
DS4_TP_SHARES) - the lead takes a smaller share and the others fill theirVRAM: in the same replay decode 83.0 tok/s (+31% over the layer split), turn reads +11 - 57%.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.