Add DualPipeV - #8576
Open
phoeenniixx wants to merge 5 commits into
Open
Add DualPipeV#8576phoeenniixx wants to merge 5 commits into
DualPipeV#8576phoeenniixx wants to merge 5 commits into
Conversation
Signed-off-by: Aryan Saini <116151399+phoeenniixx@users.noreply.github.com>
phoeenniixx
requested review from
loadams,
tjruwase and
tohtana
as code owners
September 17, 2026 17:52
Author
|
FYI @delock @ehartford |
delock
self-requested a review
September 18, 2026 14:23
Author
|
Hi @delock, can you please review this PR whenever you have some time. |
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.
Implements
DualPipeVfromDeepSeekteamPart of #7100.
This adds DualPipeV, the V-shaped schedule from DualPipe, as an opt-in alternative to 1F1B. Existing pipeline users are not affected. A model opts in by building a
DualPipeVModuleinstead of aPipelineModule.Changes
DualPipeVModule, which cuts the model into2Pstages and builds stagesrand2P-1-ron rankr.DualPipeVEngine, a child ofPipelineEngine. It replaces only the send and receive methods with batchedisend/irecv.DualPipeVSchedule, which follows the eight steps of the referencedualpipev.py.P2POpandbatch_isend_irecvtodeepspeed.comm.PipelineEnginegets three small hook methods for the schedules and the loss rank, andPipelineModulereadsself.num_stageswhen partitioning. Neither changes 1F1B behaviour.nn.Sequential.I also tried it using a small experiment on Kaggle's 2 T4 using this scipt. See the results here
Limitations
gradient_accumulation_stepsmust be at least twice the number of pipeline ranks.dynamic_shape,pipe_partitioned,grad_partitionedand boolean attention masks are not supported.Follow-ups
If this approach is accepted, I plan to raise follow-up PRs for:
DualPipeVEngine(maybe move the common parts to a common base class in future?) and needs a secondsteps()generator plus data loading and loss on both end ranks.