Lightning-AI/pytorch-lightning

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

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 52 minutes ago
Added to GitGenius on April 23rd, 2023
Created on March 31st, 2019
Open Issues & Pull Requests: 1,084 (+0)
Number of forks: 3,779
Total Stargazers: 31,304 (+0)
Total Subscribers: 255 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 49.0 days
Mean response time: 326.4 days
90th percentile: 1105.1 days
Tracked items: 1,077

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 99% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Work labelled "ver: 2.5.x" is answered fastest, typically in about 2 days, while "question" waits about 7 months. 55% of tracked open issues have had no activity in three months. Only 2% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 679
New in 7 days: 5
Closed in 7 days: 0
Avg open age: 745 days
Stale 30+ days: 658
Stale 90+ days: 626

Recent activity

Opened in 7 days: 4
Closed in 7 days: 0
Comments in 7 days: 3
Events in 7 days: 16

Top labels

  • bug (1,294)
  • help wanted (603)
  • feature (583)
  • question (302)
  • needs triage (226)
  • docs (217)
  • won't fix (213)
  • ver: 2.5.x (184)

Detailed Description

PyTorch Lightning is a deep learning framework designed to streamline the process of pretraining and finetuning AI models at any scale, from single CPUs to distributed clusters of 10,000+ GPUs without requiring code modifications. Written in Python and built on top of PyTorch, it addresses a fundamental pain point in deep learning development: the substantial amount of repetitive engineering code required to handle backpropagation, mixed precision training, multi-GPU coordination, and distributed training across multiple nodes.

The framework operates on a clear philosophy of separating scientific model logic from engineering infrastructure. Rather than forcing users to rewrite boilerplate code for each project, PyTorch Lightning automates these common patterns while preserving full control over model implementation. The repository describes this relationship through an analogy: if PyTorch is JavaScript, PyTorch Lightning is ReactJS or NextJS, providing a higher-level abstraction layer that reduces complexity without sacrificing flexibility.

PyTorch Lightning comprises two core packages that exist on a continuum of abstraction. The primary PyTorch Lightning package handles training and deployment at scale with automatic management of distributed training, checkpointing, experiment tracking, and reproducibility. For researchers and practitioners requiring more granular control, Lightning Fabric provides expert-level access to lower-level operations while still benefiting from Lightning's infrastructure improvements.

The repository demonstrates broad applicability across diverse machine learning tasks. Available examples span image classification with ResNet-34, image segmentation with ResNet-50, object detection using Faster R-CNN, text classification with BERT models, text summarization using Hugging Face transformers, audio generation with transformer models, LLM finetuning on Meta Llama 3.1 8B, diffusion-based image generation, recommendation systems using factorization and embeddings, and time-series forecasting with LSTM architectures. This range illustrates the framework's capability to handle pretraining, finetuning, and training workflows across different domains.

The project maintains active development with substantial community engagement.

The framework integrates with Lightning Cloud, a managed platform that eliminates infrastructure management by providing GPU access, autoscaling, monitoring, and a free tier through a single command. Users can alternatively deploy PyTorch Lightning on their own hardware or preferred cloud providers. The repository also connects to LitServe, a complementary tool for building custom inference servers in pure Python for model serving scenarios.

PyTorch Lightning fundamentally transforms how practitioners approach deep learning development by automating infrastructure concerns while maintaining the flexibility to scale from research prototyping to production deployment without code changes.