atlas

Research map / Architectures and efficiency / RNNs and normalization

Pfeife: Automatic Pipeline Parallelism for PyTorch

ICML 2025 · Architectures and efficiency › RNNs and normalization · approach: Distributed LLM inference systems

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Pfeife is a PyTorch torch.compile backend that automatically pipelines models across GPUs by co-optimizing graph slicing and looped 1F1B scheduling with prefetching, using critical-path cost estimation.

Problem

Large ML models do not fit in a single GPU, and existing pipeline parallelism tools need manual cutpoints, model rewriting, or only support sequential/transformer models, making automatic pipelining of general models (e.g., non-sequential Stable Diffusion) hard.

Approach

Capture the data-flow graph via TorchDynamo and jointly search graph slicing (beam search over split points) and looped 1F1B schedule parameters (loop count, loop batch, prefetch count) with a critical-path cost model, finding that uneven slicing with prefetching is often optimal.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use Pfeife instead of DeepSpeedViT-g/14 pipeline parallelism · ViT-g/14, 4 devices, 4 micro-batchesthroughput (item/s): 124.5 -> 151.4 (+22%)Helped
Use Pfeife instead of DeepSpeedViT-g/14 pipeline parallelism · ViT-g/14, 8 devices, 16 micro-batchesthroughput (item/s): 297.7 -> 282.2 (-5.5%)Hurt
Use Pfeife instead of Colossal-AILlama2-7B pipeline parallelism · Llama2-7B, 8 devices, 8 micro-batchesthroughput (item/s): 6.80 -> 7.46 (+10%)Helped
Use Pfeife instead of ZeRO3SDXL training · SDXL, 8 devices, FP32throughput (item/s): 3.22 -> 6.09Helped
Add prefetching of forward passes before the first backward pass (ablation)Pfeife pipeline schedule · ViT-g/14 pipeline parallelismlatency: 8% speedupHelped
Add a looped schedule to a schedule with prefetching (ablation)Pfeife pipeline schedule · ViT-g/14 pipeline parallelismlatency: by 9%Helped
Use uneven slicing with prefetching instead of uniform weight or time slicing (ablation)Pfeife pipeline schedule · ViT-g/14, 2 and 4 deviceslatencyHelped
Use uneven slicing without prefetching (ablation)Pfeife pipeline schedule · ViT-g/14 pipeline parallelismlatencyHurt
Use Pfeife’s predicted split points rather than the optimal split points (ablation)Pfeife pipeline schedule · ViT-g/14, 2 deviceslatencyNo clear effect
Use Pfeife’s cost model estimate rather than actual latency for schedule selection (ablation)Pfeife pipeline schedule · ViT-g/14, 2 and 4 deviceslatency: 30-40msNo clear effect
Use pipeline parallelism rather than ZeRO2 data parallelismSDXL training · SDXL, 8 devices, FP16throughput (item/s): 19.8 -> 12.1Hurt
Use pipeline parallelism rather than ZeRO2 data parallelismSDXL training · SDXL, 2 devices, FP16throughput (item/s): 3.78 -> 3.72No clear effect

Surprising findings

Limitations

Experimental setup

Benchmarks: TorchBench ViT-g/14 throughput Llama2-7B throughput Stable Diffusion XL throughput

Metrics: throughput (items/s) latency (ms) peak memory speedup

Baselines: DeepSpeed Colossal-AI ZeRO-2 ZeRO-3 Alpa PiPPy

Builds on: PyTorch torch.compile / TorchDynamo DAPPLE Megatron-LM looped 1F1B PipeDream GPipe

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy