mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #591] [CLOSED] ds4: DS4_TP_SHARES - uneven FFN shares on a GGUF group's member ranges #612
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#612
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/591
Author: @NenadSteric
Created: 10/28/2026
Status: ❌ Closed
Base:
main← Head:pr/ds4-tp-shares-v1134📝 Commits (1)
3f3873ads4: DS4_TP_SHARES on DS4_TP_GGUF_UNEVEN's member ranges📊 Changes
1 file changed (+78 additions, -4 deletions)
View changed files
📝
src/ds4/ds4_model.cu(+78 -4)📄 Description
Follow-up to #411, as mentioned there: with
--tp 3the group whose lead also holds the DSpark drafter splits everyexpert evenly, so that lead caps the group and its two other members leave VRAM unused.
Problem
Maya-S,
--tp 3with uneven heads on 6x RTX 3090, DSpark on, v1.1.34: the first group's lead (drafter + its part ofthe experts) has 417 MiB free, while its two other members keep 7.1 GB each unused. Every member holds the same
experts, so the group keeps 3,229 / 7,296 expert slots in VRAM.
Change
DS4_TP_SHARES(experimental, unset = unchanged) sets each member's share of a GGUF group's FFN on #408's memberranges (
DS4_TP_GGUF_UNEVEN'sff0/ffn):w0,w1,..per group (groups separated by/), member m takingw_mofsum(w)equal parts of n_ff, in whole blocks of the experts' type. Patterns separated by:go round the group'slayers by index, so
2,3,4:2,4,3gives the two other members 3.5 parts each on average. A group without an entry, orwhose pattern is not its width, keeps the whole-block split; a share that does not fall on whole blocks is refused at
load. Setting it turns on the member-range paths as
DS4_TP_GGUF_UNEVEN=1does; the chunk buffers take the widestshare, and the slot planner counts each member's room in units of its own part, so the lead's smaller part gets more
slots. One file, +78 / -4.
Every path that reads, stages or copies a member's part already takes
member(l, m).ff0 / ffn(mx_read_off,mx_read_len,down_cut, the helper's pool,TP_BORROW's slots,--parallel's batched step); none assumes an evensplit.
DS4_EXL3_PACKED_HOSTrequires one and falls back by itself (EXL3 only).Speed
v1.1.34 + this commit, same machine, 220 W + locked clocks, DSpark on,
--mmap-experts off,DS4_FLOW_TP=1, a replayof an agent coding session at 20K / 100K / 180K context (six replies, temperature 1.0, seed 1234):
--tp 3, whole-block split--tp 3,DS4_TP_SHARES=2,3,4:2,4,3(two runs)The replies are sampled, so they differ between runs (and with the prompt lookup on by default, between versions); the
two shares runs differ by 8% in weighted decode. On v1.1.27 the same pair measured 80.6 (whole blocks) vs 92.4 / 94.5
tok/s (shares). Shares cost 5 - 10% on turn reads and 1 - 4% on fresh prompts here.
The setting is for the drafter's lead: with
--dspark nonethe same2,3,4leaves the lead room to spare.Validation
Engine CLI logits of 1,024 fixed tokens (v1.1.34 + this commit, Maya-S, 6 GPUs,
--dspark none,--window 1024):--tp 3+ uneven heads, vs main's layer split--tp 3withDS4_TP_SHARESunset, vs main--tp 3+DS4_TP_SHARES=2,3,4:2,4,3, vs main's layer splitDS4_TP_BORROW=1(the members lend 3.3 - 6.3 GB), vs main's layer splitDS4_TP_BORROW=1+DS4_FLOW_DOWN_PART=1+DS4_FLOW_DOWN_SHARE=1,--mmap-experts on(experts streamed from the files, both switches engaged per the log)The last row is the check that the member-cut paths follow the uneven ranges: the files' rows, compacted to each
member's columns, give the same bits as the RAM copies.
--parallel 4 --multi-check(4 conversations x 32 greedy tokens): on this rig it reports 0 bit-identical rows anddifferent tokens from token 6 - 30 on, on main's
--tp 3as well as with shares (here ~5,400 of the experts run onthe CPU lane, whose rounding the docs allow to change the last bits). Main's layer split shows the same (0 of 60
rows, a conversation's tokens differ from token 1 on), and so does main's
--tp 3withDS4_STREAM=0(0 of 101) - soit comes with the CPU lane here, not with tensor parallel or this setting.
CI-equivalent: HIP name mapping passes; serve tests 463 OK (11 skipped); tools tests 576 OK (31 skipped).
Not tested: HIP at runtime; widths other than 3; the helper GPU (
DS4_HELPER) beside shares (needs a 7th GPU here);EXL3 packs (not affected: GGUF groups only).
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.