PyTorch Training Cost Estimator

Figure out which GPU is most cost effective for training your PyTorch model.

The API uses torch.cuda.Event to record the timing for 10 steps (after "warming up" the training loop). An estimate for how long a full epoch will take is calculated using the timing from the 10 steps. Modal's pricing rate for the specific GPU is applied to the timing estimate to come up with the per-epoch cost.


Try one of These Examples:


Input the following PyTorch Code

Compiler Settings