Unit 11 of 13 · about 4 hours · measure

Measured-to-predicted residuals and the topology and assumption manifest

A planner is a falsifiable model, not a fitting exercise. The useful result is an explained residual and a revised assumption that predicts a new case.

You'll be able to

  • Freeze a prediction and compute signed timing or memory residuals against a scoped observation.
  • Attribute the largest discrepancy to kernels, overlap, contention, input, stragglers or runtime overhead.
  • Preserve the workload, topology, software and assumptions needed to reproduce a plan comparison.

Covers

Measured-to-predicted residual analysisTopology and assumption manifest for every result
1

Read

In this order, only the parts listed

0 of 3 done

  1. What makes a configuration result non-transferable?The Ultra-Scale Playbook - 5D Parallelism and Finding the Best Configuration

    Benchmarking thousands of configurations and Lessons learned on benchmarking

  2. Rank-local schedule labels and CPU tracesTorchFeather - ParallelDims and Composition Plan

    run_schedule action labels and main CPU profiling and trace export

    Use this to inspect event ordering. It profiles one schedule execution, not a repeated-trial steady-state throughput benchmark.

  3. Audit the reported step boundaryPicotron - 4D Composition

    Main training loop from step_start_time through step_duration, logging and checkpoint save

    Read only. Its wall-clock boundary excludes checkpoint saves and is not an explicit synchronized GPU timing contract. Do not reuse its logged time as validated end-to-end GPU latency.

2

Focus on

  • Define and relative residual for a positive predicted duration. Keep the original estimate alongside any calibrated revision.
  • Use rank-local phase durations and the slowest completed rank for the declared step boundary. Cross-rank clock alignment needs a stated method; raw timestamps are not automatically comparable.
  • The manifest names model shapes, seeds, data/token identity, batch and accumulation, masks, dtypes, optimizer, mesh order, rank placement, links, bandwidth convention, reserve, schedule, recomputation, software versions and source commits.
  • Retain raw trials, warmup policy, timing boundary, observer overhead and evidence tier. CPU gloo timing describes your machine's CPU execution, not a GPU interconnect.
Common mistakes · 3
  • Calibrating on every observation and reporting only the revised prediction. That hides whether the model predicts unseen configurations.
  • Adding durations from overlapping phases as if they were disjoint step components.
  • Comparing a profiled cold step with an unprofiled steady-state prediction, or omitting checkpoint cost while calling the result end to end.
3

Try it yourself

Closed-book, before checking anything

Freeze a schedule and predicted phase costs for a tiny CPU gloo PP-plus-DP plan, using the same shapes and settings for every trial. Run correctness checks first, then time repeated warm steady-state steps without profiling and keep a separate labeled trace run. Reconcile the largest signed residual using a controlled change to one suspected term. With two or more GPUs, repeat on one GPU per NCCL rank with synchronized timing and measured device/link assumptions; keep that evidence separate.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.What does a negative timing residual mean?Answer

    The observed duration is shorter than predicted. Possible causes include pessimistic rates or more overlap, but check equal work and timing boundaries before explaining it.

  2. 2.Why can the sum of phase durations exceed measured step time?Answer

    Some phases run concurrently. Their sum counts overlapping intervals more than once.

  3. 3.Which test separates a bad link-rate assumption from a data-loader delay?Answer

    Hold tensors and compute fixed, remove input preparation with resident synthetic batches, then inspect transfer intervals and exposed wait. Preserve both runs and their changed input assumption.

You're done when

You retain the original prediction, raw trials and manifest, explain the largest residual with a controlled comparison, and test the revised assumption on a new configuration.

Only when you can do this without notes.

Leads to

Notes

Resources · 3 for this unit, 10 more in the section
  • The Ultra-Scale Playbook - 5D Parallelism and Finding the Best ConfigurationHugging Face · primary

    Study 5D Parallelism in a Nutshell, then Finding the Best Training Configuration (fitting a step in memory, reaching the global batch, optimizing throughput) at https://nanotron-ultrascale-playbook.static.hf.space/index.html#finding_the_best_training_configuration. Rebuild a small planner that enumerates legal DP, TP, CP, PP and EP degrees and ranks them by predicted memory and step time; its heatmaps are its own H100 cluster's results.

  • Picotron - 4D CompositionHugging Face · required

    Trace create_config.py, process_group_manager.py and train.py across DP, TP, PP and CP. Run the CPU 3D example or a smaller equivalent, assert group membership and compare observed event order with the planner.

  • TorchFeather - ParallelDims and Composition PlanTorchFeather · support

    Inspect distributed/parallel_dims.py and model/parallelize.py. Build the exact mesh product and divisibility table for one FSDP, TP, CP, PP and EP configuration, then identify ordering assumptions in its composition.

Also in this section

  • First-Principles Video - Device Mesh Composition SegmentUmar Jamil · support

    Watch 08:37:34 on device meshes and combining pipeline with data parallelism. Reconstruct its rank-coordinate table and compare it with Picotron process groups and your planner output.

  • Distributed Training Guide - Chapter 7 FSDP plus TPLambda Labs · support

    Read the 2D FSDP plus TP path in 07-2d-parallel and explain why FSDP is applied after TP and what limits the TP degree. Running it needs several GPUs.

  • How to Scale Your Model - Chapters 4 to 6Google DeepMind · required

    Use Part 4 (transformer math), Part 5 (training parallelism) and Part 6 (LLaMA 3 case study) to independently estimate parameters, FLOPs, memory, communication, time and cost for one configuration, then the GPU rooflines in Part 12. Keep TPU constants labeled and compare its recommendation with the Playbook.

  • Efficient Large-Scale Language Model Training on GPU Clusters Using Megatron-LMNarayanan et al. (SC 2021) · required

    Read the composition of tensor, pipeline and data parallelism, the interleaved schedule and the performance analysis of parallel configurations. Check its guidance against your planner on one model and cluster.

  • CS336 Assignment 2 (Spring 2026) - Section 8 Analyzing Parallelism StrategiesStanford University · required

    Solve data_parallel_calcs, fsdp_calcs, tp_calcs and fsdp_tp_calcs (Sections 8.2 to 8.5) with your planner, and reconcile any disagreement before trusting either.

  • Transformer Math 101 - Distributed TrainingEleutherAI · support

    Use the sharded-optimizer, 3D-parallelism and activation equations as a cross-check of your planner's memory terms.

  • TensorTonic - Choose a Topology-Aware Parallel PlanTensorTonic · support

    Solve Choose a Topology-Aware Parallel Plan, then compare its memory and communication model with yours.

  • NanotronHugging Face · depth

    Inspect configuration, parallel context and trainer paths used by the Ultra-Scale benchmarks only after the planner works. Its "3D" means DP, TP and PP: there is no context or expert parallelism.

  • Bumblebee - Parallel State and CompositionBumblebee · depth

    Only as a possible capstone target: read primitive/parallel/ and the composition tests in a clean checkout to compare TP, EP, ETP, CP and PP contracts. Its multi-GPU paths are untested upstream.

  • HetPipe - Heterogeneous Partitioning and PlacementPark et al. · support

    Read arXiv:2005.14038v1 Section 4, Pipelined Model Parallelism Within a VW, for its Model Partitioning paragraph, Section 7, Partitioning Algorithm, and Section 8.1, Methodology, for resource allocation to virtual workers. Reuse device-specific compute, memory and placement constraints in a synchronous simulator; do not adopt its stale-weight update semantics or source speedups.