Skip to content

feat(moonep): support multiple expert calls per checkpoint - #1

Merged
yaoyifanx merged 1 commit into
yaoyifanx:moonep_with_fsdp_native_overlap_20261109from
lichentrue:feature/moonep-multi-expert-checkpoint
Nov 26, 2026
Merged

yaoyifanx merged 1 commit into
yaoyifanx:moonep_with_fsdp_native_overlap_20261109from
lichentrue:feature/moonep-multi-expert-checkpoint

Conversation

@lichentrue

Copy link
Copy Markdown

A two-stream MoT decoder calls the understanding and generation experts in one layer. MoonEP previously required a separate checkpoint for each call, which kept the QKV tensors and per-stream attention outputs live until backward.

Record each executor invocation and routing decision in forward order. Replay consumes the original keys in the same order, including when a nonfused executor is called more than once. Intermediate replay leases can return to the pool while FSDP continues to restore weights in true backward order. The sparse backend retains its rank-consistent registered execution order.

Verification

  • 162 MoonEP CPU tests passed, including repeated executor and router calls and out-of-order restoration notifications.
  • Four Ascend 910B3 devices with EP2 × FSDP2, forward and backward prefetch, and expert migration. For both nonfused and megakernel backends, the whole-region and split-region checkpoints produced identical outputs, input gradients, routing-score gradients and local expert parameter gradients over two steps.
  • The companion VeOmni test exercises a small 106B-family decoder with CPU SDPA. Both streams' Q/K/V and projected attention storage were released before backward with a whole-layer checkpoint.

VeOmni integration

Signed-off-by: lichen <109400791+lichentrue@users.noreply.github.com>
@yaoyifanx
yaoyifanx merged commit 671bf72 into yaoyifanx:moonep_with_fsdp_native_overlap_20261109 Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants