ExploreMy JigsMission
MakeMake a Jig

© JigSpace Inc. 2026

jig.comContact@JigSpace on X

GPU Clusters & Distributed AI Training

publicRemix · Free
DBy DUSK

Bilingual explainer of GPU clusters and data, tensor and pipeline parallelism

Transcript

9 steps · 5 min read
  1. 1

    Step 1: An AI training hall · AI 训练机房

    Big AI models learn inside halls of computers like this one. Each tall rack is packed with servers, and every server holds eight GPUs: chips that do millions of small sums at once. 大型 AI 模型就在这样的机房里学习。每个机架装满服务器,每台服务器有八块 GPU。

    Drag empty space to turn the hall. 拖动空白处可旋转视角。

  2. 2

    Step 2: Fast roads, slower roads · 高速互连

    The GPUs must talk to each other constantly. Inside a server, NVLink gives each GPU up to 900 GB per second. Between servers, network cables are about nine times slower, so engineers keep the busiest traffic inside one box. 服务器内部用 NVLink 高速连接;服务器之间的网络慢得多。

NVLink: 900 GB/s per H100, both directions. Network: 400 Gb/s ≈ 50 GB/s each way. 网络约慢 9 倍。

  • 3

    Step 3: Inside one server · 走进一台服务器

    Slide out a server tray and you find eight GPUs under big metal coolers. Four NVSwitch chips in the middle let every GPU talk to every other GPU at full speed. 抽出服务器托盘,可以看到八块 GPU 和四颗 NVSwitch 交换芯片,任意两块 GPU 都能高速通信。

    Modelled on an NVIDIA DGX H100: 8 GPUs, 4 NVSwitch chips, 10.2 kW. 参考 DGX H100。

  • 4

    Step 4: One GPU up close · 近看一块 GPU

    Under the cooler sits the H100 chip. Its 132 streaming multiprocessors (SMs) are small engines that all work at the same time. Beside the chip, five stacks of HBM3 memory hold 80 GB and feed it 3.35 TB every second. 芯片上有 132 个流式多处理器同时计算,旁边的 HBM3 显存容量 80 GB。

    80 billion transistors on one 814 mm² die. 一颗芯片上有 800 亿个晶体管。

  • 5

    Step 5: Too big for one GPU · 一块 GPU 装不下

    Training a 7-billion-parameter model needs about 112 GB for its parameters, gradients and optimizer notes. One GPU has only 80 GB, so the stack spills over. Split across eight GPUs, each needs only 14 GB, but now they spend time talking. 训练一个 70 亿参数的模型约需 112 GB,单块 GPU 只有 80 GB;分给八块 GPU,每块只需 14 GB。

    More GPUs is faster, but not 8 times faster: sharing results takes time. 通信也需要时间。

  • 6

    Step 6: Data parallelism · 数据并行

    Every GPU keeps a full copy of the model and studies a different slice of the training data (cyan). Each finds its own gradients, the hints for improving the model (purple). All-Reduce then averages those hints around a ring, so every copy makes the same update. 每块 GPU 保存完整模型,处理不同的数据,再通过 All-Reduce 同步梯度。

    Try a slow GPU: everyone must wait for it before syncing. 慢的 GPU 会让其他 GPU 等待。

  • 7

    Step 7: Tensor parallelism · 张量并行

    When one layer is too large, its grid of numbers (a tensor) is cut into slices. Four GPUs each multiply their slice at the same time, then All-Reduce combines the partial answers after every layer. This chatter is constant, so it stays on fast NVLink inside one server. 把一层的参数矩阵切开,四块 GPU 各算一部分,再合并结果。

    Typical tensor-parallel groups use 2 to 8 GPUs. 通常 2 到 8 块 GPU 一组。

  • 8

    Step 8: Pipeline parallelism · 流水线并行

    Here each GPU holds different layers, like stations on an assembly line. Small batches flow forward through the stations, then their gradients flow back. GPUs wait at the start and end; these idle gaps are called the pipeline bubble. 每块 GPU 负责不同的层,小批次数据像流水线一样依次传递;空闲等待叫做流水线气泡。

    Only activations pass between neighbours, so stages can sit in different servers. 相邻阶段只传激活值。

  • 9

    Step 9: All three together · 三者结合

    Real training runs combine all three. Tensor parallelism stays inside each server, pipeline stages span neighbouring servers, and data parallelism copies the whole arrangement across racks. Thousands of GPUs then learn as one. 真实训练把三种并行结合起来:服务器内张量并行,服务器间流水线并行,机架间数据并行。

    For example, 64 GPUs = 4 tensor × 4 pipeline × 4 data. 例如 64 = 4 × 4 × 4。