Repository navigation
Conversation
| topk_ids = topk_output.topk_ids | ||
| topk_ids_local = self.local_expert_mapping[ | ||
| topk_ids.clamp(min=0) | ||
| ].masked_fill(topk_ids < 0, -1) |
There was a problem hiding this comment.
Traced on current main (d94d784): both halves of #40156 are still there, the zero draft count from ForwardBatch.init_new when input_ids is None and the unguarded local_expert_mapping[topk_ids] lookup. Clamp/lookup/restore keeps -1 as the drop sentinel without a host sync, so it is graph-safe, and the two new unit tests fail on the pre-fix sources and pass here.
What is missing before run-ci is e2e evidence: EAGLE/MTP with moe_ep_size > 1, full GSM8K with finish_reason/stop-rate plus accuracy, draft CUDA graph on and off. The draft-graph path still has no padded-row count (TODO at eagle_draft_cuda_graph_runner.py L644), so that stays out of scope here.
|
E2E data for the review request above: EAGLE/MTP with Setup. 8x H20, GLM-5.3-Flash FP8 (288 experts, index-share MTP), TP8/EP8,
GSM8K. All 1319 questions, with the 5-shot prompt from Draft graph off. "off" =
|
Since sgl-project#39574, draft ForwardBatch.init_new treated missing input_ids as 0 tokens, so the MoE padded-region mask set every draft topk id to -1 and the eager draft forward ran without routed experts. Derive the draft token width from spec_info.num_tokens_per_req when input_ids is None. The StandardDispatcher half of the original fix is superseded by sgl-project#40498, which already preserves the -1 sentinel. Fixes sgl-project#40156 Signed-off-by: GokayAI <[email protected]>
5df150c to
08398b2
Compare
|
Thanks a lot @QNan0513 for the full EAGLE/MTP + EP8 GSM8K runs, that covers exactly what was asked for. Rebased onto current main (e262b44) as suggested: dropped the @JustinTong0323 could you take another look and kick off CI when you have a moment? |
EAGLE speculative decoding + expert parallelism has been affected on main since #39574. Draft
ForwardBatch.init_newseesinput_ids is Noneand publishes a live token count of 0, so TopK masks every drafttopk_idsrow to-1and the eager draft forward runs the MoE without routed experts.This PR derives the draft token width from
spec_info.num_tokens_per_reqwheninput_idsis missing.The original second half (keeping the
-1sentinel throughlocal_expert_mappinginStandardDispatcher) is superseded by #40498 and was dropped in the rebase onto current main.Unit test: a draft
ForwardBatchwithinput_ids=Nonenow publishesbs * num_tokens_per_req(fails with0 != 4on main, passes here). E2E data from @QNan0513 (EAGLE/MTP, TP8/EP8, full GSM8K, draft graph on and off) is in the thread below.Fixes #40156
CI States
Latest PR Test (Base): ❌ Run #39438610653
Latest PR Test (Extra): ❌ Run #39438610926
Latest PR Test (AMD ROCm 10): ❌ Run #39438611089