Practical overview
When it fits
Use it when a PyTorch training workflow needs structure for pretraining, fine-tuning or GPU-scale execution, especially when the work is managed in Python.
Who it is for
- Python developers building deep-learning systems
- Machine-learning engineers adapting existing models through fine-tuning
- Teams running PyTorch workloads across small or large GPU deployments
Documented uses
- Build reusable pretraining workflows
- Create fine-tuning pipelines for existing AI models
- Organize repeatable machine-learning experiments in Python
- Scale model training across multiple GPUs
- Pair model training with a custom LitServe inference server
Requirements & limits
The project is available as a public, open-source repository under the Apache-2.0 license. Platform contexts listed in the evidence include Linux, Windows, macOS, CLI and desktop environments.
- It is a framework for developer-managed training workflows, not described here as a hosted model-training service.
- Its stated scope includes both pretraining and fine-tuning.
- The PyTorch ecosystem is a central technical dependency.
- The project is intended to span local and distributed GPU environments.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Lightning and define a training workflow
Set up Lightning and prepare the README’s example model and MNIST data for training.
Before you start
- Python environment with pip
- torch and torchvision for the example imports; the README notes torchvision installation separately
Steps
Install Lightning with the command below.
pip install lightningIn a Python file, define a
LightningModulewith a model,training_step, andconfigure_optimizers, following the README’s autoencoder example.Create the MNIST dataset with
download=Trueand a tensor transform, then split it into training and validation sets.
Expected outcome
Lightning is installed, and the example model and data workflow are defined; the documented excerpt does not show the subsequent training invocation.
Guide limitations
- The example’s training execution stage is not included here.
- The README only notes, without giving a command in the example, that torchvision may need to be installed separately.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 30 September 2026
- Original website title
- Lightning-AI/pytorch-lightning · Official homepage title · retained in its source language

