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#520
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/415
Author: @pepuscz
Created: 10/23/2026
Status: ❌ Closed
Base:
main← Head:pr/ds4-helper📝 Commits (1)
8ff6e3fmaya-ds4: a helper GPU for the experts VRAM leaves over, opt-in (MAYA_DS4_HELPER) - DeepSeek's counterpart of #201📊 Changes
6 files changed (+748 additions, -21 deletions)
View changed files
📝
docs/SETTINGS.md(+17 -0)📝
src/ds4/ds4_kernels.cu(+46 -0)📝
src/ds4/ds4_kernels.cuh(+8 -0)📝
src/ds4/ds4_main.cpp(+16 -2)📝
src/ds4/ds4_model.cu(+657 -19)📝
src/ds4/ds4_model.hpp(+4 -0)📄 Description
What. On a box whose GPUs' VRAM cannot hold a GGUF pack's routed experts, the rest run on the CPU lane. On a
Strix Halo box with two discrete cards, about 41 of 59 ms a decoded token went there (DS4_PROF). This is DeepSeek's
counterpart of #201's GLM expert helper:
MAYA_DS4_HELPER=<visible GPU>withMAYA_DS4_HELPER_GB=<GB>takes a GPU offthe layer devices and gives it a pool of the most-routed experts the layer GPUs do not hold, chosen by the expert
profile. An integrated GPU's large shared memory fits it well; a small extra card works too.
makes no CUDA call; it adds the helper's sums. A failure, or 10 s without an answer, hands the picks back to the CPU
lane, and STAT counts them.
window's tokens. It matches its per-token path bit for bit:
MAYA_DS4_HELPER_CHECK=1compares the two, and thehelper against the CPU lane, at load.
helper's, and the rest are the CPU lane's. The expert-cache swaps and the read-ahead leave the helper's experts out,
and the recent slots' fills never see them.
MAYA_DS4_WARM_CAP_GBis required with the helper: it sets the load's experts in host RAM beside thepool, since an integrated GPU's pool is host RAM too. It is ignored under #368's
DS4_REQUIRE_ALL_RAM.DS4_HELPER_FAIL=flags|poolmakes that allocation fail as a real one would.Unset, every path is as before. It is not yet on tensor-parallel groups: a group's layers stay off the helper. On
naming, #410 asks whether this should follow #201's
STRATA_GLM_EXPERT_HELPER, e.g. asSTRATA_DS4_EXPERT_HELPER.I'll rename it if you prefer that.
Changes.
src/ds4/ds4_model.cu,src/ds4/ds4_model.hpp,src/ds4/ds4_kernels.cu/.cuh,src/ds4/ds4_main.cpp,docs/SETTINGS.md. The engine readsSTRATA_DS4_HELPER*andSTRATA_DS4_WARM_CAP_GB(andDS4_*).Verified. The load with
MAYA_DS4_HELPER=2 MAYA_DS4_HELPER_GB=95 MAYA_DS4_WARM_CAP_GB=14.9 MAYA_DS4_HELPER_CHECK=1(the Radeon 8060S as the helper):
--tp 1(the two XTX in a layer split), 128K,--dspark none--pplforward does not go through the helper, so the perplexity pair shows only that the rest is unchanged.The helper's numbers rest on the load check above and on decode passes with no fallback.
a side's own two loads also part, so the decode rows compare different continuations.
Test setup. Measured on v1.1.23 + main's commits after it (main at
c9683e3) + this branch. Rebased onto v1.1.24(
25deec5) without conflicts; the change's lines are the same. Main's engine change since then (df7e8b9) isWindows-only, and this was tested on Linux only. HIP build (ROCm 7.2.4,
gfx1100;gfx1151): 2x RX 7900 XTX (gfx1100)as the layer devices, and the Ryzen AI Max+ 395's Radeon 8060S (gfx1151) as the helper. The engine CLI, with the same
binary, flags and expert profile both ways and an empty
MAYA_DS4_LT_STOREeach run. Model: DeepSeek-V4.1-Flash-1017Maya-S (not the newer Maya-XS, which this did not test). This is a correctness check and one same-binary speed
comparison, not a quality or DSpark qualification.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.