PROMETHEUS OS
NATIVE AI OPERATING SYSTEM
[INIT] Prometheus OS loading...
[CORE] Neural interface initializing...
[AI] LLM router connecting...
[MEM] Memory graph loading...
[AGT] Agent chains on standby...
[SEC] Security protocols active...
[NET] Provider mesh established...
[UI] Workspace rendering...
[DONE] All systems nominal.
Welcome to PROMETHEUS OS.
READY · OFFLINE · SECURE · PRIVATE
🎨 THEME ENGINE
PROMETHEUS OS · 23 THEMES
Trial version: Dark + Light themes only.
Full theme access with PROMETHEUS OS license.
Dark theme active
Experience all 23 themes in PROMETHEUS OS

Datacenter AI Hardware: GPUs, Accelerators, Interconnects and Rack-Scale Systems

Advanced 18 min· 4 exercises

Reason quantitatively about datacenter AI hardware: use the roofline model to predict whether a workload is compute- or bandwidth-bound, compare current accelerators and interconnects, and explain what actually limits large-scale training and inference.

By the end of this lesson you will be able to
  • Explain how a modern GPU is organized (streaming multiprocessors, tensor cores, register file, shared memory, L2, HBM) and why the memory hierarchy dominates performance.
  • Apply the roofline model to compute arithmetic intensity and attainable throughput for matrix multiplication and LLM decoding.
  • Compare the current datacenter accelerator families from NVIDIA, AMD, Google and AWS on memory capacity, bandwidth and scale-up domain size.
  • Distinguish scale-up interconnects (NVLink, ICI, NeuronLink) from scale-out networks (InfiniBand, Ethernet with RoCE) and estimate collective-communication time.
  • Estimate training time and memory needs from model size and token count, and identify whether training or inference is limited by compute, memory capacity, bandwidth or communication.

Before this: AI Hardware Explained, Tokens per Second: Estimating Local AI Speed, Clustering and Multi-GPU Setups, Scaling Laws and Compute-Optimal Training

Every frontier model is trained and served on datacenter accelerators: GPUs and custom chips packed into liquid-cooled racks and wired together with networks that move terabytes per second. If you build, buy or operate AI systems, you will constantly face questions like "why is my GPU only 30% busy?", "how many chips do we need for this training run?" and "why is decoding slow when the spec sheet promises petaflops?". This lesson gives you the mental model and the arithmetic to answer them.

Intuition: a kitchen with a very slow pantry

Picture a restaurant kitchen. The chefs are the arithmetic units: they can chop extraordinarily fast. Each chef has a tiny cutting board (registers) and the station shares a countertop (on-chip shared memory and caches). Ingredients live in a walk-in pantry down the hall (HBM, the high-bandwidth memory stacked next to the chip). Other kitchens in the building are reachable by a dumbwaiter (NVLink), and kitchens in other buildings by delivery trucks (the datacenter network).

The chefs are so fast that they are almost always waiting for ingredients. A dish that needs a lot of chopping per ingredient (a large matrix multiplication) keeps chefs busy. A dish that needs one chop per ingredient fetched (generating one token for one user) leaves them idle while runners shuttle between pantry and counter. Almost all of AI-hardware engineering is about keeping the chefs fed: bigger, faster pantries, more counter space, smarter recipes that reuse ingredients, and faster dumbwaiters between kitchens.

How a datacenter GPU is organized

Compute: SMs, warps and tensor cores

An NVIDIA GPU is built from many streaming multiprocessors (SMs); AMD calls the equivalent unit a compute unit (CU). An H100 SXM has 132 SMs. Each SM executes groups of 32 threads called warps in lockstep (single instruction, multiple threads). Inside each SM are general-purpose floating-point/integer units ("CUDA cores") and tensor cores, specialized units that perform small matrix multiply-accumulate operations, such as multiplying tiles of BF16 values and accumulating in FP32, in a single instruction. Nearly all of a modern accelerator's headline FLOPS come from tensor cores; the general-purpose units handle element-wise work like activations and normalization at a small fraction of that rate.

