Repository navigation
Conversation
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
…callback Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
Signed-off-by: Yan Bai <bayan@nvidia.com>
This branch has not been deployed
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.
Summary
Add opt-in token-wise ChunkedEP for Qwen3 MoE, using DeepEP to overlap communication and expert computation.
Candidate:
45634901b5a80ed350a2b9d456cde7be2c0292a2, 15 files, +4000/-15 relative to devbb5dfd08f09ce06c5925af453fef06b3129f199d.Validation and performance
Actual optimizer updates: 48 layers, 16K local tokens
Qwen3 BF16 THD, 16 H100 GPUs across two nodes, 48 layers, 16384 tokens/GPU, 16 microbatches, EP8/top-k8, expert DP2, two chunks, full recomputation, random initial weights, identical existing linear CE, lazy activation capacity. Both arms execute real precision-aware distributed FusedAdam and scheduler updates. Three warmup and five measured steps; no profiler or private allocator-retention modification.
Step latency takes the maximum across ranks before taking the median across measured steps. Both arms completed all eight updates on all ranks, with zero allocator retries/OOMs. Results were measured at
83f7552e4; current production code differs only in RuntimeError messages. Subsequent changes consolidate test setup and documentation, without changing operator computation.After timing, all ChunkedEP ranks completed model/gradient CPU offload, CUDA reload and a forward/backward recovery step with finite loss and zero allocator retries/OOMs. This does not qualify recovery-gradient equivalence or a recovery optimizer update.
Historical single-layer OP measurements
At
a4f2e2b4a, 32768 local tokens, EP8/top-k8, two chunks, five warmup and thirty measured repeats:These predate the router-gradient correction, exclude the model head, and are not whole-model or activation-only memory results.
Historical whole-model runs at the same older source used eight GPUs, full recomputation, identical existing linear CE, no optimizer updates, three warmup and ten measured steps. One layer/32768 tokens/one microbatch achieved 1.0263–1.0283x with allocated peak reduction 12.67–16.11%; 48 layers/16384 tokens/16 microbatches achieved 1.1302x with allocated peak reduction 5.48–9.70%. Ranges cover ranks, not confidence intervals. These must not be conflated with the 16-GPU actual-update result above.
Numerical status — unresolved
This is a Draft for external evaluation, not a claim of accepted training equivalence.
Router weight gradients now accumulate across chunks in FP32 before a single dtype conversion. A separate single-layer 32K-token full-gradient check at
83f7552e4compared 1,245,452,544 finalized optimizer-owned gradient elements: maximum absolute error 1.1921e-7; router relative L2 error 0.006774%, improved from the earlier 0.2871% diagnostic. It is not bitwise parity, and no non-bitwise tolerance has been approved.In the 48-layer actual-update run, maximum loss absolute difference was 2.4224e-4. Gradient-norm relative difference reached 9.30% after eight updates, versus 0.00685% on the initial step. The later comparison is at independently updated weights; it is not a same-weight full-gradient error. The cause remains under investigation, including a native/native repeatability baseline. Small loss differences do not establish training equivalence.
Tests and limitations
moe_act, and router auxiliary loss is disabled on this path.Usage:
experimental/lite/examples/bench/chunked_ep.md.Fork review: ISEEKYAN#225.