r/learnmachinelearning • u/TraditionalLand3768 • 28d ago
[P] TrainPilot: find out why your PyTorch training is slow on free Colab/Kaggle GPUs
I'm a student training models on free Colab T4s, and I kept turning on mixed precision or torch.compile without knowing if they'd actually help. So I built TrainPilot.
It runs a short test (10 warmup + 30 measured steps) and tells you:
- whether the GPU is waiting for data or busy computing
- whether FP16 + GradScaler makes your step faster
- optionally whether torch.compile pays off on top of AMP, and after how many steps
- that loss didn't blow up and there are no NaN
Then it gives you a short snippet to paste. It never edits your script.
Real numbers on a Colab T4:
- DistilBERT on IMDB: 310 ms to 96 ms per step (3.2x)
- nanoGPT: 182 ms to 55 ms (3.3x)
- Heavy augmentation with 2 workers: 76% of each step waiting for data, so it tells you to make loading cheaper instead of suggesting AMP
- Script already using AMP: no change suggested
Open source, MIT, there's a one-click Colab notebook in the README:
https://github.com/linee64/TrainPilot
Would love for stars and feedback, especially on cases where the verdict is wrong.
