Appendix D: Hardware and Cost Reference
local graph
Appendix D: Hardware and Cost Reference
Section titled “Appendix D: Hardware and Cost Reference”Appendix D — Hardware and Cost Reference
Approximate figures for reasoning about memory, compute, and cost. Hardware specifications are order-of-magnitude and vary by exact model and precision; use them for estimation, not procurement.
| GPU | Memory | Mem. bandwidth | Note |
|---|---|---|---|
| A100 | 40 / 80 GB | ~2.0 TB/s | prior-generation workhorse |
| H100 / H800 | 80 GB | ~3.4 TB/s | H800 = bandwidth-limited H100 |
| H200 | 141 GB | ~4.8 TB/s | more memory for long context |
| Blackwell (B200) | ~192 GB | ~8 TB/s | current generation |
Table D.1 — Data-center GPU snapshot (approximate)
Memory budgeting
For training, the dominant memory costs per parameter are: the weights, the gradients, and the optimizer state. With AdamW (two state tensors) and mixed precision, a rough rule is that training needs on the order of 16 bytes per parameter (FP32 master weights + FP32 Adam moments), before activations and the KV cache. This is why a model that runs for inference in a few bytes per parameter needs many times that to train, and why the parallelism of Chapter 19 is unavoidable at scale. For inference, memory is roughly the quantized weight size (e.g., ~0.5 byte/param at 4-bit) plus the KV cache, whose per-token size MLA exists to minimize.
| Use | ~Bytes / param | Composition |
|---|---|---|
| Training (AdamW, mixed) | ~16 | FP32 weights + 2 FP32 moments (+ activations, cache) |
| Inference (FP16) | 2 | weights only (+ KV cache) |
| Inference (INT4) | ~0.5 | 4-bit weights (+ KV cache) |
Table D.2 — Bytes per parameter, by use
Compute and cost
Training compute follows the rule from Chapter 20: about 6ND floating-point operations for N active parameters and d tokens. Dividing by the achieved throughput (peak FLOP/s × number of PUs × MFU, with MFU ~0.3–0.5) gives the GPU-time, and multiplying by the hourly price gives the cost. As a reference point, eepSeek-V3 reported roughly 2.79 million H800 GPU-hours 2/GPU-hour) for a 671B/37B-active model on 14.8T ens — a useful anchor for scaling estimates down to a smaller id.
Reference Tables: Hardware, Memory, and Cost
The numbers below let you size a run before committing to it. Accelerator specifications are approximate and move with each hardware generation; treat them as orders of magnitude, and confirm current figures against the vendor’s data sheet.
| Accelerator | Memory | BF16 dense (approx.) |
|---|---|---|
| NVIDIA A100 | 40 / 80 GB | ~312 TFLOP/s |
| NVIDIA H100 (SXM) | 80 GB | ~990 TFLOP/s |
| NVIDIA H200 | 141 GB | ~990 TFLOP/s |
Table D.1 — Common training accelerators (approximate)
| Component | Bytes / param | Why |
|---|---|---|
| Weights (BF16) | 2 | the model itself |
| Master weights (FP32) | 4 | absorb tiny updates (18.7) |
| Gradients (BF16) | 2 | one per parameter |
| Adam m (FP32) | 4 | first moment (17.9) |
| Adam v (FP32) | 4 | second moment (17.9) |
| Total | ~16 | before activations |
Table D.2 — Training memory per parameter (AdamW, mixed precision)
The rule of thumb that falls out of Table D.2 is roughly 16 bytes per parameter to train, before activation memory. A 1-billion-parameter model therefore needs about 16 GB just for state — which is why even modest models are trained with the optimizer-state sharding of Chapter 19, and why activation checkpointing is used to trade compute for the memory the table does not even count.
| Component | Formula |
|---|---|
| Weights | params × bytes (2 BF16, 1 INT8, 0.5 INT4) |
| KV cache | 2 × layers × kv_heads × head_dim × seq × batch × bytes |
Table D.3 — Inference memory components
| Quantity | Estimate |
|---|---|
| Training FLOPs | ≈ 6 × params × tokens |
| Wall-clock time | FLOPs / (GPUs × peak × MFU) |
| Dollar cost | GPU-hours × hourly rate |
Table D.4 — Back-of-envelope cost estimate
Size before you spend Two rules carry most budgeting: ~16 bytes per parameter to train, and ~6 × params × tokens FLOPs to do it. Divide the FLOPs by your cluster’s realistic throughput (peak × MFU) and you have the time and the bill before you launch a single step.
Reference: Parallelism Strategies
The forms of parallelism in Chapter 19 are easy to confuse because they all “split the model across devices” in different senses. This table fixes what each one actually splits, and what it costs.
| Strategy | Splits | Main cost |
|---|---|---|
| Data parallel (DP) | the batch (model replicated) | gradient all-reduce each step |
| Tensor parallel (TP) | individual layers, across hidden dim | communication within each layer |
| Pipeline parallel (PP) | layers into sequential stages | the pipeline bubble |
| Expert parallel (EP) | MoE experts across devices | all-to-all routing traffic |
| Sequence parallel (SP) | replicated regions, across tokens | extra layout conversions |
| ZeRO / FSDP | optimizer state, grads, params | gather/scatter of shards |
Table D.5 — The forms of parallelism at a glance
Real frontier training combines several of these at once — a model might be tensor- parallel within a node, pipeline-parallel across nodes, expert-parallel for its MoE layers, and data-parallel over the whole arrangement, with ZeRO sharding the optimizer state on top. This composition, “3D” (or more) parallelism, is what lets a model far larger than any single GPU’s memory train across a cluster, and orchestrating it well — balancing each form’s communication cost against the others — is among the central crafts of the systems work in Chapter 19.