How models are made training pipeline · stage 6
The open training stack: the toolchain behind multi-GPU trainingpractitioner-perspective methodology · key facts carry official sources
Once a model stops fitting on one GPU: how data parallelism, ZeRO, tensor and pipeline parallelism compose, and which layer DeepSpeed, Megatron-LM, torchtitan, nanotron and TRL each sit at. A practitioner's selection map; term pages live on the Learn site, cross-linked, not duplicated.
What this guide covers
As a model grows, the first wall is not the algorithm — it does not fit.
When one GPU cannot hold parameters, gradients and optimiser states, training must be split across many cards.
This guide is the taxonomy of splitting methods and which layer each open toolchain sits at.
This site runs no benchmarks; tool capabilities follow the official repositories' self-descriptions and paper figures, sourced at the end.
Three ways to split: data, tensor, pipeline
Data parallelism: every card holds the full model, each chews a batch of data, gradients are aggregated.
Simple, but the model itself must fit — that is the ceiling.
ZeRO and its descendants (FSDP): the model still runs data-parallel,
but optimiser states, gradients and parameters are sharded across cards and fetched back when needed.
The core insight of the ZeRO paper (arXiv 1910.02054): data parallelism's memory waste is redundancy, not necessity.
PyTorch's FSDP is the official implementation of this idea (arXiv 2304.11277).
Tensor parallelism: one layer's matrix multiplications are cut across several cards computed simultaneously.
The most communication-dense; normally used only between cards linked by NVLink inside one machine.
The original method is the Megatron-LM paper (arXiv 1909.08053).
Pipeline parallelism: split by layer into stages, the forward pass moves stage by stage like an assembly line.
Less communication, but mind the “bubbles” — stretches where the pipeline idles.
Real large-model training stacks all three (industry shorthand: 3D parallelism),
sizing each dimension to the cluster topology. The parallel configuration the Llama 3 paper self-reports is exactly such a combination.
The toolchain map: who sits at which layer
DeepSpeed (Microsoft's official repository): the general distributed-training optimisation library, where the ZeRO line landed.
Megatron-LM (NVIDIA's official repository): the scaled transformer training framework,
the reference implementation of tensor parallelism, the training base under many open-weight models.
torchtitan (PyTorch's official repository): PyTorch-native training platform,
offering FSDP, tensor and pipeline parallelism as native combinations.
nanotron (Hugging Face's official repository): a minimal 3D-parallel training library,
self-described by the team as “minimalistic” — the entry point for learning parallel strategies by reading code.
TRL (Hugging Face's official repository): sits at the post-training layer — the toolchain for SFT, reward models,
DPO and RLHF, used after the pre-training framework.
Judgement basis for selection (not a ranking): to understand parallelism, start from nanotron or torchtitan;
to reproduce large-model training, see what the target model's official training notes say it used;
for post-training fine-tuning only, TRL plus FSDP is usually enough — pre-training-grade parallelism never comes up.
Common traps
Mistaking the framework for the recipe. The same framework with a different parallel configuration can differ several-fold in MFU.
Frameworks decide “can it run”; tuning decides “how expensive it runs”.
Underestimating communication. Tensor parallelism across machines hits a bandwidth wall that eats performance invisible in papers.
The parallel-dimension layouts papers self-report (which dimensions stay in-machine, which cross machines) are worth copying as structure, not as numbers.
Confusing the training stack with the inference stack. Training frameworks manage “how to build it”;
vLLM-class inference engines manage “how to run it” — the optimisation targets are completely different.
Benchmarking open stacks against closed giants. Big labs' cluster network topology, failure recovery and
checkpointing strategies are all in-house. Open stacks give you methods of the same order, not utilisations of the same order.
How this differs from the Learn site
The Learn site's tensor parallelism and
pipeline parallelism pages are user-perspective explainers;
this guide is the practitioner's selection map: which layer each tool sits at, and where the traps are.
Same concept, different depth on each side, cross-linked without duplication.
For the bookkeeping method of corpora and compute see the previous guide, “Data and compute”.
Sources
- ZeRO paper (arXiv 1910.02054, eliminating memory redundancy in data parallelism; abstract page fetched directly 2026-10-21):https://arxiv.org/abs/1910.02054
- Megatron-LM paper (arXiv 1909.08053, the original tensor-parallel method; abstract page fetched directly 2026-10-21):https://arxiv.org/abs/1909.08053
- FSDP paper (arXiv 2304.11277, PyTorch's official fully-sharded data-parallel experience; abstract page fetched directly 2026-10-21):https://arxiv.org/abs/2304.11277
- DeepSpeed official repository (Microsoft's official distributed training and inference optimisation library; fetched directly, HTTP 200, 2026-10-21):https://github.com/deepspeedai/DeepSpeed
- Megatron-LM official repository (NVIDIA's official research framework for scaled transformer training; fetched directly, HTTP 200, 2026-10-21):https://github.com/NVIDIA/Megatron-LM
- torchtitan official repository (PyTorch's official native platform for training generative models; fetched directly, HTTP 200, 2026-10-21):https://github.com/pytorch/torchtitan
- nanotron official repository (Hugging Face's official minimal LLM 3D-parallel training; fetched directly, HTTP 200, 2026-10-21):https://github.com/huggingface/nanotron
- TRL official repository (Hugging Face's official transformer training with reinforcement learning; fetched directly, HTTP 200, 2026-10-21):https://github.com/huggingface/trl
Base source snapshot: 2026-10-21; item-specific additions and check scope appear in the text and source labels. Check original specifications, methods and conditions.