Data Parallelism
Data Parallelism allows you to speed up model training by using multiple GPUs. It is suitable for training involving large datasets or large batch sizes.
This is the most documented and easiest distribution method to implement.
Data Parallelism can be combined with Model Parallelism when the model to be trained is too large to fit in the memory of a single GPU. See the dedicated documentation page on hybrid parallelism.
Principle
Data Parallelism involves replicating the model across all GPUs and splitting the data batch into mini-batches. Each GPU then processes a mini-batch for parallel training across all mini-batches.

Diagram of data batch distribution across 256 GPUs. Source.
In this case, the training process is as follows:
- The training script is executed in distributed mode across multiple processes (i.e., multiple GPUs). Each GPU:
- reads a portion of the data (mini-batch).
- trains the model using its mini-batch.
- computes gradients based on its local information (local gradients).
- The global gradients are calculated by averaging the local gradients returned by all GPUs. At this stage, it is necessary to synchronise the different processes.
- The model is updated on each GPU.
- The algorithm is repeated until the end of training.
Representation of distributed training across 3 GPUs using the data parallelism method. Source.
Practical Implementation
- Practical Implementation with PyTorch
- Practical Implementation with PyTorch Lightning
- Practical Implementation with TensorFlow
- Practical Implementation with Horovod
Resources
- The Optimised Deep Learning on Jean-Zay training offered by IDRIS covers, among other topics, training parallelisation, including data parallelism. More information is available here.