Data parallelism
Data parallelism is a way of training a model on many chips at once by giving each chip a copy of the model and a different slice of the training data, then combining their updates.
Training a neural network means showing it batches of examples, measuring its errors and nudging its parameters to reduce them. Data parallelism splits that work across many processors. Each processor, usually a GPU, holds a complete copy of the model. Each receives a different portion of the batch, works out how the parameters should change for its portion, and then all the processors share and average those changes, called gradients, before applying the same update. Every copy stays identical, but together they have processed far more data than one chip could.
The averaging step is a collective operation called all-reduce, in which every processor ends up with the combined result. PyTorch's DistributedDataParallel, a widely used implementation, runs one copy of the model per process, combines gradients with all-reduce, and groups gradients into buckets so that communication can start while the rest of the calculation is still running. Its documentation recommends it over the older single-process DataParallel because it is markedly faster.
A useful picture is a team of examiners marking a pile of exam papers against the same answer key. Each takes a share of the pile, notes where the key seems wrong, and at the end of each round they pool their notes and agree one set of corrections. More examiners clear the pile faster, but only if the meetings to pool notes stay short. In data parallelism, those meetings are the network traffic between chips, which is why fast interconnects matter.
The basic method has a limit: every chip must hold the whole model, plus its gradients and optimiser state, in memory. For large language models that is impossible. Microsoft researchers addressed this in the 2019 ZeRO paper, which splits the optimiser state, gradients and parameters across chips instead of duplicating them on every one; PyTorch's Fully Sharded Data Parallel, which its documentation says was inspired by ZeRO Stage 3, splits parameters, gradients and optimiser state across the workers and gathers the full parameters only briefly when they are needed.
In practice, data parallelism is the first and simplest way to spread training across many chips, and large training runs almost always use it alongside other methods that split the model itself. When a lab says it trained on thousands of GPUs, data parallelism is usually doing much of the work.
It is a training method in which each chip holds a full copy of the model and processes a different part of each batch of data. The chips then average their gradients so every copy applies the same update. It lets training process far more data per step than a single chip could. Data parallelism copies the whole model onto every chip and splits the data. Model parallelism splits the model itself across chips, so each holds only part of it. Large models usually combine both, because they are too big for one chip and need to process huge amounts of data. FSDP stands for Fully Sharded Data Parallel, a PyTorch feature that splits a model's parameters, gradients and optimiser state across data-parallel workers instead of storing a full copy on each. Full parameters are gathered only briefly during computation. PyTorch says it was inspired by the ZeRO Stage 3 technique from Microsoft's DeepSpeed. After every training step the chips must exchange and average their gradients, which can amount to as much data as the model itself. If the network is slow, chips sit idle waiting. Overlapping communication with computation and using fast interconnects keep that waiting short.Common questions
What is data parallelism in deep learning?
What is the difference between data parallelism and model parallelism?
What is FSDP?
Why does data parallelism need fast networking?
Search for "data parallelism", "all-reduce", "DistributedDataParallel" or "ZeRO optimizer" to find tutorials and the original papers. Framework documentation from PyTorch, JAX and DeepSpeed and the research papers on arXiv are the most reliable sources. Vendor benchmark claims about scaling efficiency depend heavily on model size and network, so compare like with like.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.