Unit 8 of 13 · about 5 hours · derive, explain

Link contention, intra- and inter-node placement and fast links for TP and EP

Orthogonal groups can still share a NIC. A topology-aware plan needs physical routes and shared capacities, not just one bandwidth constant per logical dimension.

You'll be able to

  • Map logical groups onto device, node, NIC and switch links with a traffic table.
  • Identify simultaneous dimensions that contend for the same physical capacity.
  • Defend fast-link placement for frequent TP or EP traffic without treating it as a universal rule.

Covers

Link contention among simultaneous mesh dimensionsIntra-node and inter-node placement policyFast-link preference for tensor and expert parallelism
1

Read

In this order, only the parts listed

0 of 2 done

  1. Node and cross-node collective capacityHow to Scale Your Model - Chapters 4 to 6

    How Do Collectives Work on GPUs: Intra-node collectives and Cross-node collectives; Rooflines for LLM Scaling on GPUs: Tensor Parallelism, Expert Parallelism and Caveat about latency

    Keep the chapter's H100 and GB200 constants labeled as its hardware assumptions. Reuse the hierarchy and message-size reasoning, not those constants as measurements of your machine.

  2. Independent versus contending FSDP and TPCS336 Assignment 2 (Spring 2026) - Section 8 Analyzing Parallelism Strategies

    Section 8.5, 2D Parallelism (FSDP + TP), problem fsdp_tp_calcs, printed pp. 45 to 46

2

Focus on

  • Separate rank-to-device placement from coordinate-to-rank mapping. Map each message onto links and direction; count simultaneous traffic at the GPU interface, shared NIC and network cuts.
  • TP collectives recur inside each layer's dependency chain. EP all-to-all can expose routing skew and many destinations. Fast links often help these paths, but feasibility and available domains can force cross-node groups.
  • On one directed bottleneck of capacity , transfers of and bytes require at least if neither can use another route. Taking their individual times' maximum spends the same bandwidth twice.
  • Use egress bandwidth for transmitted bytes. Algorithm bandwidth is logical payload divided by time; bus bandwidth applies the collective's traffic factor. Neither automatically equals physical peak bandwidth.
Common mistakes · 3
  • Giving every rank the full node NIC capacity. Shared egress must be budgeted across all active rank flows.
  • Assuming simultaneous collectives have independent bandwidth because their groups intersect only at one rank.
  • Calling CPU gloo timing evidence about NVLink or inter-node NCCL performance. The CPU experiment verifies semantics only.
3

Try it yourself

Closed-book, before checking anything

Draw two simulated nodes with two devices each and a single shared outbound link per node. Place a 2 by 2 DP-by-TP mesh once with TP inside nodes and once with TP across nodes. Use the same layer/message ledger and symbolic capacities for both. Mark simultaneous FSDP and TP traffic on shared links and derive serialization and independent-link bounds; explain which placement wins under each capacity ratio.
4

Quiz yourself

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

0 got · 0 missed

  1. 1.Two equal-sized transfers share one saturated directed link. Is their completion time the individual time's maximum?Answer

    No. The link must carry twice the bytes. Ignoring latency, the lower bound is twice the individual transfer time.

  2. 2.Why can EP need a different placement preference from DP?Answer

    EP routes activations between expert owners, often on the layer critical path and with skew. DP reduces gradient tensors with a different readiness and overlap pattern.

  3. 3.Does moving PP across nodes make its transfer cost zero?Answer

    No. Boundary tensors and gradients still cross links and block dependent work. PP often has less frequent communication, not free communication.

5

Practice

  • CS336 Assignment 2: fsdp_tp_calcs

    Section 8.5, all four parts of fsdp_tp_calcs, printed pp. 45 to 46

    Solve the independent-axis and shared-network cases separately. This is a written problem with no public autograded tests. Check your optimum against an enumeration of legal integer factors; the handout's continuous optimum is only a relaxation. Trainlab extends the exercise to placement and EP.

You're done when

Your written solutions distinguish overlapping and shared-resource costs, and both placements have a per-link traffic table with no duplicated bandwidth budget.

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.

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

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.

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

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