Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends Data Parallel (DP) support and DP attention (Dp attn) to the DeepSeek MTP (Multi-Token Prediction) speculative decoding path. It fixes crashes and incorrect behavior that occur when dummy runs—used for DP synchronization—are executed alongside a drafter model.
Changes:
- Added
is_dummy_runguards around slot mapping computation and spec decode metadata calculation to prevent crashes during DP synchronization - Updated
dummy_executionanddummy_prefill_executionto capture and propagatehidden_statesthrough the drafter model for CUDA graph capture - Added defensive guards in
SpecStats._log()to prevent division-by-zero in DP edge cases, and initializednum_rejected/num_bonusintokenIDProcessor.clean()
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
atom/model_ops/attentions/aiter_mla.py |
Updated max_seqlen_qo to account for MTP tokens; wrapped slot mapping and sum token computation with is_dummy_run guards in prepare_decode |
atom/model_engine/model_runner.py |
Captures hidden_states from run_model in dummy execution paths; runs drafter model in dummy runs for CUDA graph capture; skips calc_spec_decode_metadata during dummy runs; initializes num_rejected/num_bonus in clean() |
atom/model_engine/scheduler.py |
Added ts == 0 and iv_steps == 0 early returns in SpecStats._log() to prevent division-by-zero in DP scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Motivation
Technical Details
Test Plan
Test Result
Submission Checklist