[Was PR1912][Dev] feat(moe): Fine-grained activation offloading - #1969
Merged
lhb8125 merged 15 commits intoOct 28, 2025
Conversation
Signed-off-by: Hongbin Liu <hongbinl@nvidia.com>
Signed-off-by: Hongbin Liu <hongbinl@nvidia.com>
Signed-off-by: Hongbin Liu <hongbinl@nvidia.com>
Contributor
Author
|
/ok to test e853ad8 |
Signed-off-by: Hongbin Liu <hongbinl@nvidia.com>
Contributor
Author
|
/ok to test 2770d2b |
Contributor
Author
|
/ok to test 118e00a |
Signed-off-by: Hongbin Liu <hongbinl@nvidia.com>
Contributor
Author
|
/ok to test ee670e0 |
yanring
approved these changes
Oct 28, 2025
Contributor
Author
|
/ok to test a74f12c |
…b.com/lhb8125/Megatron-LM into hongbinl/activation_offloading_github
Contributor
Author
|
/ok to test f128365 |
Contributor
Author
|
/ok to test e2c36dd |
6 tasks
48 tasks
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.
What does this PR do ?
PR for main branch
Memory capacity are more and more important with the rising of extreme sparse MoE models like DeepSeek-V3 and Qwen3-235B. Fine-grained recomputing reduces the memory footprint at the cost of extra recomputation, while offloading could utilize the host-device bandwidth to achieve nearly zero-overhead.
The current CPU offloading strategy from TE is a layer-level strategy, which offloads the activations in a granularity of the transformer layer, which is coarse-level and hard to highlight the most prominent activations.
Fine-grained Activation Offloading targets at offloading the activation at the granularity of specific modules, so that we can calibrate the amount of offloading activation to maximize the training throughput.
Design Doc
Compared with the current cpu offloading strategy provided by TE, this PR has several advantages:
How does fine-grained offloading work with fine-grained recomputing?
Benchmark
DeepSeek-V3-proxy on H100
Setup
Results
DeepSeek-V3 on GB200 (from @hongxiaob )
Setup
Results