Tensor-core throughput roughly doubles each time the number format halves: BF16/FP16 (16-bit), FP8 (8-bit) and, on Blackwell-generation and newer chips, FP4 formats (NVIDIA's NVFP4 and the OCP MXFP4 microscaling format). Two cautions when reading spec sheets:

  • Sparsity: many vendor peak numbers assume 2:4 structured sparsity (two of every four weights are zero). Dense throughput is half. Real models are rarely run with 2:4 sparsity, so use the dense figure.
  • Peak vs achieved: the peak assumes perfect tiling and no stalls. Well-tuned large-model training typically achieves well under the peak; the ratio of achieved to peak is called model FLOPs utilization (MFU).

Memory hierarchy

LevelTypical size (per GPU)Relative bandwidthWho manages it
Registers~256 KB per SMHighestCompiler
Shared memory / L1~hundreds of KB per SMVery highProgrammer/compiler (tiling)
L2 cacheTens of MB (50 MB on H100 SXM)HighHardware
HBM80-288 GB3-8 TB/s on current partsFramework / allocator
Host DRAM / other GPUsTBs0.05-1.8 TB/s per linkRuntime / communication library

HBM (high-bandwidth memory) is DRAM stacked vertically and placed on the same package as the compute die, connected by a very wide bus. It is what gives an H100 SXM about 3.35 TB/s and Blackwell-class parts roughly 8 TB/s. Capacity decides what fits; bandwidth decides how fast you can stream it. Kernels such as FlashAttention are fast precisely because they tile work into shared memory and avoid round trips to HBM.

The roofline model

The roofline model (Williams, Waterman and Patterson, 2009) predicts the best throughput a kernel can reach on a given machine from two hardware numbers and one property of the workload.

Define:

  • PpeakP_{\text{peak}}: peak compute throughput (FLOP/s) for the number format used.
  • BB: memory bandwidth (bytes/s) of the level the data comes from, usually HBM.
  • WW: total floating-point operations the kernel performs (FLOP).
  • QQ: bytes moved between that memory level and the chip.
  • I=W/QI = W / Q: arithmetic intensity (FLOP per byte).

Then the attainable throughput is

Patt=min⁡(Ppeak,  I⋅B).P_{\text{att}} = \min\left(P_{\text{peak}},\; I \cdot B\right).

The two lines meet at the ridge point I∗=Ppeak/BI^{*} = P_{\text{peak}} / B. A kernel with I<I∗I < I^{*} is memory-bound (more FLOPS would not help; more bandwidth would). A kernel with I>I∗I > I^{*} is compute-bound.

Worked example 1: the H100 ridge point

For an H100 SXM in dense BF16, take Ppeak≈989P_{\text{peak}} \approx 989 TFLOP/s and B≈3.35B \approx 3.35 TB/s:

I∗=989×10123.35×1012≈295 FLOP/byte.I^{*} = \frac{989 \times 10^{12}}{3.35 \times 10^{12}} \approx 295 \text{ FLOP/byte}.

A kernel must do about 295 floating-point operations for every byte it reads from HBM to keep the tensor cores saturated. That is a high bar, and it rises each generation because compute grows faster than bandwidth.

Worked example 2: a large matrix multiplication

Multiply A∈RM×KA \in \mathbb{R}^{M\times K} by B∈RK×NB \in \mathbb{R}^{K\times N} in BF16 (2 bytes per element) with M=N=K=4096M=N=K=4096.

  • FLOPs: each of the MNMN outputs needs KK multiply-adds, i.e. W=2MNK=2×40963=1.374×1011W = 2MNK = 2 \times 4096^3 = 1.374 \times 10^{11} FLOP.
  • Minimum bytes: read AA and BB once and write CC once: Q=2(MK+KN+MN)=2×3×40962=1.007×108Q = 2(MK + KN + MN) = 2 \times 3 \times 4096^2 = 1.007 \times 10^{8} bytes.
  • Intensity: I=1.374×1011/1.007×108≈1365I = 1.374\times10^{11} / 1.007\times10^{8} \approx 1365 FLOP/byte.

Since $1365 > 295,theGEMMiscompute−bound.Itslower−boundtimeis, the GEMM is compute-bound. Its lower-bound time is 1.374\times10^{11} / 989\times10^{12} \approx 0.14$ ms. This is why training, which is dominated by large GEMMs over big batches, can reach high utilization.

Worked example 3: LLM decoding at batch size 1

Generating one token requires multiplying the activation vector by every weight matrix. For a d×dd \times d weight matrix in BF16 and a single token: W=2d2W = 2d^2 FLOP, and the weights alone are Q≈2d2Q \approx 2d^2 bytes, so I≈1I \approx 1 FLOP/byte. Attainable throughput is 1×3.351 \times 3.35 TB/s =3.35= 3.35 TFLOP/s, about 0.3% of peak.

If the server batches bb sequences, the same weights are read once and used bb times: W=2bd2W = 2bd^2, Q≈2d2Q \approx 2d^2, so I≈bI \approx b. You need roughly b≈295b \approx 295 concurrent tokens per weight read to reach the ridge on an H100. (This simplification ignores the KV cache, which is read per sequence and does not benefit from batching; the next lesson treats it.)

At whole-model level, an 8-billion-parameter model in 16-bit has about 16 GB of weights. Streaming them once per token at the full 3.35 TB/s takes 16/3350≈4.816 / 3350 \approx 4.8 ms, an upper bound of about 209 tokens/s for a single stream. Real kernels do not reach full bandwidth; the site's AI Index method uses 55% effective bandwidth plus 1.5 ms overhead:

tok/s≈116×1090.55×3.35×1012+0.0015=10.00868+0.0015≈98.\text{tok/s} \approx \frac{1}{\frac{16\times10^{9}}{0.55 \times 3.35\times10^{12}} + 0.0015} = \frac{1}{0.00868 + 0.0015} \approx 98.

Either way the conclusion holds: single-stream decoding is limited by memory bandwidth, not FLOPS.

A roofline calculator in Python

def roofline(flops, bytes_moved, peak_flops, bandwidth):
    """Return (intensity, attainable FLOP/s, bound) for one kernel."""
    intensity = flops / bytes_moved
    attainable = min(peak_flops, intensity * bandwidth)
    bound = "compute" if intensity >= peak_flops / bandwidth else "memory"
    return intensity, attainable, bound

def gemm(m, n, k, bytes_per_el=2):
    flops = 2 * m * n * k
    bytes_moved = bytes_per_el * (m * k + k * n + m * n)
    return flops, bytes_moved

H100 = dict(peak_flops=989e12, bandwidth=3.35e12)   # dense BF16, HBM3

for name, (m, n, k) in {
    "training GEMM": (4096, 4096, 4096),
    "decode, batch 1": (1, 4096, 4096),
    "decode, batch 64": (64, 4096, 4096),
    "decode, batch 512": (512, 4096, 4096),
}.items():
    f, q = gemm(m, n, k)
    i, att, bound = roofline(f, q, **H100)
    print(f"{name:18s} I={i:8.1f} FLOP/B  attainable={att/1e12:7.1f} TFLOP/s  ({bound}-bound)")

Here MM plays the role of the number of tokens processed together. The output shows intensity rising almost linearly with batch size (about 1, 62 and 410 FLOP/byte) until the decode GEMM crosses the ridge at roughly batch 350 (slightly above 295 because activations also cost bytes) and becomes compute-bound.

Datacenter accelerators as of November 2026

Specifications below are vendor-published figures; check current documentation before buying because configurations and availability change quickly.

Vendor / familyRecent partsMemory per chipNotes
NVIDIA HopperH100 (80 GB HBM3, 3.35 TB/s), H200 (141 GB HBM3e, 4.8 TB/s)80-141 GBStill widely deployed; 900 GB/s NVLink 4 per GPU
NVIDIA Blackwell / Blackwell UltraB200, GB200; B300, GB300Up to 288 GB HBM3e on Blackwell UltraFP4 tensor cores; 1.8 TB/s NVLink 5 per GPU; 72-GPU NVLink racks
NVIDIA Rubin (newest)Vera Rubin NVL72288 GB HBM4Samples shipped in early 2026; system builders began shipping Vera Rubin NVL72 racks in September 2026, with volume still ramping
AMD InstinctMI300X, MI325X, MI350X/MI355X288 GB HBM3E, 8 TB/s on MI355XMI355X liquid-cooled at up to 1,400 W; ROCm software stack
AMD Instinct (newest)MI450-series (MI455X), "Helios" 72-GPU rack432 GB HBM4 on MI455XAMD launched Helios in July 2026 and said it had entered full-scale mass production
Google TPUTrillium (v6e), Ironwood (TPU7x)192 GiB HBM, 7.38 TB/s (Ironwood)Ironwood: 4,614 FP8 / 2,307 BF16 peak TFLOPS per chip; pods of up to 9,216 chips
AWS Trainium / InferentiaTrainium2, Trainium3; Inferentia2144 GB HBM3e, 4.9 TB/s (Trainium3)Trainium3 (3 nm): 2.52 FP8 PFLOPS per chip, up to 144 chips per Trn3 UltraServer; GA December 2025

Three patterns matter more than any single number:

  1. Memory per chip keeps growing (80 GB to 288 GB to 400+ GB), because inference of large models and long contexts is capacity-bound.
  2. Low-precision compute grows fastest (FP8, then FP4), so the ridge point rises and memory-bound work gets relatively worse.
  3. The unit of design is now the rack or pod, not the chip.

Custom chips (TPU, Trainium) trade ecosystem breadth for cost and integration with one cloud. GPUs offer the broadest software support (CUDA on NVIDIA; ROCm on AMD, which has narrowed but not closed the gap).

Interconnects: scale-up and scale-out

Large models do not fit on one chip, so chips must exchange data constantly. There are two tiers:

  • Scale-up links connect a small group of chips with very high bandwidth and low latency, often with load/store memory semantics: NVIDIA NVLink with NVLink Switch (900 GB/s per GPU on Hopper, 1.8 TB/s on Blackwell), AMD Infinity Fabric (and the multi-vendor UALink effort), Google TPU ICI (inter-chip interconnect, 1.2 TB/s bidirectional per Ironwood chip), and AWS NeuronLink.
  • Scale-out networks connect thousands of nodes: InfiniBand (NDR 400 Gb/s and XDR 800 Gb/s per port), and Ethernet with RoCE v2 (RDMA over Converged Ethernet), which hyperscalers increasingly prefer. On GB300 NVL72, NVIDIA specifies 800 Gb/s of network connectivity per GPU via ConnectX-8.

Note the units: NVLink is quoted in gigabytes per second, network ports in gigabits. 400 Gb/s is 50 GB/s, roughly 18 times less than Hopper NVLink.

Worked example 4: how long does a gradient all-reduce take?

In data-parallel training, every step ends by averaging gradients across NN workers. A ring all-reduce makes each worker send (and receive) about

bytes per worker=2(N−1)N S,\text{bytes per worker} = \frac{2(N-1)}{N}\, S,

where SS is the gradient size. For an 8-billion-parameter model with BF16 gradients, S=16S = 16 GB. With N=8N = 8:

2×78×16 GB=28 GB.\frac{2 \times 7}{8} \times 16 \text{ GB} = 28 \text{ GB}.
  • Over Hopper NVLink at about 450 GB/s per direction: 28/450≈0.06228 / 450 \approx 0.062 s.
  • Over a single 400 Gb/s (50 GB/s) network port: 28/50=0.5628 / 50 = 0.56 s.

A tenfold gap. This simplified estimate ignores latency terms and overlap with computation, but it explains the standard layout: put the most communication-heavy parallelism (tensor parallelism, which all-reduces inside every layer) inside the NVLink domain, and the lighter-weight parallelism (data and pipeline parallelism) across the network.

Rack-scale systems

Since Blackwell, NVIDIA's flagship product is a rack. The GB300 NVL72 couples 72 Blackwell Ultra GPUs and 36 Grace CPUs in a single NVLink domain. NVIDIA's published rack totals include up to 20 TB of HBM with up to 576 TB/s of aggregate HBM bandwidth, 130 TB/s of total NVLink bandwidth, and 1,080 PFLOPS of dense FP4 (1,440 with sparsity). Its predecessor, GB200 NVL72, used the same 72-GPU layout with Blackwell GPUs. Comparable rack- or pod-scale designs: AMD's Helios (72 MI450-series GPUs), Google TPU pods (Ironwood scales to 9,216 chips over ICI and optical circuit switches), and AWS Trn3 UltraServers (up to 144 Trainium3 chips).

Why racks? A 72-GPU NVLink domain lets an entire large mixture-of-experts model run with tensor and expert parallelism over fast links instead of the network. The cost is physical: these racks need direct liquid cooling and power densities that older datacenters cannot supply, which is why facility power has become a gating factor (see AI energy and environment).

What limits training vs inference

Training

Training compute is approximately C≈6NDC \approx 6ND FLOPs for a dense transformer with NN parameters trained on DD tokens (2 for the forward pass, 4 for the backward).

Worked example 5. A 70B-parameter model on 15 trillion tokens:

C=6×70×109×15×1012=6.3×1024 FLOP.C = 6 \times 70\times10^{9} \times 15\times10^{12} = 6.3\times10^{24} \text{ FLOP}.

On 1,000 H100s at 989 TFLOP/s peak with 40% MFU, the cluster sustains 1000×989×1012×0.4=3.96×10171000 \times 989\times10^{12} \times 0.4 = 3.96\times10^{17} FLOP/s, so the run takes 6.3×1024/3.96×1017≈1.59×1076.3\times10^{24} / 3.96\times10^{17} \approx 1.59\times10^{7} s, about 184 days. With 10,000 GPUs it is about 18 days, if utilization holds, which is the hard part.

Memory is the other wall. Mixed-precision training with Adam typically holds about 16 bytes per parameter (2 for BF16 weights, 2 for gradients, 12 for FP32 master weights and two Adam moments), before activations. For 70B parameters that is 1.121.12 TB, which must be sharded (ZeRO/FSDP) across at least 14 80-GB GPUs, and in practice many more.

So training is limited by: total compute (chip count times MFU), memory capacity for optimizer state and activations, communication bandwidth for gradient and tensor-parallel collectives, and reliability: with tens of thousands of chips, hardware failures happen frequently, so checkpointing and fast restart determine effective throughput.

Inference

  • Prefill (processing the prompt) is a batch of GEMMs over all prompt tokens, about 2N2N FLOPs per token: compute-bound.
  • Decode (generating tokens one at a time) is memory-bandwidth-bound, as worked example 3 showed, and limited by memory capacity for weights plus the KV cache of every active sequence.

That is why inference-oriented chips and racks emphasize HBM capacity and bandwidth, and why serving systems batch aggressively.

Common pitfalls

  • Quoting sparse or FP4 peak numbers when the workload is dense BF16. Divide sparse figures by two and use the precision you will actually run.
  • Ignoring the ridge point. Buying more FLOPS does nothing for a memory-bound decode workload; bandwidth and batching do.
  • Bits vs bytes. Confusing 400 Gb/s with 400 GB/s inflates network capacity eightfold.
  • Assuming linear scaling. Doubling GPUs rarely halves time: communication, stragglers and failures grow with scale.
  • Forgetting optimizer state. Parameters are only one-eighth of the 16 bytes per parameter needed for Adam training.
  • Ignoring the facility. A rack that needs liquid cooling and 100+ kW cannot be dropped into a typical enterprise server room.

In practice

  • Start every hardware question with a roofline sketch: compute WW, QQ, and II, then compare with the ridge point of the candidate chip.
  • Measure MFU (training) and achieved bandwidth (decode) with profilers such as Nsight Systems, the PyTorch profiler or vendor equivalents; tune batch size, kernel fusion and parallelism layout before buying hardware.
  • Match parallelism to topology: tensor and expert parallelism inside the scale-up domain, pipeline and data parallelism across it.
  • For inference fleets, size by memory (weights plus KV cache at target concurrency) first, then by bandwidth for latency, then by compute for prefill-heavy traffic.
  • Treat accelerator choice as a software decision as much as a hardware one: framework support, kernels, and your team's experience often outweigh a 20% spec advantage.
  • Use the AI Index to compare memory and bandwidth across hardware with consistent assumptions.

Key takeaways

  • Accelerator performance is governed by the memory hierarchy: tensor cores are so fast that most workloads wait on HBM or on the network.
  • The roofline model, attainable = min(peak, intensity x bandwidth), tells you whether to buy compute or bandwidth; the H100 ridge point is about 295 FLOP/byte in dense BF16.
  • Training is dominated by large GEMMs and is compute-, memory-capacity-, communication- and reliability-limited; LLM decoding is memory-bandwidth- and capacity-limited.
  • Scale-up links (NVLink, ICI, NeuronLink) are an order of magnitude faster than scale-out networks (InfiniBand, RoCE), so parallelism must be mapped to topology.
  • As of November 2026 the design unit is the rack or pod: 72-GPU NVLink racks, 9,216-chip TPU pods and 144-chip Trainium UltraServers.

Terms in this lesson

Streaming multiprocessor (SM)
The repeated compute block of an NVIDIA GPU that schedules warps and contains general-purpose units, tensor cores, registers and shared memory.
Tensor core
A specialized hardware unit that performs small matrix multiply-accumulate operations in low-precision formats and supplies most of a GPU's AI FLOPS.
HBM
High-bandwidth memory: stacked DRAM placed on the accelerator package, providing terabytes per second of bandwidth.
Arithmetic intensity
The ratio of floating-point operations to bytes moved from a given memory level, in FLOP per byte.
Ridge point
The arithmetic intensity, peak FLOP/s divided by bandwidth, above which a kernel becomes compute-bound on a given machine.
Model FLOPs utilization (MFU)
Achieved model FLOP/s divided by the hardware's theoretical peak FLOP/s.
NVLink
NVIDIA's high-bandwidth GPU-to-GPU scale-up interconnect, switched across up to 72 GPUs in NVL72 racks.
RoCE
RDMA over Converged Ethernet: a protocol that lets Ethernet networks perform remote direct memory access with low CPU overhead.
All-reduce
A collective operation in which every worker ends up with the sum (or average) of all workers' tensors.

Check your understanding

  1. 1.

    A kernel has arithmetic intensity 40 FLOP/byte on a chip with 1,000 TFLOP/s peak and 4 TB/s bandwidth. What is its attainable throughput?

  2. 2.

    Why is single-user LLM decoding usually memory-bandwidth-bound?

  3. 3.

    You are placing tensor parallelism for a large model on a cluster of 8-GPU NVLink nodes connected by 400 Gb/s InfiniBand. Which layout is best?

  4. 4.

    Roughly how many FLOPs does it take to train a 7B-parameter dense transformer on 2 trillion tokens?

  5. 5.

    A vendor quotes 2,000 TFLOP/s FP8 'with sparsity' for a chip. What should you assume for dense FP8 training?

Exercises

Work each problem before opening the solution.

  1. Exercise 1Core

    A chip has 2,250 TFLOP/s dense BF16 and 8 TB/s HBM bandwidth.

    1. Compute its ridge point.
    2. A layer-norm kernel reads and writes BF16 activations and does about 8 FLOPs per element. Is it compute- or memory-bound, and what fraction of peak can it reach?
    Show solution
    1. I∗=2250×1012/8×1012≈281I^{*} = 2250\times10^{12} / 8\times10^{12} \approx 281 FLOP/byte.

    2. Each element is read (2 bytes) and written (2 bytes): 4 bytes per element for 8 FLOPs, so I=8/4=2I = 8/4 = 2 FLOP/byte. This is far below 281, so it is memory-bound. Attainable =2×8= 2 \times 8 TB/s =16= 16 TFLOP/s, which is 16/2250≈0.7%16/2250 \approx 0.7\% of peak. This is why frameworks fuse element-wise operations into neighbouring kernels: fusion removes the extra HBM round trip.

  2. Exercise 2Core

    Write a Python function decode_tok_s(params_b, bits, bandwidth_tbs, eff=0.55, overhead_ms=1.5) implementing the site's decode estimate, and use it for a 70B model at 8 bits on (a) an H200 at 4.8 TB/s and (b) a chip with 8 TB/s. Assume the model fits.

    Show solution
    def decode_tok_s(params_b, bits, bandwidth_tbs, eff=0.55, overhead_ms=1.5):
        bytes_per_token = params_b * 1e9 * bits / 8
        seconds = bytes_per_token / (eff * bandwidth_tbs * 1e12) + overhead_ms / 1000
        return 1 / seconds
    
    print(round(decode_tok_s(70, 8, 4.8), 1))  # H200
    print(round(decode_tok_s(70, 8, 8.0), 1))  # 8 TB/s chip
    

    (a) bytes/token = 70e9. Time = 70e9 / (0.55 x 4.8e12) + 0.0015 = 0.02652 + 0.0015 = 0.02802 s, so about 35.7 tok/s.

    (b) Time = 70e9 / (0.55 x 8e12) + 0.0015 = 0.01591 + 0.0015 = 0.01741 s, so about 57.4 tok/s.

    The speedup (1.61x) is slightly less than the bandwidth ratio (1.67x) because of the fixed overhead.

  3. Exercise 3Core

    Estimate the ring all-reduce time for 4 GB of gradients across 16 workers whose bottleneck link is 100 GB/s per direction. Then explain one way to hide this time.

    Show solution

    Bytes per worker =2(N−1)/N×S=2×15/16×4= 2(N-1)/N \times S = 2 \times 15/16 \times 4 GB =7.5= 7.5 GB. Time ≈7.5/100=0.075\approx 7.5 / 100 = 0.075 s (75 ms), ignoring latency.

    To hide it, overlap communication with computation: start all-reducing the gradients of later layers (computed first in the backward pass) while the backward pass continues on earlier layers. PyTorch DDP does this with gradient buckets. Other options: reduce precision of communicated gradients, or use larger per-step batches so communication is amortized over more compute.

  4. Exercise 4Challenge

    You must train a 30B-parameter dense model on 6 trillion tokens within 30 days. Your GPUs have 989 TFLOP/s dense BF16 and 80 GB HBM, and you expect 38% MFU.

    1. How many GPUs do you need?
    2. What is the minimum number of GPUs needed just to hold weights, gradients and Adam state (16 bytes/param)?
    3. Which constraint binds, and what else could make the plan fail?
    Show solution
    1. C=6×30×109×6×1012=1.08×1024C = 6 \times 30\times10^9 \times 6\times10^{12} = 1.08\times10^{24} FLOP. Seconds available: 30×86400=2.592×10630 \times 86400 = 2.592\times10^6. Required sustained rate: 1.08×1024/2.592×106=4.167×10171.08\times10^{24}/2.592\times10^6 = 4.167\times10^{17} FLOP/s. Per GPU sustained: 989×1012×0.38=3.758×1014989\times10^{12}\times0.38 = 3.758\times10^{14}. GPUs: 4.167×1017/3.758×1014≈1,1094.167\times10^{17}/3.758\times10^{14} \approx 1{,}109, so about 1,110 GPUs (round up and add spares, e.g. 1,200).

    2. State =16×30×109=480= 16 \times 30\times10^9 = 480 GB. 480/80=6480/80 = 6 GPUs minimum, before activations, buffers and fragmentation; realistically 8-16 with sharding.

    3. Compute binds by a wide margin (about 1,100 vs about 6 GPUs). Risks: MFU below 38% at 1,100-GPU scale due to communication; hardware failures and restart time eating into the 30 days (plan for frequent checkpoints and spare nodes); data-loading bottlenecks; and the facility's power and cooling for roughly 140 8-GPU nodes.

Further reading

Go further

Sources

Fact-checked and last reviewed 2026-11-05

Stay in the loop
Prometheus OS™ · Native AI OS · Built for the future © 2025 - 2026