Unit 3 of 10 · about 4 hours · derive

Compute, memory and checkpoint budgets with uncertainty, and the parallelism interface

The useful budget is the cost of answering a research question, including baselines, failed attempts and evaluation. A model that fits alone may not fit beside a reference policy or rollout buffers.

You'll be able to

  • Derive separate training, rollout, evaluation, host-memory and checkpoint budgets for one experiment.
  • Specify what data, tensor, pipeline, sequence and expert parallelism would partition and communicate.
  • Defend a feasible plan using ranges for unknown workspace, bandwidth and failure overhead.

Covers

Compute, training state, activation, communication and checkpoint budgets with uncertaintyData, tensor, pipeline, sequence and expert parallel interfaces
1

Read

In this order, only the parts listed

0 of 3 done

  1. How to Scale Your Model: training ownership and communicationHow to Scale Your Model

    Part 5: What Do We Mean By Scaling?, Data Parallelism, Fully-Sharded Data Parallelism, Tensor Parallelism, Combining FSDP and Tensor Parallelism, and Pipelining (page read 2026-10-16)

    Use the diagrams and forward/backward algorithms for an analytical plan only. The two-matrix MLP omits attention and gating. The 10-byte parameter ledger excludes gradients and other live storage; add them. Overlap is an assumption, not a guaranteed saving.

  2. Sequence and expert interfaces on GPU systemsHow to Scale Your Model

    Part 12: Expert Parallelism, Pipeline Parallelism and Caveat about latency; Part 5's Note [context parallelism] (pages read 2026-10-16)

    Identify dispatch, combine and sequence exchange boundaries. Do not adopt the source hardware constants or implement a distributed runtime.

  3. Budget the whole studyNeurIPS Paper Checklist

    Q8, Experiments Compute Resource, including preliminary and failed experiments (page read 2026-10-16)

2

Focus on

  • The LLM Foundations units on parameter and FLOP counts and on memory and arithmetic intensity supply the estimates. List every live tensor by owner, shape and dtype; separate device peak, host staging and durable storage.
  • DP partitions examples and combines gradients; TP partitions tensor work; PP partitions layers. Sequence or context partitioning needs attention exchanges. EP moves routed tokens to expert owners and back. State which axes are independent and which reuse ranks.
  • Count valid training tokens separately from padded input tokens, generated tokens and verifier calls. More TP, PP or sequence ranks do not create more unique examples.
  • Give both a single-device plan and an analytical distributed alternative. Include checkpoint copies, conversion scratch space, reference and reward models, and uncertainty intervals that could reverse the preferred plan.
Common mistakes · 3
  • Treating the synthetic dtype ledger as a PyTorch optimizer default. Inspect the tensors your chosen implementation actually stores.
  • Dividing every memory term by every parallelism degree. Gather buffers and replicated tensors do not obey that shortcut.
  • Using peak FLOP/s or link bandwidth as attained throughput. State the assumed rates and test sensitivity to them.
3

Try it yourself

Closed-book, before checking anything

For a synthetic 12-million-parameter model with BF16 weights and gradients, two FP32 Adam moments and no master weights, derive 144,000,000 bytes of persistent training tensors. A weights-plus-moments checkpoint contains 120,000,000 tensor bytes before metadata; it omits gradients. Add activation, workspace, host staging and storage reserves separately. For microbatch 2 sequences, accumulation 4 and length 128 on one data replica, derive 1,024 input tokens per update, then budget all experiment arms and evaluation.
4

Quiz yourself

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

0 got · 0 missed

  1. 1.Does a 120,000,000-byte weights-plus-moments checkpoint imply that the synthetic model trains in that much memory?Answer

    No. Even the stated persistent training tensors need 144,000,000 bytes. Activations, workspace and runtime storage are additional.

  2. 2.Can a sequence split be treated as ordinary DP for attention?Answer

    Not generally. Queries can depend on keys and values held by other sequence owners, so attention needs an explicit exchange and masking contract.

  3. 3.What if the estimated best plan loses at the low end of the bandwidth range?Answer

    The ranking is unresolved under that uncertainty. Measure the decisive rate or choose a more robust feasible alternative; do not report a guaranteed winner.

You're done when

Every arm fits a declared local budget, every distributed tensor has an owner and transfer boundary, and at least one uncertain assumption has a decision-changing sensitivity check.

Only when you can do this without notes.

Leads to

Notes

Resources · 2 for this unit, 9 more in the section
  • NeurIPS Paper ChecklistNeurIPS · support

    Answer Q1 (claims), Q4 to Q8 (reproducibility, code and data, settings, uncertainty, compute including failed runs) and Q11 to Q13 where you share artifacts, as the claim and evidence contract for the final report. Skip the submission rules.

  • How to Scale Your ModelJAX ML Team · depth

    Use the roofline, sharding, training, transformers, profiling and GPU parts (/scaling-book/roofline, /sharding, /training, /transformers, /profiling, /gpus) only to defend the analytical distributed plan. Measured multi-device work belongs to the ML Systems track.

Also in this section

  • LLM Post-Training LaboratoryRoadmap-Final · primary

    Complete the project through its baseline, SFT, preference or reward, RL or reasoning, evaluation, failure campaign, reproduction and extension gates. Keep one versioned artifact chain across the whole track.

  • OLMo Fully Open Training StackAllen Institute for AI · required

    Read Section 6 (clusters, Beaker, stability and operations, hardware utilization, environmental cost) and the evaluation appendices, then trace one released configuration from data and tokenizer through OLMo-core training code, checkpoints and evaluation. Reconstruct only the paths your modification touches and record what was measured versus inferred.

  • Open InstructAllen Institute for AI · required

    Read one recipe path (open_instruct/finetune.py, dpo.py or grpo_fast.py) with its tests and the chat-template and label-masking code in dataset_transformation.py. Make a bounded tested change on a small model or fixture. Its native evaluations are unmaintained and its single-GPU smoke launcher needs Beaker, so evaluate with a separately pinned evaluator.

  • CS336 Assignments 4 and 5 - Integration HandoffStanford University · support

    Reuse the data and alignment artifacts already completed. Connect their versions through a single manifest and rerun one clean baseline before the extension.

  • RLHF Book Companion CodeNathan Lambert · support

    Use one complete module path (for example direct_alignment/ or policy_gradients/) as the small reference implementation, with model, context and sample sizes cut to fit your GPU. Trace one objective end to end, add resume and regression coverage, then compare the modified and unchanged paths.

  • The Turing Way - Reproducible ResearchThe Turing Way Community · support

    Use the chapters on reproducible environments, testing, code review, research data management and research compendia (under book.the-turing-way.org/reproducible-research/) to package the final artifact for an independent clean run.

  • Tulu 3, Section 8.2 (Insights from the Unfruitful)Allen Institute for AI · support

    Read Section 8.2 for how a team reports what did not work, then write your own negative results the same way.

  • nanoGPT and TRL as Modifiable CodeAndrej Karpathy; Hugging Face · support

    If OLMo-core or Open Instruct is too heavy for your machine, make the bounded tested change in nanoGPT (commit 3adf61e) or in a TRL 1.15.0 trainer or collator instead, with a frozen-batch oracle before and after.

  • Machine Learning Engineering - Fault Tolerance and ReproducibilityStas Bekman · reference

    Use training/fault-tolerance/, training/reproducibility/README.md and training/emulate-multi-node.md for the vocabulary of the analytical failure and retry plan.