A forward pass feeds input data through a model to produce outputs. Training then compares those outputs with desired values to calculate a loss. section 5.2 section 5.8
A basic training iteration proceeds as follows:
- Run the forward pass to produce predictions. section 5.8
- Calculate the loss by comparing predictions with measured or desired outputs. section 5.2
- Run the backward pass, update parameters with an optimizer, and clear accumulated gradients before the next iteration. section 5.8
The same pass across two GPUs
With two GPUs and a batch of 20, each device can process 10 inputs independently using a replicated model. Each produces its own loss; after backward passes, gradients must be aggregated before updating shared parameters. section 16.3
Figure 16.4 The distributed training steps—forward pass (1), backward pass (2), and update (3) parameters—but missing a critical step since models have different gradients
The diagram connects the forward pass to the backward pass and parameter update, while highlighting gradient synchronization in distributed training. section 16.3







