Home · ASPLOS 2023 · Machine Learning Systems

Optimus-CC: Efficient Large NLP Model Training with 3D Parallelism Aware Communication Compression

Jaeyong Song, Jinkyu Yim, Jaewon Jung, Hongsun Jang, Hyung-Jin Kim, Youngsok Kim and 1 other

Conference
ASPLOS 2023
Published
2023
Pages
560-573
Citations
35

Training a multi-billion-parameter GPT across 128 GPUs loses a large slice of its time to inter-node communication even on 200 Gb/s InfiniBand, yet naively compressing that traffic wrecks model quality on large models — Optimus-CC compresses only what is exposed and only where errors stay correctable, shrinking pipeline backpropagation traffic with lazy error propagation (errors carried into the next micro-batch, resolved before the weight update), compressing only the un-hidden pipeline epilogue, losslessly fusing the embedding layer's two all-reduces into one, and compressing data-parallel gradients only for critical-path stages — 13.5–15% faster with identical perplexity, up to 44.9% (37.3 days down to 25.7) with a marginal quality trade.

The argument in one glance

  1. Problem

    Splitting a model three ways multiplies the network traffic

    Models like GPT no longer fit on one GPU, so training splits them three ways at once — 3D parallelism: data parallelism copies the whole model and averages gradients across copies, tensor parallelism splits each layer across the GPUs of one server, and pipeline parallelism spreads groups of layers across servers. Tensor traffic stays inside a server on fast NVLink, but data-parallel gradient exchange, stage-to-stage pipeline traffic, and a synchronization of the shared embedding layer all cross between servers. Even on a 200 Gb/s InfiniBand cluster of 128 A100 GPUs, this inter-node communication eats a large share of a training run that takes 37 days.

  2. What people did

    Compress the gradients — a rich, mature toolbox

    Gradient compression is a well-studied answer for data parallelism: send only the top-k largest gradient values, quantize gradients to a few bits (even to just -1/0/+1), or factor the gradient matrix into two thin low-rank matrices (PowerSGD). Gradients tolerate small errors because they are averaged over many samples, and error-feedback techniques re-inject what compression discarded into the next round.

  3. Why it fell short

    Wrong traffic, too much damage, and wasted compression

    Three gaps. First, all of it targets only data-parallel traffic — pipeline stage-to-stage gradients and embedding synchronization, the traffic 3D parallelism adds, were never compressed by anyone. Second, the paper's measurements show that on multi-billion-parameter models, even modest compression of data-parallel traffic raises validation perplexity unacceptably — the small-model wisdom that gradients shrug off compression stops holding. Third, pipelining already hides much of the communication behind computation; compressing hidden traffic adds error and buys zero seconds.

  4. This paper's idea

    Compress only what is exposed, only where errors stay correctable

    Optimus-CC (from Yonsei, Seoul National University, and Samsung) applies three surgical cuts. COMPRESSED BACKPROPAGATION low-rank-compresses pipeline backward traffic, made safe by lazy error propagation (the compression error is stored and added to the next micro-batch, so it is fully absorbed before the weight update — no staleness) and epilogue-only compression (only the pipeline's exposed tail is compressed; hidden traffic goes untouched). FUSED EMBEDDING SYNCHRONIZATION merges the embedding layer's two all-reduces into one — mathematically identical, so it is free quality-wise, and saves up to half the volume. SELECTIVE STAGE COMPRESSION compresses data-parallel traffic only for the stages sitting on the critical path. Results on 128 A100s: 13.5–15.1% faster with perplexity unchanged, or 44.9% faster (GPT-8.3B, 37.27 to 25.72 days) accepting a 8.10-to-8.20 perplexity change.

Why this problem is worth solving

Pretraining GPT-8.3B for 230 thousand iterations on 128 A100 GPUs takes 37.27 days. That is five weeks of a 16-server cluster — with the meter running on power, rental, and every researcher waiting behind the queue. The paper’s breakdown shows where the days go: after

the standard way to train a model too large for one GPU — combine data parallelism (several full copies of the model, each training on different data, gradients averaged so the copies stay identical), tensor parallelism (each layer’s weight matrices split across the 8 GPUs inside one server), and pipeline parallelism (groups of layers placed on different servers, micro-batches flowing through them like an assembly line)
places tensor traffic on 600 GB/s NVLink inside each server, everything that remains crosses between servers: the data-parallel gradient
the collective communication that sums a vector across N participants and leaves the sum on every one of them — the standard way data-parallel groups average gradients; its cost for volume V among R ranks is about 2V(R-1)/R
, the point-to-point activation-gradient handoffs between pipeline stages, and a small extra synchronization for the embedding layer that the first and last stages share. Even on 200 Gb/s InfiniBand — datacenter hardware most clusters envy — these three streams consume a large fraction of each iteration.

The tempting fix, gradient compression, comes with a warning label the field had not yet read. Compression research grew up on small models, where gradients absorb aggressive lossy compression with no visible harm. The authors’ motivational experiment applies a standard low-rank compressor to data-parallel traffic of GPT-2.5B: training time drops (8.00 days to 6.97 for a 125K-iteration run), but validation

the standard language-model quality metric — how surprised the model is by held-out text, lower is better; small increases correspond to real losses in downstream task accuracy
rises by an amount the paper calls unacceptable. Compressing the pipeline’s backward traffic the same naive way is worse. The prize — cutting five weeks to three and a half — requires knowing exactly which bytes can be squeezed, and which cannot.

What people did before, and where it broke

  • Top-k sparsification. Send only the k largest gradient entries. Selection costs a sort, indices must be gathered (traffic that grows with worker count), and — decisive here — top-k suits all-reduce collectives, not the point-to-point sends between pipeline stages; the paper’s top-k variant of its own idea produced worse perplexity than low-rank.
  • Quantization. Fewer bits per gradient value (TernGrad’s three values, signSGD’s sign bit, 1-bit Adam). Effective for data parallelism, but again aimed at one traffic class, and aggressive bitwidths compound the quality problem on large models.
  • Low-rank approximation (PowerSGD). Factor the gradient matrix into two thin matrices using one power-iteration step, reusing the previous factor as the starting guess. Cheap, all-reduce-friendly, with error feedback. Optimus-CC adopts it as the compressor — the contribution is not a new codec but the decision of where it may be applied.
  • All of them share two blind spots. They compress data-parallel traffic only, ignoring the inter-stage and embedding streams that 3D parallelism adds; and they compress all of it, including communication the pipeline schedule already hides behind computation — pure error, zero speedup.

How Optimus-CC works

Three traffic streams, three tailored treatments

  1. The 3D-parallel baseline (Megatron-LM)

    Tensor parallelism inside each server (8 GPUs, NVLink); pipeline stages and data-parallel groups across servers (InfiniBand). Per iteration: micro-batches flow forward/backward through stages (1F1B interleaved schedule), then each stage all-reduces its parameter gradients with its data-parallel peers, then the first and last stages synchronize the shared embedding weights. All three inter-node streams end up partly exposed on the critical path.

  2. Compressed backpropagation (pipeline backward traffic) new

    Stage-to-stage activation gradients are compressed with low-rank approximation (rank 16, roughly 10x smaller). Forward activations are NOT touched — compressing them diverges even at low rates, because activations feed directly into outputs while gradients are averaged over the whole mini-batch.

  3. Enabler 1 — lazy error propagation new

    The compression error of each micro-batch is kept in GPU memory and ADDED to the next micro-batch's gradient before that one is compressed. Because weights update only after all micro-batches of a mini-batch finish, every carried error is absorbed into the same update — no weight staleness. Provably sound when the errors are statistically independent of activation differences, a condition the paper verifies empirically (cosine similarity near zero throughout training). Memory cost about 1%.

  4. Enabler 2 — epilogue-only compression new

    Most inter-stage backward sends are already hidden behind other stages' computation; only the pipeline's tail — the epilogue, where stages drain with nothing left to overlap — is exposed. Optimus-CC compresses ONLY the epilogue traffic: same speedup (on fast interconnects the hidden sends cost nothing anyway), strictly less injected error. The ablation is stark — compressed backpropagation without this diverged.

  5. Fused embedding synchronization (lossless) new

    The embedding layer sits in both the first and last pipeline stages, so the baseline runs two all-reduces on its gradients — one across D data-parallel groups, one between the two copies. Both just sum gradients, so Optimus-CC fuses them into a single all-reduce over 2D ranks. Volume drops from V(3D-2)/D to V(2D-1)/D — 42.9% saved at D=4, approaching 50% as D grows — with bit-identical results.

  6. Selective stage compression (data-parallel traffic, optional) new

    Data-parallel compression errors ARE stale — error feedback lands after the weight update — so quality suffers. But pipeline order means later stages finish backward early and their all-reduces overlap; only the earlier stages' all-reduces sit on the critical path. So compress only those (75% of stages in the evaluation): each stage compressed moves the bottleneck to the next, giving a smooth speed-for-quality dial that beats turning the compression-rank knob.

Implemented on top of Megatron-LM in native PyTorch 1.8 — modified p2p_communications.py, schedule.py, and an overridden allreduce_gradients(); no PyTorch recompilation. Compressor: PowerSGD-style low-rank approximation.

The idea

Not all bytes are equal — compress by exposure, not by volume. The pipeline schedule already hides most communication behind computation. Compressing a hidden send saves nothing (its time was free) and still injects error into training. Optimus-CC’s discipline is to compress only traffic that sits on the critical path: the pipeline epilogue for inter-stage traffic, the early stages for data-parallel traffic. This single principle buys the same speedup as blanket compression at a fraction of the error — and it is why the naive baselines in the motivational study looked so bad, since they paid full error for partial benefit.

Errors are safe when they resolve before the weight update — and dangerous after it. The paper draws a line the compression literature had blurred. Inter-stage backward errors, handled by lazy error propagation, are carried from one micro-batch to the next within the same mini-batch: all micro-batches still see the same weights, so nothing goes stale, and the mathematics shows the accumulated gradient approximates the uncompressed one whenever compression errors are independent of how activations drift between micro-batches — a condition normalization layers make natural and the measurements confirm. Data-parallel errors have no such shelter: error feedback re-injects them only after the weights have already moved, a staleness that shows up directly as perplexity. Hence the asymmetry in the design — aggressive, quality-neutral compression on the pipeline path; cautious, optional, critical-path-only compression on the data-parallel path.

Find the traffic that can be removed exactly. The fused embedding synchronization is the quiet gem: two all-reduces that both compute sums over the same gradients collapse into one over the union of participants, with the cost model predicting 42.9% savings at four data-parallel groups and the measured reduction landing at about 40%. No approximation, no tuning, no risk — the kind of optimization that exists only if someone actually itemizes where every byte of a training iteration goes.

One iteration through Optimus-CC

GPT-8.3B, 128 GPUs, TP8 / DP4 / PP4

TP/DP/PP = tensor / data / pipeline parallel ways. Micro-batch = slice of a mini-batch flowing the pipeline (8 samples here; 512 per mini-batch). Rank 16 = low-rank compression, roughly 10x smaller traffic. Numbers from the paper's A100 cluster.

Step 1 of 6

Micro-batches stream; hidden traffic flows untouched

Forward and backward passes of successive micro-batches overlap across the four pipeline stages (1F1B schedule). Stage-to-stage sends during this steady phase are covered by other stages' computation — Optimus-CC leaves every one of them uncompressed. No exposed time, no reason to pay error.

compressing hidden traffic = error with zero speedup
the motivational study's naive baselines made exactly this mistake

Why it works

  • The pipeline schedule hides most communication → only exposed traffic (epilogue sends, early stages’ all-reduces) costs wall-clock time → compressing exactly that subset captures nearly all the speedup of blanket compression while injecting a fraction of the error.
  • Weights update once per mini-batch → an error carried from one micro-batch to the next is absorbed before any weight changes → lazy error propagation adds no staleness, and the accumulated gradient provably tracks the exact one when errors are independent of activation drift — a condition normalization makes true in practice.
  • Activations feed forward into outputs while gradients are averaged over 512 samples → the backward stream tolerates low-rank truncation but the forward stream does not → compressing only backward traffic is a principled boundary, not a heuristic (forward compression diverged at every rate tried).
  • Two all-reduces summing the same embedding gradients are one all-reduce over the union of ranks → fusing them removes 42.9% of that volume with mathematically identical output — quality risk exactly zero.
  • Low-rank compression runs at 787 Gb/s against a 200 Gb/s network → the codec is roughly 4× faster than the wire it feeds, so compression latency never surfaces — and it gets cheaper relatively as models grow, which is why the benefit scales to 175B-parameter configurations.

What it costs

  • Quality, if you take the last step. Compressed backpropagation and fused embedding are perplexity-neutral, but the headline 44.9% requires selective stage compression, whose stale errors move perplexity 8.10 to 8.20 and shave fractions of a point off zero-shot tasks. The 13.5–15.1% tier is the honest free tier.
  • Memory. Low-rank workspaces add 5–10% to peak GPU memory; the stored lazy errors add about 1% more. On memory-tight configurations this is not nothing.
  • Tuning surface. Compression ranks (16 for backpropagation, 128 for data-parallel), the 75% stage-compression fraction, and 30K warm-up iterations are empirical choices; the authors note automatic selection as future work.
  • Interconnect assumptions. Epilogue-only compression is free only when hidden sends truly cost nothing — true at 100 Gb/s and above. On slow networks (commodity Ethernet), more traffic is exposed and the exposed/hidden boundary shifts.
  • Engineering coupling. The implementation reaches into Megatron-LM’s scheduler and communication internals, and finds embedding layers by matching their names — practical, but tied to one framework’s structure.

The evaluation

Real pretraining at meaningful scale: 128 A100 GPUs across 16 servers (NVLink inside, 200 Gb/s InfiniBand HDR between), GPT-8.3B and GPT-2.5B trained the full 230K iterations on a RealNews/Wikipedia/CC-Stories/OpenWebText corpus, with quality judged by validation perplexity and five zero-shot tasks — not just throughput.

Ways to spend five weeks of cluster time

PropertyMegatron-LM baseline (no compression)Naive gradient compression (data-parallel only, everywhere)Optimus-CC (CB + FE, optionally + SC)
What gets compressed
Where compression errors landNo errors
Speedup, full 230K-iteration pretraining1.0× reference (37.27 days for 8.3B; 14.72 for 2.5B)
Model quality after trainingPerplexity 8.10 (8.3B) / 9.31 (2.5B); reference zero-shot accuracy on LAMBADA, PIQA, MathQA, WinoGrande, RACEUnacceptable perplexity rise (the paper's own motivational measurement)
Robustness across configurations—
Setup: 16 nodes × 8 A100, EPYC 7543, NVLink 600 GB/s per GPU intra-node, InfiniBand HDR 200 Gb/s inter-node; TP8/DP4/PP4; micro-batch 8, mini-batch 512; 230K iterations to the LAMBADA accuracy Megatron-LM reported. Compressor ranks: 16 (backpropagation), 128 (data-parallel), after 30K warm-up iterations; 75% stage compression.Underlined values explain themselves when clicked.

Check yourself

Check your understanding

  1. 1. Optimus-CC compresses backward inter-stage traffic (activation gradients) but refuses to compress forward traffic (activations) — the paper reports forward compression diverged at every rate tried. Predict why the two directions differ so sharply.

  2. 2. Epilogue-only compression leaves most inter-stage backward sends uncompressed — yet delivers the same speedup as compressing all of them. What makes the untouched majority free, and when would this stop being true?

  3. 3. Fused embedding synchronization is the only technique with exactly zero quality risk. Why does the fusion change nothing mathematically, and where does its 42.9% saving come from?

  4. 4. To trade speed against quality on data-parallel traffic, one could turn the low-rank compression rank up and down. Optimus-CC instead offers selective stage compression — choose WHICH stages to compress at a fixed rank. Why is stage selection the better dial?

Sources

Related papers on Machine Learning Systems

See all 212 →