Forward pass, backward pass, optimizer step, checkpointing, logging. What each phase costs and where engineers spend their debugging time.

Forward pass: the cheap part

Input goes through the model, activations are computed layer by layer, loss comes out at the end.

Backward pass: where the time goes

Gradients are computed layer by layer in reverse. This is the expensive part of each training step.

Optimizer step: updating the weights

Gradients are computed. Now you update the model parameters.

Checkpointing: the insurance you forget to test

Periodically save the model state so you can resume if something fails.

Logging and monitoring: the stuff nobody budgets time for

Loss curves, learning rate, gradient norms, GPU memory, throughput.

Data loading: the phase that isn't a phase

Data loading isn't a step in the training loop - it runs in parallel. But when it falls behind, everything else waits.