deepseek-ai / deepseek-ai/DualPipe

Activation Usage of Dualpipe

Open
#23 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3k
Forks
332
PR merge metrics
No merged PRs in 30d

Description

Hi! I’d like to clarify a couple of things about DualPipe's memory and bubble formula:

Activation Usage – Why “+1”?
In 1F1B, the peak activation memory is roughly PP.
But for DualPipe, it’s said to be PP + 1.
Is the "+1" simply because middle ranks process PP + 1 microbatches at peak time?
Or is it due to how the overlapping of forward and backward computation works?
For example, during the overlap_forward_backward phase, we first accumulate a forward activation (1 MB), and then free the corresponding backward activation. So in terms of memory, can we think of overlap_fwd_bwd as: Accumulate 1 MB activation then free 1MB?

Image

And also i wonder to understand, in the bubble formula for DualPipe, I noticed it includes a −3W term (where W is weight gradient computation).
Image

From my understanding, if we're replacing idle time with weight computation, shouldn't it be more like: (PP/2 - 1) * (Fwd + Input - Weight) ? (Input & Weight for Bwd_Input, Bwd_Weight)

Thanks a lot for any clarification!

Contributor guide

No contributing guide indexed for this repository

Research direction

Begin with the DualPipe implementation and the overlap_forward_backward phase named in the issue; no file or test is identified. Trace activation lifetimes and the bubble schedule, then document a clear explanation of the +1 term and −3W term, reconciling the formulas.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems, machine-learning
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.