Repository navigation
Conversation
DeepSeek-V4.1-Flash served with the shared expert fused into the MoE (SGLang --enforce-shared-experts-fusion) runs 385 experts / top-7 (target) and 129 / top-4 (DSpark draft) at TP4 inter 640, which had no tuned rows and fell back to the heuristic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
Motivation
SGLang serves DeepSeek-V4.1-Flash with the shared expert fused into the routed MoE (
--enforce-shared-experts-fusion, appended as the last expert). At TP4 the MoE therefore runs:Both have per-rank
inter_dim640, A8W4.dsv41_fp8_tuned_fmoe.csvhas rows for the unfused 384/6 and 128/3 shapes (#6125), but none for these, sofused_moefalls back to the heuristic FlyDSL pair at every token bucket.Technical Details
aiter/configs/model_configs/dsv41_fp8_tuned_fmoe.csv, plus the matching shapes indsv41_fp8_untuned_fmoe.csv. No new file._guistage 1 + non-layout stage 2 family, the same family the heuristic uses. No_fp8stage 1,moe2_layout, orxcd4kernels.model_configspath without collisions (3,080 merged rows, 8 unique new keys).Test Plan
fused_moewith the real expert weights of one DeepSeek-V4.1-Flash layer:layers.3, draftmtp.0, rank 0 of TP4.intermediate_pad=64); the shared expert requantized to MXFP4 as the last expert.GateMode.INTERLEAVE,swiglu_limit=10.Test Result
MI350X VF (gfx950), aiter
6bf550b61, µs perfused_moecall; heuristic → tuned (run 1 / run 2):End to end (on the older aiter that SGLang currently pins, e7d2453). The heuristic there is slower, and these rows were bitwise-equal to it.
main.Note on the fused-quant family (not in this PR). On these padded shapes (inter 576 → 640), some
_fp8stage-1 /moe2_layout/xcd4candidates produced whole NaN rows at random:xcd4stage 1 at 20-64 tokens, 15/15 runs.intermediate_pad=0they produced none, which points at the padded columns not being written.The tuner did not catch this because its random data is not padded.
🤖 Generated with Claude Code