๐ Ready-to-go Examplesโ๏ธ
This section contains ready-to-run examples demonstrating various features of
the ezpz library.
New to ezpz? Start with ezpz.examples.test for a minimal
DDP training loop, then move to ezpz.examples.fsdp when you're
ready to shard model parameters. The remaining examples layer on additional
features โ Vision Transformers, tensor parallelism, Hugging Face integration โ
so pick whichever matches your workload.
Prerequisitesโ๏ธ
- ezpz installed:
pip install ezpzorpip install git+https://github.com/saforem2/ezpz - PyTorch (auto-detected at runtime)
- MPI for multi-GPU training (
mpi4py+ MPICH or OpenMPI). Single-GPU and CPU work without MPI.
Running Examplesโ๏ธ
All examples use the same launch pattern:
For example, to run the test example:
On a laptop this uses a local mpirun; inside a PBS or SLURM job, the
scheduler is auto-detected.