[GH-ISSUE #58] output tokens in intranode::dispatch for each expert isn't packed? #55

Closed
opened 2026-10-26 09:53:28 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @zhang662817 on GitHub (Mar 7, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/58

The output token in the intranode::dispatch kernel offsets is channel_offset + rank_offsets + recv_token_idx;
The tokens for each expert isn't contiguous?

If yes, do you have plan to optimize these?

Thanks.

Originally created by @zhang662817 on GitHub (Mar 7, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/58 The output token in the intranode::dispatch kernel offsets is channel_offset + rank_offsets + recv_token_idx; The tokens for each expert isn't contiguous? If yes, do you have plan to optimize these? Thanks.
Author
Owner

@LyricZhao commented on GitHub (Mar 10, 2025):

The tokens for each expert isn't contiguous?

Yes, and it is by design. Some MoE models will make one token averagely select more than one expert in a GPU rank. So if we automatically expand/copy these tokens into different experts, the GPU memory consumption will be \times expert-per-rank-per-token-selected, and make training OOM.

So if you want to do grouped GEMM later, you have to expand the tokens and control the GPU memory precisely by yourself. We currently don't have plans to refactor this design.

<!-- gh-comment-id:2709211116 --> @LyricZhao commented on GitHub (Mar 10, 2025): > The tokens for each expert isn't contiguous? Yes, and it is by design. Some MoE models will make one token averagely select more than one expert in a GPU rank. So if we automatically expand/copy these tokens into different experts, the GPU memory consumption will be $\times$ expert-per-rank-per-token-selected, and make training OOM. So if you want to do grouped GEMM later, you have to expand the tokens and control the GPU memory precisely by yourself. We currently don't have plans to refactor this design.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepEP#55
No description provided.