mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #343] [MERGED] ds4: prompt skip across a 2-GPU prefix layer split #476
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#476
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/343
Author: @Gazelle221B
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @mw00
Base:
main← Head:ds4-prompt-skip-layer-split📝 Commits (2)
3e1d4aads4: allow prompt skip across prefix layer splits18f2173Merge main (#344's multi-GPU prompt skip) into ds4-prompt-skip-layer-split📊 Changes
2 files changed (+203 additions, -7 deletions)
View changed files
📝
src/ds4/ds4_model.cu(+21 -7)➕
tools/test_ds4_prompt_skip.py(+182 -0)📄 Description
v1.1.19's prompt skip is disabled whenever the trunk spans devices (
yoco_layer()requires every layer onL[0].dev). On a 2-GPU layer split the boundary is usually at or before layer 20, so the skipped suffix already sits on one GPU. This lets the skip run in that case.Change
yoco_layer(): allow splits at or before the KV source layer; the source and every suffix layer must still share one device. Tensor-parallel layers and splits inside the suffix stay ineligible.tools/test_ds4_prompt_skip.py) compile the real eligibility/bootstrap source.Single-GPU behaviour is unchanged. There are no kernel, backend-specific or settings changes. NVIDIA prefix splits become eligible too, but I could only test HIP.
Prefill, before/after
2x 32 GB AMD GPUs (HIP), Maya-S six-shard, v1.1.19 + this commit. Automatic split 19/21, DSpark on, zero prompt reuse, three alternating rounds,
MAYA_DS4_PROMPT_SKIP=0vs1on the same binary:For reference, the same machine with the trunk on one GPU (upstream skip) reads 321 / 377 / 425 / 467 tok/s at these sizes, but decodes more slowly. The split keeps the 2-GPU decode speed and now gets most of the prefill gain.
Numerics
Fixed expert dispatch (
DS4_STREAM=1 DS4_STREAM_FORCE=012345678 DS4_LANE_CAL=none),--no-expert-cache, greedy, identical starting profiles. Two skip-off processes produced byte-identical logits and answers at every size, so this is the noise floor. Prompt last-row logits, skip on vs off:The 64K split happens at a near-tie: the top-two logit margin is 0.04 with skip off and 0.16 with skip on, and both answers are complete and sensible. The KLs are below the 1.5e-4 quoted for the single-GPU skip in the v1.1.19 notes, so I read this as the same rounding-level change. You may prefer a stricter criterion, though.
Also checked: 20/20 known-answer prompts (arithmetic, facts, a 61K-token needle) with the skip on; the CI-equivalent checks pass (tools tests, server tests, HIP mapping check).
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.