---
title: "Demystifying the Communication Characteristics for Distributed"
description: "How distributed Transformer training moves data between GPUs, and what Frontier experiments reveal about message sizes, parallelism…"
canonical: "https://research.elamur.ai/free/en/papers/anthony-2024-demystifying-communication-characteristics-distributed-transformer/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/anthony-2024-demystifying-communication-characteristics-distributed-transformer/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2024](https://md.research.elamur.ai/free/en/papers/2024/) / Demystifying the Communication Characteristics for Distributed Transformer Models

# Demystifying the Communication Characteristics for Distributed Transformer Models

Paper · 2024 · Quentin Anthony, Benjamin Michalowicz, Jacob Hatef et al.

**Authors:** [Quentin Anthony](https://md.research.elamur.ai/free/en/authors/quentin-anthony/), Benjamin Michalowicz, Jacob Hatef, Lang Xu, Mustafa Abduljabbar, Aamir Shafi, Hari Subramoni and Dhabaleswar Panda · **Year:** 2024 · **Venue:** arXiv:2408.10197 · **Licence:** [CC BY 4.0 (arXiv)](http://creativecommons.org/licenses/by/4.0/)

[licence](http://creativecommons.org/licenses/by/4.0/)

- [PDF](https://arxiv.org/pdf/2408.10197)
- [arXiv 2408.10197](https://arxiv.org/abs/2408.10197)

## Summary

When a training job spreads a [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) across GPUs, each worker has to exchange some of what it computes or stores. The choice of how to divide the job determines what moves. Workers processing different examples may need to combine gradients, workers holding successive layers must pass intermediate results along, and workers sharing the work inside a layer must assemble partial results. The authors study these exchanges in GPT-NeoX training runs on the Frontier supercomputer. They ask how much data moves, which operations move it, how often those operations occur, and how the answers change with the training configuration.

The study pairs communication logs with equations that describe the expected traffic. In the data-parallel experiments, ordinary distributed data parallelism and the ZeRO-1 and ZeRO-2 optimizer configurations have the same predicted communication volume per iteration, even though they organize the exchanges differently. ZeRO-3 also distributes the weights themselves, so workers have to retrieve them for computation. The resulting estimate is 50% higher than the data-parallel baseline, and the logged volumes generally agree with the predictions. The message distributions tell a complementary story. In the 1.3B-parameter ZeRO-3 run, many parameter exchanges are on the order of kilobytes, while transfers associated with gradient aggregation range from 10s to 100s of megabytes.

The sequence-length experiments hold the configuration size at 1.3B parameters and vary how many tokens go into each sequence. Allgather volume stays essentially unchanged over the reported sweep from 512 to 4096 or higher, while the pipeline sends and receives that carry activations or their gradients grow with sequence length. Longer sequences are also associated with higher per-GPU throughput in the tested runs, and the tested tensor-parallel setting reaches up to almost 2x the per-GPU throughput of the pipeline setting. In the pipeline traces, some small receives at the start of a run take unusually long. Together, these observations explain why total volume, the size and timing of individual messages, and achieved throughput tell different parts of the story.

## Deep dive: Demystifying the Communication Characteristics for Distributed Transformer Models

How distributed Transformer training moves data between GPUs, and what Frontier experiments reveal about message sizes, parallelism, and throughput. · about 31 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### A training job has to move what it divides

A GPU can calculate its assigned part of a training step only when it has the data that part requires. When an entire computation is local, its intermediate results can stay on the device. Distributing the step introduces dependencies between workers. A GPU may be waiting for the output of an earlier layer, for other workers’ contributions to a gradient, or for a portion of the weights that it does not store locally. The cost of these dependencies matters on a machine whose training processes can share a compute node or communicate between nodes. The paper approaches scaling from this perspective of [GPU and parallel computing](https://md.research.elamur.ai/free/en/topics/gpu-parallel-computing/).

A single utilization figure can show the consequences of time spent outside useful computation, but it cannot identify the messages a communication library should handle better. The authors give MegaScale as an example of the scale at which this question matters. That work reports 55.2% Model FLOPs Utilization for training a 175-billion parameter network on 12,288 GPUs. Model FLOPs Utilization expresses how much of the available floating-point capacity goes towards the training computation. The figure belongs to a separate study, whose emphasis includes co-designing the training software and hardware for efficiency and stability. [MegaScale](https://md.research.elamur.ai/free/en/papers/jiang-2024-megascale-scaling-large-language-model/)

The authors also motivate their own study with single-iteration breakdowns for 13-billion and 20-billion parameter GPT-2-based configurations. Both use ZeRO-1 and 8 tensor-parallel stages. These illustrations show why it is worth looking inside the communication portion of an iteration as workloads grow. A breakdown by operation can tell an engineer whether the pressure comes from group coordination, from traffic between particular workers, or from several kinds of exchange at once. A distribution by message size gives more detail, since a substantial share of the bytes can travel through a very different set of operations from the ones that account for many calls.

This distinction is important because each call has latency as well as a data-transfer cost. The total volume tells a reader how much data the chosen accounting includes. It leaves open whether that data travels in many small messages, a smaller number of large messages, or a mixture. The designation of a call as a send or receive adds another detail, since the two ends may record different behavior even when they participate in the same logical transfer. The authors therefore treat the type of operation, the size distribution, and the frequency of calls as separate properties of the workload.

#### Where the communication comes from

The architecture gives the authors a way to predict which of those properties should change. A Transformer layer uses attention to combine information across positions in a sequence, followed by a feed-forward block that transforms the resulting representation. The paper describes how later architectures can use the encoder side or the decoder side of the original design, citing BERT and GPT-2 as examples. In the configurations analyzed here, the representation passed through the stack has axes for the sequence, the examples processed together, and the features used to represent each position. The layout provides a natural unit for reasoning about the intermediate values that cross many parallel boundaries. [Attention Is All You Need](https://md.research.elamur.ai/free/en/papers/vaswani-2017-attention-all-need/) · [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/)

Data parallelism divides the examples. Workers hold replicas of the computation, run it on different pieces of the training batch, and combine their gradients before updating the weights. A gradient tells the update procedure how the training loss responds to a change in a weight. Each worker sees only its own examples, so the gradients computed by that worker supply only part of the information needed for a shared update. The paper describes this arrangement as capable of bringing more workers to bear on the training data, while storing a copy of the training state on each worker imposes a memory requirement. Growing the global batch size, which counts the examples across workers, can also require changes to training settings to obtain convergence.

Pipeline parallelism divides the layers. Each stage has a consecutive portion of the computation, and a stage passes its output to the next one. In the backward pass, the gradient of that output travels in the reverse direction. The authors describe prior work on reducing pipeline bubbles, periods when a device is idle because a stage has yet to receive what it needs or has completed the work currently available to it. A pipeline schedule can keep stages busier by handling separate pieces of the batch, but the dependencies between layers still determine when a particular transfer can happen.

Tensor parallelism divides work within a layer. A large matrix calculation can be distributed across workers by assigning portions along its rows or columns. Workers then exchange the results needed for the rest of the computation. The paper points to implementations that divide both the attention block and the feed-forward block. It also explains why tensor-parallel groups commonly stay inside a compute node, where the authors say the links usually have higher bandwidth than links between nodes. This placement matters because the group coordinates repeatedly as it works through the layers.

These strategies can be used together. A training job can have multiple copies processing different examples, a pipeline inside each copy, and several workers sharing a layer within a stage. The paper calls the combination 3D parallelism. It allows a job to use more workers without making every additional worker part of the data-parallel batch dimension. In return, the communication pattern combines exchanges with different participants and purposes. A log from this configuration needs some way to distinguish a transfer between stages from a collective within a stage or across replicas.

#### What earlier systems studies measured

The paper places its investigation in a line of work that characterized deep neural network training on CPU and GPU systems, compared training performance in PyTorch and TensorFlow, and examined training with CUDA-aware MPI libraries. It also describes earlier work on Frontier that compared the performance of different architectures. The question in the present study is narrower than a comparison of entire systems. The authors want to know which changes in the placement of training work explain changes in the types and sizes of communication calls.

Other studies of large training installations had noted communication overhead as part of broader performance problems. The authors distinguish their work from a study of large-scale training on NVIDIA DGX clusters that emphasized utilization of a 200Gb/s network. As the paper describes it, that study examined performance as scale changed. The Frontier study asks how traffic itself changes across data, pipeline, and tensor parallelism, and how the choice interacts with sequence length. This gives the comparison a workload-level focus even though the observations come from a particular software stack and machine.

Framework, placement, and communication library all matter to that question. A framework may make a call for initialization or housekeeping that has no counterpart in a simplified account of a training iteration. Different placements may put the same kind of exchange on different links. The authors respond by pairing an analytical description, which assigns traffic to a dependency in the training computation, with traces that include the calls the framework actually made. The theory supplies expected volumes for the exchanges it covers. The traces show which of those expectations describe the run and where other activity appears.

### The method, step by step

#### Follow the data through a training step

The method begins with a training configuration and asks what information must reach each worker. Input tokens are mapped to vectors through an embedding table. Position embeddings supply information about where tokens occur. From there, the intermediate representation carries a value for each combination of sequence position, example in the microbatch, and feature. A microbatch is the part of a batch that is processed together in a pass through the relevant computation. Its size matters for the shape of the values exchanged during that pass.

A layer performs attention and then applies a multilayer perceptron, or MLP, to its representation. In the configurations discussed by the paper, that block expands the hidden dimension before projecting it back. The representation that passes to the next layer has the same shape as the one that entered. The last projection maps the output to the vocabulary dimension so the training procedure can calculate cross-entropy loss. The forward pass produces intermediate values and ultimately the loss. The backward pass uses the loss to calculate gradients through the layers. The weights and the values passed between layers thus provide different starting points for a cost estimate.

The authors next identify which workers participate in each necessary exchange and classify the operation. Point-to-point communication connects a sender and a receiver. A collective is an operation performed by a group of ranks, where a rank identifies a participating training process. In an Allreduce, the group combines contributions and makes the result available to each member. In an Allgather, the group assembles portions owned by different ranks and gives every member the assembled data. Reduce scatter combines contributions but leaves each rank with only an assigned portion of the result. A Reduce delivers the combined result to a designated participant. Broadcast starts with data at a designated participant and distributes it to the group.

This vocabulary lets the authors distinguish the intended exchange from its appearance in a trace. A log entry might record a collective with a given message size. To relate it to the training computation, the authors consider which workers need that data and whether the payload consists of parameters, gradients, or intermediate values. The analytical calculation then counts the transfers attributable to the corresponding part of the iteration, using the size of that payload. The measurements retain the different categories of calls, so the comparison can reveal traffic outside the simplified calculation.

How the study characterizes training communication The steps in order.

#### Count the weights that can be exchanged

The first calculation estimates how many parameters, or learned values, the training configuration contains. It separates input embeddings from the output projection. Each of those maps between the vocabulary and the hidden dimension. Sharing the weights of those maps would change the count. The authors use untied embeddings, meaning that the two maps have their own weights. The calculation also gives each position a learned embedding, counts the learned pieces of the repeated layers, and includes a final normalization term.

```
P = 2Vh + sh + L(12h² + 8h) + 2h
```

Here `P` is the parameter count, `V` is vocabulary size, `h` is the hidden dimension, `s` is sequence length, and `L` is the number of Transformer layers. Juxtaposition denotes multiplication, `²` squares the hidden dimension, and the plus signs add the parameter groups. The first `2` counts the separate input and output weight tables, and `sh` counts the position embeddings. Inside the repeated layer term, `12h²` counts the attention and feed-forward matrices, while `8h` accounts for the per-layer gains and biases in the paper’s tally. The final `2h` counts the gains and biases of the last normalization.

The square in the layer term comes from projections whose dimensions both depend on hidden width. The attention contribution consists of four matrices with dimensions `h` by `h`. For the feed-forward block, the intermediate dimension expands by a factor `x`. One linear map takes values to that wider dimension. The other takes them back to the original width. The authors give the relationship for those maps as follows.

```
2xh² = 8h²
```

Here `x` is the feed-forward expansion factor and `h` is the hidden dimension. The `2` counts the two projections, `²` squares the hidden dimension, and the equality uses the GPT-NeoX expansion factor of `4`, giving the coefficient `8`. This contribution combines with the attention matrix count in the term for each layer. Knowing why width enters this way helps explain why parameter count is a useful predictor of exchanges involving gradients or weights, even though it is a less direct predictor of the size of a message carrying intermediate values.

The paper also defines `a` as the number of attention heads. A head computes one part of the attention calculation. That variable does not appear separately in the parameter expression, which counts the dimensions of the projection matrices. It still matters when the implementation assigns attention work across ranks. In the experiments, the division of heads determines whether one of the tensor-parallel configurations can run.

#### Account for data-parallel and ZeRO traffic

In the cost equations, a message size represents a quantity of data elements. The paper expresses the iteration totals in parameter units. This convention makes it possible to relate the totals to the parameter count or the shape of an intermediate representation. Reading the equations as byte counts would require knowing the representation used to transmit the elements. The paper's description of ZeRO++ is one reason that distinction matters, since it describes quantization as a way to transmit some exchanged values using smaller messages.

The cost account uses a group-size factor to describe collectives. The amount for Allreduce corresponds to a reduction and a distribution of the result. The authors write its volume in terms of a message size and the participant count.

```
C_AR = 2 × m × (d − 1) / d
```

Here `C_AR` is the communication volume assigned to an Allreduce, `m` is the message size, and `d` counts the participating devices in the data-parallel setting. The `2` reflects the two parts of the Allreduce accounting. The minus sign subtracts the participant's local share in the group factor, `/` denotes division, and `×` denotes multiplication. The fraction makes the cost depend on the number of participants as well as the logical message size.

For Allgather, reduce scatter, and Reduce, the paper uses a single copy of the basic group-size term.

```
C = m × (d − 1) / d
```

Here `C` means the volume assigned to any one of those operations in the analytical account, `m` is its message size, and `d` is the group size. The subtraction by `1` and division by `d` form the same group-size factor as before. The multiplication sign applies that factor to the size of the payload. The equality gives the amount for a single operation of the listed type.

In ordinary distributed data parallelism, abbreviated DDP, each worker computes gradients for its share of the data and contributes them to an Allreduce. The resulting volume per iteration follows from treating the gradient payload as proportional to the parameter count. ZeRO, short for Zero Redundancy Optimizer, changes where training state is held. Its stages are additions to the partitioning scheme.

ZeRO-1 partitions optimizer state across the data-parallel ranks. Optimizer state consists of values kept by the update procedure in addition to the weights it is updating. Under this arrangement, a rank is responsible for updating its own portion. The updated weights then have to be made available to the group. ZeRO-2 also partitions the gradients. Reduce scatter combines their contributions and leaves the relevant result with the rank responsible for that portion. The rank can release gradient storage after the reduction as described in the paper. The accounting for ZeRO-1 and ZeRO-2 treats the gradient Allreduce as replaced by the corresponding reduce scatter and Allgather exchanges.

```
C_DP = 2 × P × (d − 1) / d
```

Here `C_DP` is the predicted iteration volume for DDP, ZeRO-1, or ZeRO-2. `P` is the parameter count and `d` is the number of participating data-parallel devices. The `2` counts both parts of the data movement, whether represented as the Allreduce or as the pair of collective operations in the ZeRO account. The subtraction and division give the group-size factor, and the multiplications scale it by `P` and the operation count. This is an equality of predicted volume. It leaves open the frequency, size, and timing of the calls used to realize that volume.

ZeRO-3 also divides the weights. A rank can begin with only its share, so the computation needs to gather weights when they are used. The description of the implementation discusses obtaining parameters for forward and backward computation. Relative to the preceding volume account, the paper includes an additional parameter Allgather and writes the resulting iteration total this way.

```
C_Z = 3 × P × (d − 1) / d
```

Here `C_Z` is the predicted ZeRO-3 iteration volume, `P` is the parameter count, and `d` is the number of data-parallel devices. The coefficient `3` includes the extra parameter exchange. The subtraction by `1`, division by `d`, and multiplication by the volume coefficient and parameter count follow the same convention as in the DDP equation. The authors describe the resulting increase over the baseline as 50%.

The paper also explains the design of ZeRO++. The changes described include block-based quantization of communicated weights and gradients and keeping another parameter partition within a compute node. Quantization changes how much data is needed to represent the values being exchanged. The within-node copy is intended to make some parameter gathers local that would otherwise require the slower links between nodes. These design changes clarify how two runs can have similar dependencies while incurring different traffic at the level of transmitted bytes or links. The detailed comparisons of the numbered ZeRO stages use the volume equations above.

#### Account for pipeline boundaries and tensor groups

In the pipeline, the payload of interest is the intermediate representation passed across a stage boundary. It consists of the values for the microbatch, across sequence positions and hidden features. During the forward pass the values are activations, the outputs needed by the next stage. During the backward pass the transfer carries gradients of the boundary values. The paper counts the boundaries crossed by these two streams.

```
C_PP = 2bsh × (p − 1)
```

Here `C_PP` is the paper’s aggregate pipeline communication volume for an iteration, `b` is microbatch size, `s` is sequence length, `h` is hidden dimension, and `p` counts pipeline stages. Juxtaposition and `×` denote multiplication. The `2` accounts for forward activations and backward gradients, while subtraction by `1` gives the number of adjacent stage boundaries. The first stage has no earlier stage from which to receive forward activations, and the last stage has no later stage to which to send them. In the backward direction their roles reverse. The expression counts the communication required by the described pipeline and leaves out extra calls the framework may make.

This equation gives sequence length a direct role in the pipeline payload. At fixed microbatch size and hidden dimension, a longer input produces more elements at each boundary. The number of boundaries depends on how the layers are divided. The expression therefore separates a change in the amount each transfer carries from a change in how many stage transitions the work must cross. It also helps explain why the parameter count on its own cannot determine pipeline traffic. The payload is drawn from the values produced while training on particular inputs.

The tensor-parallel expression starts from a similar payload size but counts collective calls inside the layers. The authors account for 6 Allreduce operations in each layer, with 2 for the forward pass, 2 for activation recomputation, and 2 for the backward pass. Activation recomputation means generating again the intermediate values needed in backward computation. They also include an Allreduce for the embeddings. Applying the Allreduce cost to those calls gives their tensor-parallel estimate.

```
C_TP = (12L + 2) × bsh × (t − 1) / t
```

Here `C_TP` is the predicted iteration volume for tensor parallelism, `L` is the number of layers, `b` is microbatch size, `s` is sequence length, `h` is hidden dimension, and `t` counts the ranks in the tensor-parallel group. The coefficient `12` applies the Allreduce volume convention to the `6` operations per layer. The added `2` is the corresponding contribution from the embedding operation. The product `bsh` gives the message size for this accounting. Parentheses group the layer and embedding contributions and the subtraction by `1` in the rank factor. Multiplication and division apply those factors to the message size.

When tensor parallelism runs inside a pipeline, the paper changes the layer count in the tensor expression to reflect how much of the stack each stage holds.

```
L → L / p
```

Here `L` is the full layer count and `p` is the number of pipeline stages. The arrow means that the tensor-parallel expression uses `L / p`, where `/` means division. This reflects the layer allocation in the paper’s combined accounting. The authors treat the volume contributions as additive. A message going across a pipeline boundary and a collective within a stage represent different dependencies, even when both are necessary for the same microbatch to proceed.

#### Pair the equations with training traces

The training runs use EleutherAI’s GPT-NeoX framework and its configuration files, with Microsoft’s DeepSpeed providing the training instrumentation and ZeRO configurations. The workload uses the enwik8 dataset. The authors report a padded vocabulary size of 50,304 and say the padding helps reduce runtime anomalies. The training procedure matters here because it supplies realistic operations to observe. The principal outputs of the investigation are communication and throughput measurements rather than scores on a language task.

The authors use the communication logs to identify operations, count calls, group payloads by size, and total the corresponding traffic. Logs include startup traffic that the per-iteration equations do not describe, such as broadcasts used to distribute initial parameters. Looking at those calls alongside the predicted operations lets the authors distinguish what can be explained by the layout of the training computation from calls that need a framework-level explanation. It also provides a check on how broad a claim the equations can support.

DeepSpeed’s logging configuration prevents computation and communication from overlapping in these observations. Calls can therefore be profiled under a condition in which work on the GPU does not hide communication in the trace. The timing and throughput numbers describe that condition. The paper also describes an interconnect-specific approach using OMB microbenchmarks and the same communication backend used for GPT-NeoX. Those benchmarks target operations on AMD Infinity Fabric and HPE-Slingshot 11 links. A microbenchmark isolates the underlying call, while the training logs show the call sizes and mixtures that arise as the framework runs the workload.

### Experiments and results

#### The workload and the comparisons

The experiments run on the OLCF Frontier supercomputer. The main size comparisons use GPT-NeoX configurations with 19M, 125M, 1.3B, and 13B parameters. They share the enwik8 workload and padded vocabulary setting. The study asks how the communication workload varies with the training layout, parameter count, and sequence length. It does not use a held-out language benchmark for comparison. An experiment can establish that a layout moves more data or achieves higher hardware throughput under the tested conditions without measuring whether it trains to a better final result.

The data-parallel comparison uses DDP as the baseline and examines the communication associated with ZeRO-1, ZeRO-2, and ZeRO-3. There is also a comparison against the volume equations for the expected operations. The pipeline and tensor experiments compare their respective layouts and examine mixes of the two. In those cases, the authors pay particular attention to the sends and receives predicted for pipeline boundaries and the Allreduce calls predicted by the tensor-parallel account.

Several measures appear in the experiments. Total communication volume sums the logged data movement under the study’s accounting convention. Breakdown plots assign portions of the total to operation types. Message-frequency plots count how often payloads in different size ranges occur. The sequence-length experiments also report throughput in TFLOPs per GPU, a measure of achieved floating-point work per device. A higher value for that measure can coexist with higher communication volume, because changing the input length changes the computation and the messages together. The initial profiling illustrations also show the timing of computation and communication during a single iteration.

#### Data parallelism and the ZeRO stages

The parameter-based equations capture the general pattern observed in the DDP and ZeRO comparisons. Where the runs are feasible, the paper reports good agreement between predicted and logged volumes across the tested sizes. The simple account assigns the same volume to DDP, ZeRO-1, and ZeRO-2, then adds a parameter exchange for ZeRO-3. The following chart gives the analytical coefficients used in the enwik8 comparisons. Each coefficient multiplies the same parameter count and group-size factor for a fixed configuration and group. These values describe the equations rather than measured bytes.

Predicted data-parallel volume coefficients for GPT-NeoX on enwik8 Sharding the weights adds a parameter exchange and raises the predicted volume.

**The numbers**

| System or setting | Multiplier of parameter count times the group-size factor |
| --- | --- |
| Distributed data parallelism (this paper) | 2 |
| ZeRO-1 | 2 |
| ZeRO-2 | 2 |
| ZeRO-3 | 3 |

The tie in the chart concerns only predicted traffic. The sharding stages make different demands on device memory. For the 13B configuration, the authors can calculate what DDP traffic would be, but a run would exceed worker memory. The resulting value in the theoretical comparison represents a hypothetical DDP iteration. The other configurations can fit on a Frontier MI250X GPU under DDP, a fact the paper uses in discussing why Allreduce is still a significant part of the measured traffic for ZeRO-1 and ZeRO-2. The breakdown of ZeRO communication uses a single node except for the 13B configuration, whose memory requirements force a different setup.

Broadcast appears in the breakdown because the training system has to distribute initial parameters. The paper finds that broadcasts account for a decreasing share of total traffic as configuration size increases. The plotted share depends on both the startup exchange and the other logged calls. A smaller percentage establishes that broadcast occupies less of the measured mix. The study reports it as an overhead of starting the job alongside the ongoing operations associated directly with the update.

The distribution of payload sizes adds information to the totals. For the ZeRO-3 Allgather analysis, the authors compare the 19M, 1.3B, and 13B configurations on 2 nodes with 8 GCDs per node. GCDs are the GPU compute dies counted in the run configuration. As the size grows, the logs exhibit a larger range of message sizes and different frequencies across those sizes. The more detailed DeepSpeed trace allows the authors to associate many small exchanges with particular uses of the collective.

The 1.3B run gives the clearest example. Many of the exchanges used to obtain parameters have payloads on the order of kilobytes. Larger messages, ranging from 10s to 100s of megabytes, are associated with the gradient-aggregation workload. DDP would handle gradient synchronization through Allreduce. ZeRO splits training state among ranks and changes how the relevant portions are exchanged. A workload can therefore be large by parameter count and total communication volume while still placing a recurring demand on the small-message path. The size distribution makes that demand visible.

#### Pipeline and tensor parallelism

The pipeline and tensor comparisons show a wider gap between the minimal operations in the equations and the complete call mix. Within the configurations that mix these forms of parallelism, Allgather dominates the reported volume breakdown even though there are also sends and receives between pipeline stages. The pure pipeline configuration avoids that Allgather dominance. It still shows substantial Allreduce traffic, which the authors suspect comes from DeepSpeed internals. The study similarly observes more tensor-parallel communication than its equations predict and offers implementation activity as a possible explanation.

The paper therefore compares the predicted and logged volumes of the operations most directly associated with each layout. In pipeline parallelism those are the sends and receives across the stage boundaries. For tensor parallelism the focus is on Allreduce. That choice narrows the comparison to the payload whose size the equations derive. The larger operation breakdown remains important because it shows what the framework does in addition to carrying that payload. The pure tensor-parallel configuration for 125M parameters has no result because the number of attention heads is incompatible with the configured division of tensor work.

Even the comparable pipeline traces show asymmetries. The authors report up to an extra eight megabytes in send operations and suggest that the sender may have transmitted metadata. They do not establish the origin of those bytes. They also note that receiving small messages on the first iteration can take unusually long, with reported overhead in the thousands of milliseconds. They describe this as cold-cache behavior, a startup condition in which the relevant path has yet to warm up. The anomaly becomes a concern in their discussion of larger configurations using pipeline parallelism. It identifies a particular operation and timing window for investigation, while the paper leaves detailed prediction of raw performance outside its scope.

The introductory 13-billion and 20-billion single-iteration traces put these findings in context. Their ZeRO-1 and 8-stage tensor setting illustrates increased pressure from communication in the larger case. The broader experiments then give more detail about which calls make up such pressure, and which dependencies the analytical account can explain. The traces and operation breakdowns provide distinct views of the same systems problem. A time breakdown locates delays, while the volume and frequency breakdowns reveal the kinds of traffic present when those delays occur.

#### What changes with sequence length

The sequence-length comparisons use the 1.3B configuration on 2 nodes with 8 GCDs per node. Holding that workload size and placement makes it possible to examine the effect of varying the number of tokens per sequence inside the tested data-parallel and partitioned layouts. The authors report that Allgather volume, where that operation is used, does not change appreciably from 512 to 4096 or higher. Much of the Allgather traffic under study concerns training state. The volume of an exchange concerning the weights is governed chiefly by the weights and their distribution, whereas a stage-to-stage activation carries values for the tokens currently being processed.

The per-GPU throughput plot for the data-parallel and ZeRO settings shows an approximate 2-2.5x increase with the sequence lengths examined. At a given sequence length, the authors say that the ZeRO configurations more frequently reduce the reported floating-point throughput. These observations involve different comparisons. The first follows changes in throughput as the input becomes longer. The second compares choices of optimizer partitioning for the same input length. A memory-saving arrangement can still be useful for fitting the training state even when a run that fits under ordinary data parallelism achieves higher throughput.

The pipeline traffic responds visibly to longer sequences. The paper reports a 2x increase in the receive-volume comparison as sequence-length values increase. On the send side the increase is approximately a doubling or slightly larger than 2x. These figures describe the comparisons shown for the tested settings. They are consistent with the dependence of the pipeline payload on sequence length, with the send-side deviation leaving room for the ancillary traffic the authors discuss. Pure tensor parallelism has no corresponding pipeline send or receive stream.

The throughput comparison displays a setting with two pipeline stages and one with a tensor-parallel size of two. The paper reports that tensor parallelism reaches up to almost 2x the TFLOPs per GPU of pipeline parallelism in this comparison. The measured workload includes the exchange patterns of the selected layouts, as well as any idle time and coordination costs associated with those choices. The result is a comparison of the tested settings. The operation-level measurements explain which communication changes accompany it, but do not by themselves assign the throughput difference to one specific cause.

### What the ablations show

#### Memory savings change which operations are needed

The paper presents controlled comparisons of training configurations in place of a component-removal ablation. The comparisons are informative because each configuration changes who holds or computes a particular part of the training state. Varying the ZeRO stage asks what happens when ranks that previously held replicated values begin to own only shards. Comparing DDP with the earlier ZeRO stages then tests a specific expectation. The same aggregate traffic can be organized into different collective operations.

The data-parallel traces broadly support the parameter-volume account and show that the mix of operations can change at the same time. In DDP, gradients computed locally need to be combined and made available to all replicas. A sharded arrangement can instead direct the reduced gradient to the rank that needs it and gather the updated weights from the ranks that own them. The equality between the predicted volumes concerns the amount of traffic under the paper’s convention. The results leave room for different runtime behavior because the timing, grouping, and payload distribution of the calls differ.

ZeRO-3 extends this comparison to the weights. Sharding those weights introduces an availability requirement during computation. The paper attributes the higher volume to gathering the necessary parameters and finds the predicted pattern generally reflected in the measured totals. That interpretation is stronger than a correlation between size and traffic alone. The partitioning scheme determines why an extra class of exchange is necessary. The comparison still groups together all consequences of running a different ZeRO stage. It does not isolate a speed effect for any individual implementation decision within that stage.

The message-size analysis tests a related intuition that can fail. It would be easy to infer from a larger parameter count that the main communication question is how best to send very large messages. The detailed ZeRO-3 logs show frequent smaller exchanges used to obtain parameters, alongside the larger gradient-related transfers. This is evidence about what different payloads are used for within the implementation. It does not establish how much faster the job would run if any specific size range were optimized, because the authors characterize the existing calls without replacing one part of the communication stack and measuring the result.

#### Sequence length separates state traffic from activation traffic

The sequence-length comparison changes the input shape while keeping the parameter configuration and the stated node layout fixed. This gives the analytical distinction between training state and intermediate values a practical test. An activation sent to the next pipeline stage contains data for the sequence currently being processed. A gather of weights is driven by the state needed to perform the computation. The pipeline formula makes sequence length an explicit factor, whereas the data-parallel formulas work from the parameter count.

There is a subtlety in that distinction. The general parameter-count formula does include a term for position embeddings that depends on sequence length. The finding about Allgather is an observation of the logged volumes in these runs. It should not be read as an algebraic claim that the design of an arbitrary parameter tensor is independent of sequence length. The reported volumes stay essentially flat over the sweep, while the transfers containing activations or their gradients exhibit a clear increase. Those observations are enough to distinguish the behaviors of the two classes of traffic in the tested setup.

The throughput results add a separate comparison. Increasing sequence length can raise the amount of computation achieved per GPU even when some messages also grow. The per-sequence-length comparisons across ZeRO stages show that the layout chosen to manage memory can affect throughput at the same input size. The combination of these two observations explains why a volume plot alone cannot order the configurations by hardware throughput. It counts the data exchanged, while throughput also depends on what the GPUs compute and when their dependencies permit them to proceed.

#### The traces test what the equations leave out

The comparison between pipeline and tensor parallelism changes where dependent work is located. A pipeline boundary produces a direct exchange. Sharing a layer produces coordinated exchanges across the tensor group. The equations predict the volume associated with these dependencies. The actual call mix provides a check on whether those predicted forms of traffic describe the entire implementation.

In the pipeline traces, the extra Allreduce calls motivate the authors’ suspicion about DeepSpeed internals. In the tensor traces, the larger-than-predicted volume similarly motivates an implementation-level explanation. These comparisons establish that the theoretical operations leave some observed traffic unaccounted for. They do not identify every additional call’s origin. An operation-by-operation comparison is useful precisely because it can locate a discrepancy for further investigation without treating every logged byte as intrinsic to the parallelism scheme.

The early receive delays make a different point. A send and its matching receive belong to the same stage dependency, but the reported timings are asymmetric, with the startup anomaly appearing on the receive side. The authors’ small-message observation thus has two sources. In one part of the study there are many small calls associated with obtaining parameters. In another, particular small receives incur high overhead at the beginning of a run. The former concerns call frequency and payload composition. The latter concerns latency under a specific timing condition. Together they define a wider characterization than a tally of bytes or a bandwidth figure could provide.

### Limitations

#### Limits the authors identify

The authors explicitly put raw performance modeling outside the paper’s scope. Their equations estimate amounts of data for the described exchanges. They do not convert those amounts into a prediction of elapsed iteration time. The timing of individual calls, GPU scheduling, links traversed, and possible overlap with computation all affect that conversion. The paper reports an unusual receive delay and measures throughput under the experimental conditions, but offers no general runtime equation that would predict either of those from message volumes.

The profiling condition is also explicit. DeepSpeed’s communication logger prevents communication and computation from overlapping. The traces describe the operations and timing as observed with that restriction. In a run that overlaps work, some of the recorded communication may be hidden behind computation, depending on when the work and the exchange can be scheduled. The study therefore characterizes what the instrumented job generates, while the elapsed-time impact in an overlapping job is a separate measurement question.

There are gaps in the run matrix caused by feasibility. The parameter-based equation can estimate 13B DDP volume, but the authors report that a run would exhaust device memory. The measured ZeRO comparisons for the largest configuration also require a different node setup from the smaller ones. The 125M pure tensor-parallel point could not be run under the selected head distribution. These cases matter because the practical choice of a configuration begins with where the weights, optimizer state, gradients, and activations can fit and whether the partition is valid.

The authors also describe Frontier as one combination of hardware and software. They propose investigating additional approaches, including expert parallelism and further multidimensional layouts, and evaluating how the patterns change on systems such as Aurora and Vista. These proposals identify places where the same characterization could be applied. The Frontier measurements themselves establish behavior on the tested stack and placement. The paper’s discussion of Infinity Fabric and HPE-Slingshot 11 concerns the interconnect environment used for the investigation.

#### Limits apparent in the experimental setup

The broadest architectural claim supported by the experiments is about the mechanisms of communication. Dividing adjacent layers creates a need to pass activations and their gradients. Distributing weights creates a need to assemble those weights when required. The exact balance among collective and point-to-point calls is more specific. The training runs use GPT-NeoX with DeepSpeed and enwik8 on Frontier. A framework can choose different collective boundaries or perform different internal operations, so the observed call distribution is evidence for this implementation under its tested settings.

The sequence-length evidence is narrower than the main configuration-size comparison. The reported sweep uses 1.3B parameters and a fixed node and die count. The pipeline-versus-tensor throughput plot shows selected parallel degrees. It supports a comparison at those settings, including the direction of the observed throughput differences. It does not establish that the order would persist with more stages, a tensor group spread across different links, another microbatch size, or a different distribution of layers. The cost equations indicate some dependencies that would matter in such cases, while the measurements for those cases remain open.

Achieved TFLOPs per GPU also has a particular meaning. It measures floating-point throughput in these experiments. A longer sequence can raise that throughput even when it generates larger messages. The study does not tie the throughput numbers to the time or resources needed to reach a specified training loss or downstream result. The authors therefore provide an engineering characterization of the work the GPUs and communication system perform, without resolving the training-quality tradeoffs of changing the data or batch configuration.

Some explanations in the paper remain hypotheses. Additional send bytes could come from metadata. Some unexpected collectives could originate in the framework’s internal operations. The observed discrepancies are concrete, and the proposed origins are plausible interpretations by the authors. The profiling analysis does not trace those calls to a specific implementation path or disable that path to see whether the discrepancy disappears. Likewise, describing a receive anomaly as a cold-cache effect identifies its reported startup pattern. It does not establish which underlying mechanism caused the delay.

Finally, the separate treatment of initialization, message frequency, and theoretical iteration volume matters when extrapolating. A startup call contributes to the measured mix even though it has no counterpart in a formula for an ordinary training iteration. A frequented small-message path can have operational importance beyond its share of bytes, but the size of that impact depends on its placement in the computation. The results point to where the demands on communication come from. A wall-clock comparison for a particular deployment would need the conditions of that deployment, including the sharing of links and the opportunity for overlap.

### What came after

The paper’s follow-up agenda includes applying the same measurements to additional parallel layouts and to systems with different processors, accelerators, and communication software. Expert parallelism would extend the examination beyond the data, pipeline, and tensor configurations measured here. Aurora and Vista are named as possible settings for testing how the observed behavior changes on other hardware and software stacks.

No later citing study is documented here, so these directions remain proposals in the paper’s conclusion. The open empirical question is which parts of Frontier’s measured communication mix recur elsewhere, including the frequent small parameter exchanges, the extra collectives in framework traces, and the early delays on pipeline receives.

## Cite

Cite as Quentin Anthony, Benjamin Michalowicz, Jacob Hatef, Lang Xu, Mustafa Abduljabbar, Aamir Shafi, Hari Subramoni and Dhabaleswar Panda. 2024. Demystifying the Communication Characteristics for Distributed Transformer Models. arXiv:2408.10197.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2408.10197](https://doi.org/10.48550/arxiv.2408.10197) · [arXiv 2408.10197](https://arxiv.org/abs/2408.10197)

```bibtex
@misc{anthony2024demystifying,
  title = {{Demystifying the Communication Characteristics for Distributed Transformer Models}},
  author = {Quentin Anthony, Benjamin Michalowicz, Jacob Hatef, Lang Xu, Mustafa Abduljabbar, Aamir Shafi, Hari Subramoni and Dhabaleswar Panda},
  year = {2024},
  doi = {10.48550/arxiv.2408.10197},
  eprint = {2408.10197},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2408.10197}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
