Zephon brings elastically deterministic data loading to TorchTitan

News PyTorch Blog · Source account, not independently verified by us.

Zephon is designed to keep TorchTitan training runs on the same data sequence when they resume from a checkpoint with a different number of GPUs. This can make data experiments more comparable, since changing the GPU count with a conventional loader can also change the examples processed and affect measured results.

In a reported test, a 1-billion-parameter model was resumed after step 150, moving from 16 GPUs to 8, 32, and 64. With a standard data loader, the subsequent data sequences and loss curves differed. With Zephon, the article says global batches matched the original run according to their SHA-256 hashes. In separate runs training for 20 billion tokens, scores with the standard loader varied by up to 0.82 points on DCLM Core v1 and 0.64 on FineWeb. With Zephon, the respective spreads were 0.05 and 0.011 points.

Zephon tokenizes, packs, mixes, and batches data during training instead of first creating a prepared copy of the corpus. Its TorchTitan integration replaces the default loader and stores Zephon state in the checkpoint. Resuming requires key settings—including datasets, tokenizer, seed, mixture, context length, and global batch size—to remain unchanged; the lane count must also fit the GPU configuration. Zephon guarantees identical data batches, not identical arithmetic results.

The PyTorch post also explains the pipeline design, checkpoint recovery, and configuration of its logical lanes. Original source: PyTorch

🇬🇧 https://pytorch.org/blog/bringing-elastically-deterministic-data-loading-to-torchtitan-with-zephon

Leave a Comment

The weekly brief: selected developments, projects and videos