Characterizing Communication Patterns in Distributed Large Language Model Inference

Lang Xu, Kaushik Kandadi Suresh, Quentin Anthony, Nawras Alnaasan, Dhabaleswar K. Panda

Abstract

Distributed inference for Large Language Models (LLMs) is increasingly critical as model sizes exceed the memory capacity of individual GPUs. While communication patterns in LLM training are well-studied, inference presents unique challenges due to its two-phase nature and autoregressive decoding. This paper provides a systematic characterization of communication bottlenecks in distributed LLM inference. By combining analytical modeling with empirical profiling on NVIDIA H100 clusters using the vLLM framework, we analyze the impact of Tensor Parallelism (TP), Pipeline Parallelism (PP), and hybrid strategies. Our findings reveal that the decode stage dominates communication volume and that improper parallelism layouts, such as inter-node Tensor Parallelism, can lead to catastrophic latency spikes.

Introduction

The deployment of Large Language Models (LLMs) at scale requires sophisticated distributed systems. As models grow to hundreds of billions of parameters, they must be partitioned across multiple GPUs. However, the communication overhead introduced by these partitions often becomes the primary performance bottleneck, especially during the low-compute intensity phases of inference.

Unlike training, which processes large batches of data in parallel, inference is characterized by two distinct phases: prefill and decode. The prefill phase processes the entire input prompt to generate the initial Key-Value (KV) cache, while the decode phase generates tokens one by one in an autoregressive manner.

The prefill phase processes the input prompt in parallel, while the decode phase uses the KV cache to generate tokens autoregressively.

Parallelism Strategies

To fit large models into memory, practitioners use various parallelism strategies. The two primary methods are Tensor Parallelism (TP) and Pipeline Parallelism (PP).

  • Tensor Parallelism (TP): Splits individual layers (tensors) across multiple GPUs. This requires frequent synchronization (e.g., All-Reduce) after every sub-layer operation. This method is highly effective within a single node where high-speed NVLink is available.
  • Pipeline Parallelism (PP): Assigns different layers of the model to different GPUs in a sequence. Communication occurs only at the boundaries between groups of layers, making it more bandwidth-efficient but introducing sequential dependencies.
Comparison of a standard sequential model with Pipeline Parallelism (splitting layers across GPUs) and Tensor Parallelism (splitting individual layers).

Methodology

We employed a dual-track approach to characterize these patterns. First, we derived analytical models to predict communication volume based on model architecture (hidden dimensions, layers) and sequence length. Second, we performed empirical profiling on the OSC Cardinal supercomputer, utilizing NVIDIA H100 GPUs connected via NVLink and InfiniBand. We evaluated three dense transformer models: Llama-3.2-3B, Llama-3.1-8B, and Llama-2-13B, focusing on single-request scenarios to isolate communication patterns.

Key Findings

The Decode Stage Bottleneck

Our analysis shows that the decode stage is the primary driver of communication overhead. For a typical sequence length of 128 tokens, the decode stage generates approximately 127 times more communication operations than the prefill stage. This is because each generated token requires a full pass through the distributed model, triggering all necessary synchronization events.

The "Inter-node Trap"

While Tensor Parallelism is highly effective within a single node, scaling it across nodes can be detrimental. For example, moving from TP=4 (intra-node) to TP=8 (across two nodes) can cause latency to spike from ~200ms to over 1500ms. The high-frequency, moderate-sized messages typical of inference communication are highly sensitive to the higher latency and lower bandwidth of inter-node networks like InfiniBand compared to NVLink.

Pipeline Parallelism Trade-offs

Pipeline Parallelism is "quiet" in terms of total data transferred, making it suitable for bandwidth-constrained environments. However, it introduces significant "pipeline bubbles"—idle periods where GPUs wait for data from previous stages. For Llama-3.2-3B, increasing PP from 2 to 8 across nodes caused latency to balloon from 0.69s to 4.98s, demonstrating that PP is often slower than TP for latency-sensitive tasks.

Conclusion

Optimizing LLM inference requires a deep understanding of the trade-offs between different parallelism strategies. While TP offers the lowest latency within a node, PP or hybrid TPxPP configurations are necessary for scaling beyond a single node. Future work will explore the impact of continuous batching and Mixture-of-Experts (MoE) architectures on these communication patterns.

Summary updated

BibTeX
@inproceedings{xu2025characterizing,
  author = {Lang Xu and Kaushik Kandadi Suresh and Quentin Anthony and Nawras Alnaasan and Dhabaleswar K. Panda},
  title = {{Characterizing Communication Patterns in Distributed Large Language Model Inference}},
  booktitle = {Hoti},
  year = {2025},
  doi = {10.1109/hoti66940.2025.00025},
}
Figure