[GH-ISSUE #328] DS4: long-prompt skip (v1.1.19 yoco) is single-GPU only — multi-GPU layer-split support planned? #126

Open
opened 2026-10-29 21:21:14 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @bluewowo on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/328

First, huge thanks — v1.1.17's chunk fix took DeepSeek-V4.1-1017 Maya-S from ~99 to ~1276 tok/s prefill on our 2x4090 48G.

We're on 2x4090 48G, layer-split (CUDA0 layers [0,19], CUDA1 layers [20,39]+head). v1.1.19's headline "long prompts up to ~1.5x faster" doesn't apply to us, and we traced it to yoco_layer() in src/ds4/ds4_model.cu:

for (int il = 0; il < g.nl; ++il) {
    const Layer& l = L[il];
    if (l.nm != 1 || l.dev != L[0].dev) return -1;   // any layer on a different GPU -> no skip
}

So the skip needs every layer on one GPU; on a layer-split it returns -1 (off). Reasonable as a first cut.

Question: is multi-GPU skip on the roadmap? Our read is that on the natural 20/20 split it wouldn't help as-is — CUDA0 (layers 0-19, all full-work) stays the bottleneck, so skipping CUDA1's layers 20-39 gives ~0 net gain. To actually win you'd also split the full-work layers across both GPUs (e.g. CUDA0 [0,9], CUDA1 [10,39]) so each carries ~10 full layers + the cheap skipped tail — at the cost of CUDA1 holding 3x the layers (pool/VRAM imbalance). Is that the intended direction, or is there a simpler multi-GPU path we're missing? Happy to test a branch.

Separately (will file its own issue): the v1.1.18 PCIe lane seems to mis-estimate the CPU lane on our box — it plans with 0.509 ms/expert but re-times it at 1.0-1.4 ms during decode, and on CUDA1 streams at 1.864 ms vs 1.018 ms CPU. Decode dropped from ~32-38 (v1.1.17) to ~27-34; MAYA_DS4_STREAM=0 looks like the lever. Confirming now.

Originally created by @bluewowo on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/328 First, huge thanks — v1.1.17's chunk fix took DeepSeek-V4.1-1017 Maya-S from ~99 to ~1276 tok/s prefill on our 2x4090 48G. We're on **2x4090 48G, layer-split** (CUDA0 layers [0,19], CUDA1 layers [20,39]+head). v1.1.19's headline "long prompts up to ~1.5x faster" doesn't apply to us, and we traced it to `yoco_layer()` in `src/ds4/ds4_model.cu`: ```cpp for (int il = 0; il < g.nl; ++il) { const Layer& l = L[il]; if (l.nm != 1 || l.dev != L[0].dev) return -1; // any layer on a different GPU -> no skip } ``` So the skip needs every layer on one GPU; on a layer-split it returns -1 (off). Reasonable as a first cut. **Question: is multi-GPU skip on the roadmap?** Our read is that on the natural 20/20 split it wouldn't help as-is — CUDA0 (layers 0-19, all full-work) stays the bottleneck, so skipping CUDA1's layers 20-39 gives ~0 net gain. To actually win you'd also split the full-work layers across both GPUs (e.g. CUDA0 [0,9], CUDA1 [10,39]) so each carries ~10 full layers + the cheap skipped tail — at the cost of CUDA1 holding 3x the layers (pool/VRAM imbalance). Is that the intended direction, or is there a simpler multi-GPU path we're missing? Happy to test a branch. Separately (will file its own issue): the v1.1.18 PCIe lane seems to mis-estimate the CPU lane on our box — it plans with 0.509 ms/expert but re-times it at 1.0-1.4 ms during decode, and on CUDA1 streams at 1.864 ms vs 1.018 ms CPU. Decode dropped from ~32-38 (v1.1.17) to ~27-34; `MAYA_DS4_STREAM=0` looks like the lever. Confirming now.
Author
Owner

@AutisticPancake commented on GitHub (Oct 21, 2026):

Just wanna say that 1.1.17 didn't fix the prefill for EXL3 DeepSeek on Windows at least.

Running it on AVX2 CPU (zen2 threadripper) with 2x RTX 3090, a 2.9bpw quant with the original Ngram files (not quantized to Q6K).
Config: 100k context, --tp 2, no dspark, no vision, mmap experts on (can't run it properly without that, see a note below about pinning).

This issue mentions from ~99 to ~1276 tok/s prefill meanwhile I'm still getting ~100 t/s prefill even on v1.1.19! For comparison, GLM prefill is lightning-fast (500-800 t/s depending on context size) even when I use 4.05bpw EXL3 of the GLM model.

Also note: pinning doesn't work on Windows for DeepSeek (but it works for GLM).
So for me there's no "Shared GPU memory" - maybe that's the cause of a super-slow prefill speed? Idk.

Pardon me if this is an inappropriate place to post but I don't want to open my own issue because I'm not experienced and I don't want to spawn AI generated reports.

I'm currently downloading Maya-S variant of DeepSeek to check if that thing works better - will post an update later.

UPDATE:

Maya-S GGUF prefill = about 500 tokens per second in long context.

I see PCIe bandwidth being reported in real time in Maya's interface, it's peaking at about 25 GBPS with Maya-S GGUF.
With EXL3 2.9bpw it's only 4 - 5 GBPS with occasional blips to 6 - 8 GBPS.

<!-- gh-comment-id:6310219301 --> @AutisticPancake commented on GitHub (Oct 21, 2026): Just wanna say that 1.1.17 didn't fix the prefill for EXL3 DeepSeek on Windows at least. Running it on AVX2 CPU (zen2 threadripper) with 2x RTX 3090, a 2.9bpw quant with the original Ngram files (**not** quantized to Q6K). Config: 100k context, --tp 2, no dspark, no vision, mmap experts on (can't run it properly without that, see a note below about pinning). This issue mentions `from ~99 to ~1276 tok/s prefill` meanwhile **I'm still getting ~100 t/s prefill** even on v1.1.19! For comparison, GLM prefill is lightning-fast (500-800 t/s depending on context size) even when I use 4.05bpw EXL3 of the GLM model. Also note: pinning doesn't work on Windows for DeepSeek (but it works for GLM). So for me there's no "Shared GPU memory" - maybe that's the cause of a super-slow prefill speed? Idk. Pardon me if this is an inappropriate place to post but I don't want to open my own issue because I'm not experienced and I don't want to spawn AI generated reports. I'm currently downloading Maya-S variant of DeepSeek to check if that thing works better - will post an update later. UPDATE: Maya-S GGUF prefill = about 500 tokens per second in long context. I see PCIe bandwidth being reported in real time in Maya's interface, it's peaking at about 25 GBPS with Maya-S GGUF. With EXL3 2.9bpw it's only 4 - 5 GBPS with occasional blips to 6 - 8 GBPS.
Author
Owner

@Gazelle221B commented on GitHub (Oct 22, 2026):

Linking related work here so nobody duplicates it. There are now several overlapping efforts for multi-GPU prompt skip:

  • #343 (mine): the smallest change to yoco_layer(). Splits at or before the KV source layer become eligible, the source and suffix layers must stay on one GPU, and the expert stream is seeded at the cut. Measured on 2x 32 GB AMD (HIP) with the automatic 19/21 split: prefill 1.43x at 8K, 1.20x at 64K.
  • #344 (@needmorevram): tensor parallel on up to 9 GPUs, which also touches yoco_layer() (prompt skip on several GPUs). It is broader in scope and overlaps with #343's gate change.
  • In the #343 thread, @jinsoojinsoo wrote the same gate independently and tested it on 2x RTX 3090. They confirmed your point above: the automatic split leaves GPU0 as the bottleneck. With DS4_SPLIT=10,30 the skip gave 2.2x at 32K and about 1250 tok/s at 120K-261K, at a small cost in short-context decode.

Next on my side: AMD numbers on v1.1.21 with the 10/30 placement, and a fixed-dispatch numerics comparison including a placement-only noise floor. Results will go to #343.

@mw00, if #344 is the direction you prefer for multi-GPU, I'm happy to close #343 or rebase it to complement #344 (for example, the plain layer-split case without TP). Please say which you'd like.

<!-- gh-comment-id:6331784448 --> @Gazelle221B commented on GitHub (Oct 22, 2026): Linking related work here so nobody duplicates it. There are now several overlapping efforts for multi-GPU prompt skip: - **#343** (mine): the smallest change to `yoco_layer()`. Splits at or before the KV source layer become eligible, the source and suffix layers must stay on one GPU, and the expert stream is seeded at the cut. Measured on 2x 32 GB AMD (HIP) with the automatic 19/21 split: prefill 1.43x at 8K, 1.20x at 64K. - **#344** (@needmorevram): tensor parallel on up to 9 GPUs, which also touches `yoco_layer()` (prompt skip on several GPUs). It is broader in scope and overlaps with #343's gate change. - In the #343 thread, @jinsoojinsoo wrote the same gate independently and tested it on 2x RTX 3090. They confirmed your point above: the automatic split leaves GPU0 as the bottleneck. With `DS4_SPLIT=10,30` the skip gave 2.2x at 32K and about 1250 tok/s at 120K-261K, at a small cost in short-context decode. Next on my side: AMD numbers on v1.1.21 with the 10/30 placement, and a fixed-dispatch numerics comparison including a placement-only noise floor. Results will go to #343. @mw00, if #344 is the direction you prefer for multi-GPU, I'm happy to close #343 or rebase it to complement #344 (for example, the plain layer-split case without TP). Please say which you'd like.
Author
Owner

@pepuscz commented on GitHub (Oct 26, 2026):

#517 (part of #510) adds the exact long-prompt skip on a tensor-parallel group: MAYA_DS4_YOCO_TP=1, for one group of GPUs that holds every trunk layer, with the flow. Each member computes the yoco layer's compressed KV and index keys itself, and the skip leaves out the same (chunk, layer)s on every member, so their all-reduces stay paired. It's off by default, and tools/test_ds4_prompt_skip.py covers the new cases.

<!-- gh-comment-id:6421090921 --> @pepuscz commented on GitHub (Oct 26, 2026): #517 (part of #510) adds the exact long-prompt skip on a tensor-parallel group: `MAYA_DS4_YOCO_TP=1`, for one group of GPUs that holds every trunk layer, with the flow. Each member computes the yoco layer's compressed KV and index keys itself, and the skip leaves out the same (chunk, layer)s on every member, so their all-reduces stay paired. It's off by default, and `tools/test_ds4_prompt_skip.py` covers the new cases.
Author
Owner

@mw00 commented on GitHub (Oct 28, 2026):

Thank you for the analysis - it was spot on. In v1.1.34 the skip already runs on a layer split, but as you predicted the first GPU's full-work layers set the pace, so it gains about nothing there (3x V100: 1.00x at 32K). A split that gives each early GPU only the layers its VRAM holds and the last GPU the skipped layers is 1.40x at 16K and 1.43x at 32K on our 3x V100, with the decode within 1% - but 2K-token prompts read 7% slower. You can try it now with DS4_SPLIT=<layers of GPU 0>,<layers of GPU 1>,... (ours: DS4_SPLIT=10,10,20; the first GPUs' counts about what their VRAM holds of experts, the rest on the last). We'd like to make the automatic split prompt-aware in a later release.

<!-- gh-comment-id:6464811953 --> @mw00 commented on GitHub (Oct 28, 2026): Thank you for the analysis - it was spot on. In v1.1.34 the skip already runs on a layer split, but as you predicted the first GPU's full-work layers set the pace, so it gains about nothing there (3x V100: 1.00x at 32K). A split that gives each early GPU only the layers its VRAM holds and the last GPU the skipped layers is 1.40x at 16K and 1.43x at 32K on our 3x V100, with the decode within 1% - but 2K-token prompts read 7% slower. You can try it now with `DS4_SPLIT=<layers of GPU 0>,<layers of GPU 1>,...` (ours: `DS4_SPLIT=10,10,20`; the first GPUs' counts about what their VRAM holds of experts, the rest on the last). We'd like to make the automatic split prompt-aware in a later release.
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#126
No description provided.