Skip to content
AI systems and infrastructure Foundation 8 min read

AI systems at 2,000 ft

Every model on this site is, physically, a very large number of multiply-adds and an even larger number of bytes moved, paid for in GPU-hours and electricity. This track is about that physical layer: how accelerators work, how kernels and number formats squeeze them, how training spreads across thousands of chips, how models are compressed and served, and what all of it costs. Its central lesson fits in a sentence — arithmetic is cheap, moving data is expensive — and almost every systems idea in modern AI is a way of acting on it.

10,000 ft

The AI boom was made possible as much by systems as by algorithms. Deep learning took off when it moved onto GPUs (AlexNet, 2012); the transformer won partly because it maps onto matrix-multiply hardware better than recurrent networks did; scaling laws could only be followed because ZeRO, Megatron and their successors made it possible to train on tens of thousands of GPUs; and the assistant era runs on serving systems that batch, cache and quantise to make a token cost a tiny fraction of a cent. The questions this track answers are the ones a founder-engineer actually faces: Will it fit? How long will it take? What will it cost? Why is it slow? They have quantitative answers, and once you can compute them you read papers differently: FlashAttention, grouped-query attention, mixture of experts, FP8 training and speculative decoding stop being a list of tricks and become applications of the same few constraints. The track sits between the model tracks (transformers, post-training) and the product track (LLM application engineering), and its numbers reappear in both.

The whole track in one idea: the roofline

A GPU can do about a thousand trillion BF16 floating-point operations per second (an H100: 989 TFLOP/s dense) but can read only 3.35 trillion bytes per second from its memory. Any piece of work does some number of FLOPs per byte it moves, its arithmetic intensity; below about 300 FLOPs per byte on an H100 it is limited by memory, above it by arithmetic. That single comparison explains why element-wise operations should be fused, why generating text one token at a time for one user wastes 99% of a GPU's arithmetic, why batching and quantisation speed up serving, and why the chips' designers keep adding narrower number formats.

Five numbers to carry around (H100 SXM, all derived and sourced on the pages that use them):

Quantity Value Where it matters
Dense BF16 peak 989 TFLOP/s (FP8: 1,979) GPU architecture, mixed precision
HBM capacity and bandwidth 80 GB at 3.35 TB/s compute maths, serving
Ridge point ~295 FLOP/byte every performance question
Training state ~16 bytes per parameter (mixed-precision Adam) distributed training
Links NVLink 450 GB/s each way in a server; ~50 GB/s per GPU between servers distributed training

And three formulas: a dense transformer costs \(2N\) FLOPs per token forward and \(6N\) to train; decoding reads every weight once per step, so its speed is bytes ÷ bandwidth; and a ring all-reduce sends \(2(p-1)M/p\) bytes per GPU. Compute maths derives them.

The map of the track

Arrows mean "builds on". The left side is the single machine; the right side is what you build with many of them, or with compressed models on small ones.

AI systems: how the ideas connect
AI systems: how the ideas connect. How a GPU works SMs · memory · roofline, Kernels CUDA · Triton · fusion, Mixed precision FP32 · BF16 · FP8, Compute maths FLOPs · bytes · cost, Distributed training DDP · FSDP · TP · PP, Quantisation INT8 · INT4 · GPTQ · AWQ, Serving LLMs batching · paging · speculation, On-device AI MLX · llama.cpp · GGUF, MLOps experiments · pipelines · monitoringAI systems: how the ideas connect. How a GPU works SMs · memory · roofline, Kernels CUDA · Triton · fusion, Mixed precision FP32 · BF16 · FP8, Compute maths FLOPs · bytes · cost, Distributed training DDP · FSDP · TP · PP, Quantisation INT8 · INT4 · GPTQ · AWQ, Serving LLMs batching · paging · speculation, On-device AI MLX · llama.cpp · GGUF, MLOps experiments · pipelines · monitoring

Seen as a lifecycle rather than a dependency graph, the same pages follow a model from its training run to a user's screen:

A model's life through the stack
A model's life through the stack. Train thousands of GPUs BF16/FP8 · 4-D parallel, Checkpoint sharded weights + optimiser state, Compress quantise · distil, Serve batching · KV cache · speculative decoding, Run locally laptop · phone, Monitor latency · cost · drift, data and failures feed the next runA model's life through the stack. Train thousands of GPUs BF16/FP8 · 4-D parallel, Checkpoint sharded weights + optimiser state, Compress quantise · distil, Serve batching · KV cache · speculative decoding, Run locally laptop · phone, Monitor latency · cost · drift, data and failures feed the next run

How to work through this track

The track has two units. Unit 1 is the machine and training at scale: hardware, kernels, number formats and parallelism. Unit 2 is the arithmetic of cost and everything after training: compression, serving, local inference and operations.

  1. How a GPU works (about 75 minutes). The foundation: SMs, warps, tensor cores, the memory hierarchy and the roofline. Do the Build it section; it is the calculator you will use for the rest of the track.
  2. Compute maths (about 60 minutes). The roofline scaled up to whole models: \(6ND\), 16 bytes per parameter, KV-cache size, decode throughput, dollars. Read it second even though it sits in unit 2 — it is the track's spine.
  3. Mixed precision (about 60 minutes). FP32, BF16, FP8 and 4-bit formats; the recipe and why each rule exists, reproduced in an emulator.
  4. Kernels: CUDA and Triton (about 90 minutes). Coalescing, tiling, fusion and FlashAttention. Advanced; skim the CUDA details on a first pass, but do not skip the FlashAttention case study.
  5. Distributed training (about 100 minutes). Collectives, DDP, ZeRO/FSDP, tensor, pipeline, context and expert parallelism, and how Llama 3 and DeepSeek-V3 combined them.
  6. Quantisation, serving LLMs, on-device AI and MLOps (roughly an hour each). From a trained checkpoint to a product.

Budget 10–12 hours of real study, plus the exercises. Three shorter paths:

The one exercise that teaches the most

Take any model you use — say an 8B open-weight model — and predict, before measuring, its memory footprint in BF16 and 4-bit, its tokens per second at batch 1 on your hardware (bytes of weights ÷ memory bandwidth), and the cost of training it from scratch (\(6ND\) ÷ (peak × 40%) × price). Then measure the tokens per second. If you are within a factor of 1.5, you understand this track; if not, the gap tells you which page to reread.

Every page in the track

Systems milestones

Year Event Read
2007 NVIDIA releases CUDA, making GPUs general-purpose parallel computers GPU architecture
2012 AlexNet trains on two consumer GPUs and wins ImageNet GPU architecture
2017 Volta tensor cores; mixed-precision training recipe mixed precision
2019 Megatron-LM tensor parallelism; ZeRO sharding; Triton distributed training, kernels
2022 FlashAttention; Hopper with FP8 kernels, mixed precision
2023 PagedAttention (vLLM) for serving; PyTorch 2 torch.compile serving, kernels
2024 Llama 3 405B on 16,384 H100s; DeepSeek-V3 trained in FP8 distributed training
2025 Blackwell block-scaled FP4/FP8; 4-bit pretraining at 10T tokens mixed precision

Prerequisites from other tracks

The five best resources for this track

Where this leads