Home
ArenaGraphSignalTopics
/Large Language Model Infrastructure: Building and Deploying Production AI Systems
Chapter 6 • Module 1 9 min breakdown +15 XP Module

Multi-GPU LLM Scaling: Memory Limits, Interconnects, and NVLink vs PCIe

When model parameters exceed the High Bandwidth Memory (HBM) capacity of a single GPU, the model must be partitioned and distributed across a cluster of interconnected accelerators.

For example, serving the unquantized Llama 3 70B model in 16-bit precision requires of static weight memory plus of dynamic KV cache—far exceeding the capacity of a single NVIDIA H100. Similarly, serving frontier models like Llama 3.1 405B ( in FP16) or DeepSeek-V3 671B requires sharding across at least 8 to 16 GPUs.

However, distributing neural network computation across multiple GPUs introduces a severe performance penalty: Inter-GPU Communication Latency. This lesson explores cluster topologies, communication bottlenecks, and the physical limits of NVLink vs PCIe.

Interactive Blueprint
Rendering diagram...

1. The Scaling Threshold: When Does a Model Exceed Single-GPU Limits?

A model must be sharded across multiple GPUs whenever:

Hardware Allocation Rule of Thumb

Model SizePrecisionMinimum Weight MemoryTarget Single GPU (80GB)Minimum Sharding Required
8B (Llama 3)FP16 (16-bit)16 GBFits easily (Leaves 60GB for KV cache)1 GPU (No Sharding)
8B (Llama 3)INT4 (4-bit)4 GBFits on budget GPU (RTX 4090 / L4)1 GPU (No Sharding)
70B (Llama 3)FP16 (16-bit)140 GBExceeds 80GB by 60 GB2 to 4 GPUs (Tensor Parallelism TP=2/4)
70B (Llama 3)INT4 (4-bit)35 GBFits on 1x 80GB GPU (Leaves 40GB KV)1 GPU (Quantized Single-Node)
405B (Llama 3.1)FP8 (8-bit)405 GBExceeds single node8 GPUs (TP=8 on HGX H100)
405B (Llama 3.1)FP16 (16-bit)810 GBExceeds 8x 80GB node16 GPUs (TP=8, PP=2 across 2 Nodes)

When an LLM layer is sharded across GPUs, the intermediate activation tensors must be synchronized at every single transformer layer using collective communication primitives (such as All-Reduce or All-to-All).

The latency of this synchronization is governed by the physical interconnect:

Interactive Blueprint
Rendering diagram...

Why PCIe Fails for Tensor Parallelism

In Tensor Parallelism (TP), every transformer layer executes two All-Reduce operations.

  • For an 80-layer model generating 1 token: .
  • Over NVLink 4 ( latency): 160 synchronizations take total.
  • Over PCIe Gen4 ( latency): 160 synchronizations take total—completely destroying real-time streaming performance.

3. The Multi-GPU Parallelism Taxonomy

To scale across multiple GPUs and nodes, AI infrastructure relies on four distinct parallelism strategies:

Interactive Blueprint
Rendering diagram...

4. Production Failure Modes and Troubleshooting Runbook

Failure Mode: NCCL Ring Deadlock During Multi-GPU Server Initialization

  • Symptom: Launching a multi-GPU vLLM instance (--tensor-parallel-size 8) hangs indefinitely on startup with no error messages, and GPU utilization sits at 100% on core 0.
  • Root Cause: The NVIDIA Collective Communications Library (NCCL) attempted to route inter-GPU communication over an misconfigured virtual network interface or blocked port (e.g. firewall blocking NCCL sockets).
  • Resolution: Set the explicit NCCL network interface and debugging environment variables in your launch scripts:
bash
Loading code editor...

5. Summary & Key Takeaways

  1. Sharding is Required for Large Models: Models exceeding 80GB of combined weight and KV cache memory must be distributed across multiple accelerators.
  2. Interconnect Bandwidth Dictates Performance: NVLink 4 () provides the ultra-low latency required for intra-layer Tensor Parallelism.
  3. Never Run Tensor Parallelism Over PCIe: 160 synchronization barriers per token over PCIe will degrade generation speed by up to .
  4. Combine Strategies for Scale: Frontier architectures combine Tensor Parallelism (intra-node NVLink) with Pipeline/Expert Parallelism (inter-node InfiniBand) to scale beyond 1,000 GPUs.
Milestone Verification

Ready for the next lesson?

Mark this module complete to record verified progress and earn +15 XP toward your architect profile.