$npx skillfedfor your agent

lightning

The Deep Learning framework to train, deploy, and ship AI products Lightning fast.

With conditionsPyPI Artificial IntelligenceReleased May 20266.4M downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — lightning-2.6.5-py3-none-any.whl
v2.6.5 · released 2026-05-27 · Python >=3.10 · 9 runtime deps: PyYAML, fsspec, lightning-utilities, packaging, torch, torchmetrics, tqdm, typing-extensions

Yes, if you train PyTorch models at any scale beyond single-GPU prototypes. Lightning eliminates repetitive distributed training boilerplate while keeping model code readable and portable. One known vulnerability (PYSEC-2026-3624) should be reviewed before production use, but the active maintenance status and permissive license make it a solid choice for research and production workflows.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >=3.10 and torch as a runtime dependency; GPU training requires CUDA-compatible hardware and drivers.
  • Low friction: pure Python wheel with 9 runtime dependencies including torch and torchmetrics.
  • Actively maintained with recent releases; last commit 2026-08-09 and 31287 repository stars indicate ongoing development.

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 is permissive, allowing commercial use, modification, and distribution with minimal restrictions—suitable for most projects.

last release 2026-05-27 (79 days) · last repo commit 2026-08-09 · 31,287 stars

1 known vulnerabilities (OSV.dev, 2026-08-14) · 6,376,248 downloads/mo, #1,919 on PyPI

Verify before relying

pip install lightning

import lightning as L
import torch.nn as nn

class LitModel(L.LightningModule):
    def __init__(self):
        super().__init__()
        self.layer = nn.Linear(10, 1)
    def training_step(self, batch, batch_idx):
        return self.layer(batch[0]).mean()
    def configure_optimizers(self):
        return torch.optim.Adam(self.parameters())

trainer = L.Trainer()
trainer.fit(model, train_dataloader)
  • Scope and severity of PYSEC-2026-3624 vulnerability and whether it affects typical training workflows.
  • Whether the framework's abstraction overhead is acceptable for custom training loops requiring fine-grained control.
Same gist for agents: .md · .json

What it is and what it does

Lightning is a training framework built on top of PyTorch that eliminates boilerplate infrastructure code. Instead of manually managing backpropagation, mixed precision, distributed training, and device placement across projects, you define your model as a LightningModule with training_step and configure_optimizers methods, then pass it to a Trainer that handles the rest. The framework scales from single CPU to thousands of GPUs across multiple nodes without changing your core model code.

It sits between plain PyTorch (which requires you to write all infrastructure) and higher-level frameworks that hide model details. You retain full control over model logic while Lightning automates the engineering: logging, checkpointing, gradient accumulation, distributed synchronization, and hardware acceleration. It supports pretraining and finetuning workflows across diverse tasks—image classification, segmentation, text, audio, LLM finetuning, and time-series forecasting.

Use it for

  • Scale a single-GPU PyTorch model to multi-node training without rewriting training loops.
  • Pretrain or finetune large models (LLMs, diffusion models) with automatic mixed precision and distributed strategies.
  • Manage experiment tracking, checkpointing, and logging across multiple training runs.
  • Train on TPUs or other accelerators by changing one Trainer parameter instead of rewriting device logic.
  • Build reproducible research code that separates model definition from training infrastructure.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you train PyTorch models at any scale beyond single-GPU prototypes.

Lightning eliminates repetitive distributed training boilerplate while keeping model code readable and portable. One known vulnerability (PYSEC-2026-3624) should be reviewed before production use, but the active maintenance status and permissive license make it a solid choice for research and production workflows.

Install

lightning on PyPI

Before you install

Low friction: pure Python wheel with 9 runtime dependencies including torch and torchmetrics. Actively maintained with recent releases; last commit 2026-08-09 and 31287 repository stars indicate ongoing development.

Requires Python >=3.10 and torch as a runtime dependency; GPU training requires CUDA-compatible hardware and drivers.

License in practice

Apache-2.0 is permissive, allowing commercial use, modification, and distribution with minimal restrictions—suitable for most projects.

Quickstart

pip install lightning

import lightning as L
import torch.nn as nn

class LitModel(L.LightningModule):
    def __init__(self):
        super().__init__()
        self.layer = nn.Linear(10, 1)
    def training_step(self, batch, batch_idx):
        return self.layer(batch[0]).mean()
    def configure_optimizers(self):
        return torch.optim.Adam(self.parameters())

trainer = L.Trainer()
trainer.fit(model, train_dataloader)

Verify before relying

  • Scope and severity of PYSEC-2026-3624 vulnerability and whether it affects typical training workflows.
  • Whether the framework's abstraction overhead is acceptable for custom training loops requiring fine-grained control.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
9 packages
PyYAMLfsspeclightning-utilitiespackagingtorchtorchmetricstqdmtyping-extensionspytorch-lightning
MaintenanceActively maintained 79 days since the last release
Last repo commit
First released
Downloads6,376,248 / month, #1,919 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilities1 PYSEC-2026-3624
Classifiers
Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: Information Analysis

Evidence: lightning-2.6.5-py3-none-any.whl

Tags

Capabilities
pytorch training frameworkdistributed deep learningmulti-gpu training automationpytorch lightning trainerscale pytorch without code changesdeep learning infrastructurepytorch model training framework
Topics
pytorch-trainingdistributed-computingdeep-learning
PyPI keywords
deep learningpytorchAI

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “multi-gpu training automation”

  • lightningLightning is a framework that organizes PyTorch code to automate…
  • accelerateAccelerate abstracts away distributed training boilerplate for…
  • ring-flash-attnImplements ring attention with flash attention for distributed…

Give your agent the search over MCP, or paste the wish link into any chat.

More Artificial Intelligence packages

litellm With conditions
PyPI · Artificial Intelligence · released Aug 2026

LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.

Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.

MITcompiled wheel
682.8Mdownloads / mo
huggingface-hub Worth it
PyPI · Artificial Intelligence · released Aug 2026

Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.

Install it if you work with Hugging Face Hub models or datasets.

Apache-2.0pure Python · 3.10.0+
442.4Mdownloads / mo
langchain Worth it
PyPI · Python Modules · released Aug 2026

LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.

MITpure Python
315.4Mdownloads / mo
hf-xet With conditions
PyPI · Artificial Intelligence · released Aug 2026

hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.

Apache-2.0compiled wheel · 3.8+
258.4Mdownloads / mo
tokenizers Worth it
PyPI · Artificial Intelligence · released Apr 2026

Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.

Apache-2.0compiled wheel · 3.10+
222.9Mdownloads / mo
transformers Worth it
PyPI · Artificial Intelligence · released Aug 2026

Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.

Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.

permissive licensepure Python · 3.10.0+
186.6Mdownloads / mo

See also lightning-sdk · litdata · pytorch-lightning · nv-one-logger-pytorch-lightning-integration · fairscale · litserve · pytorch-forecasting · pytorch-ignite · trainer · agentlightning