The arithmetic
Seven inputs: training examples, epochs, per-device batch size, gradient accumulation steps, GPUs, warmup ratio, and optionally average tokens per example. Counts must be whole numbers; examples may be 0, the others must be at least 1.
- Effective batch = per-device batch × accumulation × GPUs.
- Steps per epoch = ceil(examples / effective batch), keeping a partial final batch.
- Total steps = steps per epoch × epochs.
- Warmup steps = ceil(total steps × ratio).
- Tokens seen = examples × epochs × tokens per example, shown only when you fill in the optional field.