PyTorch Lightning

Structures PyTorch training code so device placement, mixed precision, checkpointing and multi-GPU scaling are handled by a Trainer.

Lightning separates research logic (the model and its steps) from engineering concerns such as distributed strategies, logging and checkpoints. You keep writing PyTorch, but the boilerplate training loop moves into a reusable Trainer. Lightning Fabric offers a lighter option for those who want to keep their own loop. It is maintained by Lightning AI.

Type
AI framework
Category
AI & ML
Maintainer
Lightning AI
First released
2019
License
Open source (Apache-2.0)
Pricing
Open source — The library is free; Lightning AI also sells a hosted development platform.
Level
Intermediate
Technologies
python, deep-learning
GitHub stars
31,491
Weekly downloads
1,160,416 (pypi)
Latest release
[object Object]
Last verified
26 Nov 2026

What PyTorch Lightning is used for

  • Organising research training code
  • Scaling from one GPU to many
  • Reproducible experiments

Strengths

  • Removes training-loop boilerplate
  • Many built-in strategies and precision modes
  • Integrates with most experiment trackers

Limitations

  • Another abstraction layer to debug
  • Upgrades between major versions have required refactors

PyTorch Lightning alternatives

How it relates to other tools

Built with the same technologies

Learn PyTorch Lightning

Official links

Sources

Explore