Unit 13 of 13 · about 3 hours · derive

Plan ranking under uncertain bandwidth and heterogeneous devices

This optional extension turns a point estimate into a decision boundary. It is useful when device types differ or the available link rate is not yet known, without requiring a heterogeneous fleet.

You'll be able to

  • Derive a plan crossover and report when a bandwidth interval leaves the ranking unresolved.
  • Partition stages using device-specific capacity and compute rates instead of fleet averages.
  • Test ranking sensitivity to latency, reserve, sequence, batch and stage imbalance.

Covers

Automated plan ranking under uncertain bandwidthHeterogeneous device planning
1

Read

In this order, only the parts listed

0 of 2 done

  1. Expose the assumptions behind a rankingHow to Scale Your Model - Chapters 4 to 6

    Combining FSDP and Tensor Parallelism: continuous optimum and compute-to-communication ratio

    Vary rates and legal integer factors instead of assuming the continuous optimum survives uncertain bandwidth.

  2. Device-specific partitions and virtual-worker placementHetPipe - Heterogeneous Partitioning and Placement

    arXiv:2005.14038v1, Section 4 Pipelined Model Parallelism Within a VW (Model Partitioning paragraph), Section 7 Partitioning Algorithm and Section 8.1 Methodology (resource allocation for virtual workers)

    Stop before reproducing the system. Its TensorFlow experiments use stale-weight WSP semantics; borrow the cost and placement questions for a synchronous simulator, not its update rule. It does not evaluate heterogeneous link rates.

2

Focus on

  • For two serialized cost models and , solve their equality before ranking. Latency, overlap and routing can require a richer model; name what this abstraction omits.
  • A ranking is robust over an interval only if it remains feasible and preferred throughout that interval. Endpoint checks suffice for a monotone difference in the simple model, not for arbitrary piecewise schedules.
  • Use compute cost by layer and device type, peak memory by assigned stage and communication by actual route. Averages can hide both a slow stage and a small-memory device.
  • Sweep uncertain bandwidth, latency and reserve alongside sequence, batch and stage balance. Report rank reversals and feasibility cliffs; do not assign a probability without a distributional assumption.
Common mistakes · 3
  • Calling the nominal-rate winner robust when the supplied rate interval crosses its decision boundary.
  • Aggregating memory across devices. An allocation fails if any assigned rank's peak exceeds that device's usable capacity.
  • Copying an asynchronous paper's convergence claim into a synchronous update-equivalence contract. Different update semantics need separate evidence.
3

Try it yourself

Closed-book, before checking anything

Use synthetic, serialized models: plan A has 12 ms of non-transfer cost and 120,000,000 transmitted bytes; plan B has 20 ms and 40,000,000 bytes. With shared egress rate between 5 and 20 GB/s, zero launch latency and no overlap, derive the crossover at 10 GB/s and show both endpoint winners. Separately partition 12 identical layers, each costing one work unit, between devices sustaining 2 and 1 work units per time unit. With zero transfer cost and capacity for eight layers on each device, enumerate contiguous cuts and recover the balanced 8/4 split. Then add activation lifetimes and a slow link to see when that split ceases to win.
4

Quiz yourself

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

0 got · 0 missed

  1. 1.Which synthetic plan wins at 5 and 20 GB/s?Answer

    At 5 GB/s, A takes 36 ms and B 28 ms, so B wins. At 20 GB/s, A takes 18 ms and B 22 ms, so A wins. They tie at 24 ms at 10 GB/s.

  2. 2.Why is the zero-transfer heterogeneous split 8/4 rather than 6/6?Answer

    Eight layers on the faster device and four on the slower both take 4 time units. The equal split takes 3 and 6, so its slowest stage is worse.

  3. 3.Do overlapping plan-time intervals prove a rank reversal?Answer

    No. Both plans may depend on the same uncertain quantities. Compare their paired costs under each admissible scenario, not independent interval extrema alone.

You're done when

Your sensitivity report distinguishes robust and unresolved rankings and your heterogeneous simulation checks every device's peak under a stated synchronous schedule.

Only when you can do this without notes.

Leads to

Notes

Resources · 2 for this unit, 11 more in the section
  • 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.

  • 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.

Also in this 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.

  • 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.

  • 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.

  • 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.

  • 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.