Distributed training often requires each rank to take the same number of steps. Suppose a dataset has ten examples and four ranks. A sampler that does not drop the tail may pad the index list to twelve and give three indices to each rank. Two examples are seen twice in that epoch. PyTorch's DistributedSampler documentation says drop_last=False adds extra indices to make the dataset evenly divisible, while drop_last=True drops the tail. Equal work does not imply one exposure per example.

For a huge dataset and a few ranks, two extra indices may be irrelevant. For a small fine-tuning or evaluation set with many ranks, the fraction can matter. In this toy epoch it is two extra exposures out of twelve draws. It is not a claim that the same two examples are always duplicated after shuffling. If the training loop calls set_epoch(epoch) as documented, the shuffle can change which indices receive the extra exposure across epochs. Without it, the shuffle order can repeat in a way you did not intend. With drop_last=True, the opposite tradeoff appears: in this example two of ten examples are absent from that epoch.

I would log dataset IDs per rank for a small test epoch and compare total draws, unique IDs and per-ID counts. Check how the trainer defines an epoch, especially if it uses a streaming dataset or custom sampler rather than PyTorch's map-style DistributedSampler. For validation, aggregate by unique example ID or use an evaluation sampler that avoids padded duplicates. Averaging per-rank accuracy over duplicated validation examples can bias a small metric. In training, decide whether unequal last batches, tail dropping, or controlled repetition better matches the objective.

Does repetition automatically make the model worse? No. Sampling with replacement and repeated training epochs are normal choices. The error is to report “one full pass over each example” or a unique-example validation score when the sampler did something else. The index padding changes the exposure count even with a perfectly functioning distributed optimizer.

Without shuffling, an illustrative padded list is 0 through 9 followed by 0 and 1. Striding that list across four ranks gives rank 0 the indices 0, 4, 8. Rank 1 gets 1, 5, 9, rank 2 gets 2, 6, 0 and rank 3 gets 3, 7, 1. Each rank has three draws, while 0 and 1 occur twice globally. A rank-local unique count cannot establish a global unique-example count.

Distinguish the sampler’s drop_last option from the DataLoader’s option with the same name. The former determines divisibility across ranks. The latter drops an incomplete local batch after sampling. With a local batch size of two in this fixture, dropping the last local batch leaves eight draws instead of the twelve padded draws. Inspect both settings and the realized IDs rather than inferring coverage from either flag alone.

For validation, a count of correct draws divided by total draws estimates a draw-weighted metric. If the stated metric weights each original example once, eliminate padded duplicates through a suitable sampler or global ID-aware aggregation before computing it. Do not average rank metrics with different valid denominators without weighting. Compare the distributed result with a single-process fixture containing the same unique IDs.