mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5488] [Engine] dsv41 on Apple-silicon Metal: routed experts go to the CPU lane, the one-GPU decode path turns itself off, DeepSeek-V4.1-Flash runs 10-40x slower than expected #5459
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5459
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 @Qfbxz on GitHub (Nov 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5488
[Engine] dsv41 on Apple-silicon Metal: most routed experts go to the "CPU lane", the one-GPU decode path turns itself off, DeepSeek-V4.1-Flash runs 10–40× slower than expected
Area: [Engine] (dsv41 engine component, Metal backend)
Engine: strata-dsv41 0.1.57-metal build
3e0210663— official signed component (ed25519 key_id5d1bc23abbeffd0d, sha2560e52375fdb3876da5c3311f14d19345893265840118cffb0a0526e82b8b75e29)Product: Strata 0.2.11
Hardware: Apple M3 Max, 128 GB unified memory, macOS 27.2 (26B123), Metal 4, internal NVMe
Model: DeepSeek-V4.1-Flash-1017, ISTA-DAS GSQ-RCO IQ2_XS "2.00bpw" (pack
deepseek-v4.1-flash-ist-das-2.00bpw; 384 routed experts × 40 layers = 15360; Engram IQ4_NL shared)Reproducibility: every engine start, deterministic (same layout decision each boot)
The problem
On Apple silicon there is no PCIe lane, and the engine's lane decision treats that as "the CPU lane is as fast or there is no lane", which turns the one-GPU decode path off and hands most routed experts to CPU threads reading in place from the model's files. Decode throughput collapses to a fraction of the expected rate.
Boot log (verbatim,
~/.local/share/strata/install/strata-deepseek-v4.1-flash-ist-das-2.00bpw.log):Expected vs observed
The 2.00 bpw set is smaller than the 2.25 bpw set the official number was measured on, so on equal treatment it should be faster, not 10–40× slower.
What was tried locally
DS4_UMA_GPU_RESERVE_GB=96DS4_STREAM=1strata metal: kernel launch with no Metal dispatch at src/dsv41/ds4_kernels.cu:2703— the escape hatch crashes into a bad path on Metal--vram-expertsRelevant knobs found in the 0.1.57 binary (static
strings, untested on Metal)DS4_STREAM_FORCE,DS4_STREAM_DIRECT,DS4_STREAM_ZC,DS4_STREAM_WIN,DS4_STREAM_SLOTS,DS4_STREAM_THREADS,DS4_STREAM_COPIES,DS4_STREAM_TOKEN_AB,STRATA_DS4_CPU_LANE,DS4_LANE_CAL,DS4_LANE_CHECK,DS4_LANE_FREE,DS4_LANE_SKIP,DS4_LANE_SPIN_MS,DS4_TRACE_AHEAD,DS4_LAND,DS4_UMA_GPU_RESERVE_GB,DS4_UMA_HEADROOM_GIB,DS4_STORE_RESERVE, plus the pack-cached lane measurementlane-times.txt("this GPU's PCIe lane streamed nothing at an earlier start - lane-times.txt in the pack; delete it to measure again").A controlled knob sweep on this machine is prepared (per-arm engine restart, layout + tok/s captured); the strings above suggest
DS4_STREAM_FORCEand the lane-calibration knobs decide exactly the branch that mis-fires here.Ask
DS4_STREAM=1currently hitskernel launch with no Metal dispatch(ds4_kernels.cu:2703) — either fix that path or expose a supported force knob that survives on Metal.--vram-expertsRAM-cap heuristic on unified memory: it reported "0.0 GB of RAM free to keep them" with ~100 GB free.CUDA0in the layout lines on a Metal-only host.Full boot log (32 lines), the run config (with and without the reserve knob), and a knob-name dump can be attached on request. Measured locally; nothing here is inferred from reading code alone — every quoted line is from a real start on this machine.