What problem does it solve?
PyTorch Lightning removes the repetitive engineering burden of writing and debugging distributed PyTorch training loops, so you can focus on your model and experiments.
Core Features & Use Cases
- Clean training loops with LightningModule: Move core logic into
training_step, validation_step, and configure_optimizers without manual device transfers.
- Scales to distributed and production setups: Use
Trainer for multi-GPU training via DDP, and for large-model sharding with FSDP and DeepSpeed (as supported by Lightning strategies).
- Built-in engineering essentials: Automatic checkpointing, logging, progress reporting, and mixed precision to reduce common failure points.
Use case: You have a research model that trains correctly on one GPU, and you need to scale to 8 GPUs while keeping the same code and ensuring validation, checkpointing, and mixed precision work reliably.
Quick Start
Train your model on two GPUs with: set up a LightningModule and call Trainer with accelerator='gpu' and devices=2.