← all repositories
deepseek-ai/DualPipe

A pipeline schedule that overlaps forward, backward, and networking

DualPipe rearranges pipeline-parallel training so forward and backward passes run bidirectionally, overlapping computation and communication to shrink idle bubbles.

3k stars Python ML FrameworksLanguage Models
DualPipe
Not currently ranked — collecting fresh signals.
star history

What it does

DualPipe is a scheduler for pipeline-parallel GPU training that sends micro-batches through ranks in both directions at the same time. It interleaves forward chunks, backward chunks, and weight-gradient communication so they share time windows rather than queueing sequentially. The repo also includes DualPipeV, a folded variant that preserves the same bubble reduction with fewer pipeline-parallel devices.

The interesting bit

The README lays out the trade-offs in a comparison table: versus classic 1F1B, DualPipe roughly halves the bubble penalty, but stores 2× parameters per device and one extra activation buffer. DualPipeV keeps the identical bubble formula while halving device count—a reminder that the most expensive part of training is often the real estate you leave idle.

Key highlights

  • Bidirectional scheduling overlaps forward and backward execution on the same stages
  • Ships with both the full DualPipe schedule and the condensed DualPipeV variant
  • Requires PyTorch 2.0+ and a user-written overlapped_forward_backward method for real models
  • Extracted from the DeepSeek-V3/R1 training stack, not a clean-room research prototype

Caveats

  • The code provides scheduling logic and examples, not a turnkey trainer; you must integrate your own overlapped forward-backward implementation
  • Memory footprint per device is strictly higher than simpler schedules (2× parameters, PP+1 activations)
  • The comparison formulas assume an even number of pipeline stages

Verdict

Study this if you are building or debugging a pipeline-parallel training framework for large models. Pass if you need a drop-in scheduler that works without custom kernel wiring.

Frequently asked

What is deepseek-ai/DualPipe?
DualPipe rearranges pipeline-parallel training so forward and backward passes run bidirectionally, overlapping computation and communication to shrink idle bubbles.
Is DualPipe open source?
Yes — deepseek-ai/DualPipe is open source, released under the MIT license.
What language is DualPipe written in?
deepseek-ai/DualPipe is primarily written in Python.
How popular is DualPipe?
deepseek-ai/DualPipe has 3k stars on GitHub.
Where can I find DualPipe?
deepseek-ai/DualPipe is on GitHub at https://github.com/deepseek-ai/DualPipe.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.