mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #360] [MERGED] DeepSeek prompts: keep the expert copies going while the host waits for the routing (+7-9% on 28K tokens here) #488
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#488
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/360
Author: @OscarSheng
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @mw00
Base:
main← Head:ds4-flow-pump-while-routing📝 Commits (1)
db703e9DeepSeek prompts: keep the expert copies going while the host waits for the routing📊 Changes
1 file changed (+10 additions, -0 deletions)
View changed files
📝
src/ds4/ds4_model.cu(+10 -0)📄 Description
What it changes: before each layer's bounds come back (the
cudaStreamSynchronizeafter attention, routing and theshared expert), the host calls
flow_pumpwhile the stream is busy, so the layer's likely experts - queued when thelayer before routed - are copied during that work instead of after it.
DS4_FLOW_PUMP_WAIT=0: as before.What it leaves alone: the batches (still fixed by the stream), the order of the sums - the bits are the same.
Measured (v1.1.21 + PR 1 and the others,
--mmap-experts off,MAYA_DS4_STREAM=0 DS4_CHUNK=16384, one process aconfig, two rounds):
DS4_FLOW_PUMP_WAIT=0On v1.1.19: 1,469 -> 1,607 (8.5K, compute waited for copies 1.86 -> 1.23 s), 2,234 -> 2,345 (28K, 3.47 -> 2.73 s).
Same answers: a 3,000-token prompt + 48 greedy tokens gave the same token ids with it on and off.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.