mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
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#198
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?
Originally created by @talisp on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/496
In short
After updating from v1.1.26 to v1.1.28, DeepSeek-V4.1-Flash decodes ~19% slower on our machine (one L40S 48 GB, experts copied into RAM, UD-Q8_K_XL), with the same config and the same benchmark as in #433.
DS4_STREAM_WIN=0 DS4_LAND=0 DS4_STREAM_ZC=0)What we think happens:
streams 0 0 0 0 0 0 0 0 0).What we'd suggest:
DS4_STREAM_WIN=0 DS4_LAND=0 DS4_STREAM_ZC=0as the way back to v1.1.27's path. We found those names only in the source.The #476 notes already say "Cards or GPU sets that already keep most experts in VRAM (48 GB and up): helps less". On a 508 GB model, a 48 GB card holds only ~8% of the experts, so the size check alone doesn't catch this case. Here it doesn't just help less: it is slower.
We are happy to test a fix or a branch on this machine. The technical details follow.
Technical notes
Setup
maya-ds4), compared with v1.1.26 runs from two days earlier. Same machine, config and build flow (./maya.sh --setup ... --no-start).--max-context 262144 --cpu-threads 28 --mmap-experts off --dspark on, envDS4_REQUIRE_ALL_RAM=1 MAYA_DS4_SLOT_KEEP=1 MAYA_DS4_SLOT_CAP=8.Benchmark
The same script as in #433:
Engine log, v1.1.28 default
With
DS4_STREAM_WIN=0 DS4_LAND=0(andDS4_STREAM_ZC=0):v1.1.26:
experts 25.93 GB (1339 of 15744 in VRAM).Our reading
one_gpu_path()(src/ds4/ds4_model.cu, ~L5601) decides from the topology alone: one discrete NVIDIA GPU, Linux, no helper. Thenln_winandln_landdefault to it.rc_drainwait before a prompt. We have not profiled it.Update: no remaining gap with the path off
The 39.5 against 42.4 tok/s came from the text mix, not the version: one "off" run happened to get answers with 55-71% of the experts on the CPU lane. Compared at the same CPU-lane share, v1.1.28 with the path off matches v1.1.26, and the path on is ~17% slower at the same share. The per-answer table is in the first comment.
@talisp commented on GitHub (Oct 25, 2026):
A follow-up that narrows this down, and a correction to the "remaining gap" in the first version of this issue (the text above is updated).
Compared answer by answer at the same share of experts on the CPU lane, the new path costs ~17% even when the GPU finds more experts in VRAM. Decode speed depends a lot on how many of a token's experts land on the CPU lane, and that varies with the text. So we grouped each 400-token answer of the benchmark by the CPU-lane share the engine reports (
CPU lane X% of the experts):(tok/s per answer)
streams 0 0 0 0 0 0 0 0 0throughout)./metricsshowsvram_hit≈ 0.55 at ~41 tok/s. The hit rate follows the workload, not the version.PCIe lane: the copied experts pinnedorpinning ... failedline in the start log with the path on. So we can't tell from the log whether the in-place pulls were set up at all.Why the same idea helps elsewhere but not here (our reading):
an expert 0.053 ms on the CPU lane ..., 0.736 streamed).So a possible default: enable the one-GPU path only when streaming is measured as cheaper for at least some pick counts, i.e. when the lane would stream anything. If it streams 0 at every count, keep v1.1.27's path and its VRAM. That would keep #476's gain on 12-24 GB cards with small CPUs and avoid the loss on big-CPU boxes.
Happy to run a branch with that, or with any diagnostic env you'd like, on this machine.
@mw00 commented on GitHub (Oct 27, 2026):
Thank you for the careful A/B and the per-answer table: it pointed straight at the fix. From v1.1.30 the one-GPU decode path from #476 stays on only where the CPU lane's experts actually stream from RAM. After the PCIe lane's timing at load, a GPU whose plan streams nothing (as on your L40S) goes back to v1.1.27's path for that run. From the next start on, the times file (
lane-times.txtin the pack) keeps the path off from the beginning, so its VRAM goes to experts again. The start log says which path runs ("the one-GPU decode path: on/off ..."). SETTINGS.md now documents it and the way back (DS4_STREAM_WIN=0 DS4_LAND=0 DS4_STREAM_ZC=0); deletinglane-times.txtmeasures again. We'd be glad if you could rerun your benchmark on v1.1.30: the first start measures, and the second should match v1.1.27.