Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
PR 1 of 4 — Target/Draft integration and tensor parallelism (TP). This PR implements the first part of the plan for #42. It covers all three new pairings for Qwen3-8B and DSpark (Megatron Target + Torch Draft, SGLang Target + Megatron Draft, and Megatron Target + Megatron Draft), including training, checkpoint recovery, export and strict reload. Implementation plan in #42
The remaining work is planned for three follow-up PRs.
Outcome
Adds separately selectable Target and Draft backends for dense Qwen3-8B and DSpark using upstream Megatron Core 0.20.0.
ling-aspec-megatronprofile. The default SGLang Target and Torch Draft remain independently selectable.Numerical validation
The online comparison on SM90 used 200 Open PerfectBlend prompts with Qwen3-8B responses, 100 optimizer updates and two samples per update. Within each pair, both roles used the same TP size, with the indicated Draft DP size. The runs used matching initial weights, BF16 gradients and runtime-verified deterministic native cuDNN-FE attention backward on each Draft rank. At TP2, the Torch reference used a validation-only PyTorch DTensor adapter around the existing ASpec DSpark trainer.
The loss is the optimized DSpark objective (0.1 × CE + 0.9 × L1 + confidence). Each mean averages the 100 updates. Mean relative difference is (Megatron mean − baseline mean) / baseline mean.
All three pairs also matched on per-step gradient norms and final Draft weights, FP32 masters and Adam moments. The TP1 reference used single-request prefill to match the token-row dimension in the first MLP down projection. The separate eight-sample evaluation had a −0.0001653% CE difference at TP2/DP1.
Compatibility and verification
685fb8bd970185e9ac3283fe32a5d6667bf4b268.