feat(low_latency): support top-16 routing and hidden-dim 3584 - #731
Draft
samsja wants to merge 1 commit into
Draft
feat(low_latency): support top-16 routing and hidden-dim 3584#731samsja wants to merge 1 commit into
samsja wants to merge 1 commit into
Conversation
The low_latency internode dispatch/combine kernels cap top-k at 11 and only template-specialize on a fixed set of a2a hidden dims. Two configs don't fit (both hit by Kimi-K3 — 896 experts, top-16, routed-expert hidden 3584): - top-16 routing trips EP_HOST_ASSERT(num_topk <= kNumMaxTopK) (dispatch) and the kNumMaxTopk equivalent (combine) -> raise both 11 -> 16. - routed-expert hidden 3584 falls through SWITCH_HIDDEN's default -> add case 3584 (satisfies the LL alignment invariants: %128, %256, and %512 for the combine kNumSendUnrolls=2 path). Follows deepseek-ai#458 (hidden-dim 3072).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The low_latency internode dispatch/combine kernels hard-cap top-k at 11 and only
template-specialize on a fixed set of a2a hidden dims. Two MoE configs don't fit
(both hit by Kimi-K3 — 896 experts, top-16, routed-expert hidden 3584):
EP_HOST_ASSERT(num_topk <= kNumMaxTopK)(dispatch) and thekNumMaxTopkequivalent (combine).SWITCH_HIDDEN's default → "Unsupportedhidden". (This is the a2a hidden dim, not the model
hidden_size.)Change
kNumMaxTopK/kNumMaxTopk11 → 16 (dispatch + combine).case 3584toSWITCH_HIDDEN— 3584 satisfies the LL alignment invariants(%128, %256 = 32·kNumElemsPerRead, %512 for the combine kNumSendUnrolls=2 path).
Follows #458 (hidden-dim 3072).
Validation
mini-K3 (2 nodes, EP16,
--deepep-mode auto, cuda-graph ON): decode cuda-graph capturepasses
SWITCH_HIDDENand serves without crash; greedy A/B vs the naive-a2a baselineagrees token-for-token into the low_latency decode region. Draft pending a full-model
multi-node coherence run.