Repository navigation
[ROCm][DSv4] AITER MegaMoE Fixed-Slot Dispatch For DeepSeek-V4 - #61262
Conversation
Signed-off-by: Micah Williamson <micah.williamson@amd.com>
Signed-off-by: Micah Williamson <micah.williamson@amd.com>
|
/ci run |
|
✅ Triggered Buildkite CI #94957 for commit |
|
LGTM. Built the same thing while tuning DeepSeek-V4-Pro on 8x MI355X (DP8 attention + EP8 AITER MegaMoE, AgentX agentic workload, DSpark K6): a second fixed-slot MegaMoEV2 runtime for decode, picked by the max token count across DP. This PR matches that design, including the DP-max selection, so it looks good to us. One note from that setup: with K6 drafts each decode request carries 7 tokens, so at concurrency 128 a rank holds 112+ tokens per step, about 143 on average in our runs because of uneven load. With the default FIXED_SLOT_MAX_MTPR=255 the decode runtime holds 128 tokens, and those steps fall back to the compact path. We ran with AITER_MEGA_FIXED_SLOT_MAX_MTPR=511, which gives a 256-token decode runtime. It may be worth mentioning this knob in the description. |
…project#61262) Signed-off-by: Micah Williamson <micah.williamson@amd.com>
AITER MegaMoEV2 (initially integrated in #59685) has two dispatch schemes:
AITER takes fixed-slot only when the runtime's max_tok_per_rank is at most FIXED_SLOT_MAX_MTPR. That limit is 255 by default and can be raised with AITER_MEGA_FIXED_SLOT_MAX_MTPR. In the initial integration, we built a single runtime with the compact path, so decode always pays for the compact prepare step.
This PR builds a second runtime and picks between the two paths at each decode step.
The decode runtime is sized
max_tok_per_rank = prev_power_of_2(FIXED_SLOT_MAX_MTPR), which ends up being 128 by default. It's only built when AITER's bundle plan says that size actually uses fixed-slot. Otherwise behavior is unchanged. The fused shared expert makes 49 experts per rank, so no decode runtime is built with FSE enabled.Perf and Accuracy
Without MTP
With MTP (DSpark, 3 draft tokens)
At 2048 without MTP and 512 with MTP, both builds use the compact runtime, so they run the same kernels. So it is expected that there is no diff from the current main.
Accuracy (gsm8k 5-shot, flexible / strict, ±0.006)
MTP acceptance rate is 91–92% on both.
Edit: A useful note from @benenzhu