Gradient checkpointing stores only some activations and recomputes the rest during the backward pass, trading about 20% to 30% more compute for large memory savings.
Gradient accumulation sums gradients over several micro-batches before one optimizer step, giving a large effective batch size without the memory cost.
Mixed precision (BF16 or FP16) halves memory for activations and speeds up math; BF16 usually needs no loss scaling, while FP16 does.
Other savings: 8-bit or paged optimizers, FlashAttention, and shorter sequences.
Loading…