Home/Inference & Serving/pytorch-lightning
pytorch-lightning logo

pytorch-lightning

Lightning-AI/pytorch-lightning

Pretrain, finetune ANY AI model of ANY size on 1 or 10,000+ GPUs with zero code changes.

GraphCanon updated 3w · GitHub synced 3w · 27 views this month

31k stars3.8k forksLast push 3w Python Apache-2.0

Decision brief

PyTorch Lightning scales PyTorch models across GPUs with minimal code changes.

Good fit when

  • Scalable ML model training with consistent API across single to multiple GPUs
  • Zero-code-change requirement when expanding from one GPU to many, including up to 10,000+ GPUs

Avoid when

  • For lightweight models requiring minimal configuration or manual control over model distribution
  • Projects that target environments without access to multi-GPU setups and do not require scalability features

Observed Jul 12, 2026 · Source: enrich:decision_facts

Verify the decision

Maintenance and security

Full trust report
Maintenance
Very active (0d since push)
As of 3w
Provenance
Not a fork · Organization account
As of 3w
Security (OSV)
No criticals
As of 1mo

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

pip install pytorch-lightning
PyPI

How it fits your stack(1)

Typed graph edges - alternatives, integrations, successors, and dependencies. Ranked by relationship type, not raw GitHub stars.

Relationship graph

Optional deeper exploration of typed edges and category neighbours.

Similar tools

Same-category neighbours not already linked as typed edges.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

A framework for training and serving machine learning models, supporting PyTorch models to scale with ease on multiple GPUs.

Capability facts

Languages
python

Source: github.language+pyproject.toml · Aug 3, 2026

Categories

Compatibility

Sourced claims from the README excerpt - not unsourced marketing copy.

Python runtimePython

Source: README excerpt (regex_v1, Aug 3, 2026)

pip install lightning
Source link

Tags

README

Quick start

Install Lightning:

pip install lightning
Advanced install options

Install with optional dependencies

pip install lightning['extra']

Conda

conda install lightning -c conda-forge

Install stable version

Install future release from the source

pip install https://github.com/Lightning-AI/lightning/archive/refs/heads/release/stable.zip -U

Install bleeding-edge

Install nightly from the source (no guarantees)

pip install https://github.com/Lightning-AI/lightning/archive/refs/heads/master.zip -U

or from testing PyPI

pip install -iU https://test.pypi.org/simple/ pytorch-lightning

! pip install torchvision

import torch, torch.nn as nn, torch.utils.data as data, torchvision as tv, torch.nn.functional as F import lightning as L

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.