Skip to content

High-level PyTorch training framework that removes boilerplate while scaling from one GPU to multi-node distributed runs.

CCM score
55 of 100
skills.sh installs
1.1K
GitHub stars
14.9K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the LightningModule and Trainer workflow, from converting raw PyTorch loops to validation, testing, and checkpointed training
  • Includes DDP, FSDP, and DeepSpeed strategies, plus mixed precision (bf16, fp16) and gradient accumulation via accumulate_grad_batches
  • Provides callbacks such as ModelCheckpoint, EarlyStopping, and LearningRateMonitor, with automatic TensorBoard logging of metrics
  • Designed for teams that want standardized training loops and a single codebase across laptop, GPU, TPU, and cluster environments

Install

$ npx -y skills add orchestra-research/ai-research-skills --skill pytorch-lightning -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

PyTorch Lightning - High-Level Training Framework

Quick start

PyTorch Lightning organizes PyTorch code to eliminate boilerplate while maintaining flexibility.

Installation:

pip install lightning

Convert PyTorch to Lightning (3 steps):

import lightning as L
import torch
from torch import nn
from torch.utils.data import DataLoader, Dataset

# Step 1: Define LightningModule (organize your PyTorch code)
class LitModel(L.LightningModule):
    def __init__(self, hidden_size=128):
        super().__init__()
        self.model = nn.Sequential(
            nn.Linear(28 * 28, hidden_size),
            nn.ReLU(),
            nn.Linear(hidden_size, 10)
        )

    def training_step(self, batch, batch_idx):
        x, y = batch
        y_hat = self.model(x)
        loss = nn.functional.cross_entropy(y_hat, y)
        self.log('train_loss', loss)  # Auto-logged to TensorBoard
        return loss

    def configure_optimizers(self):
        return torch.optim.Adam(self.parameters(), lr=1e-3)

# Step 2: Create data
train_loader = DataLoader(train_dataset, batch_size=32)

Details

Repository
github.com/orchestra-research/ai-research-skills
Categories
Data Science & Analytics, AI Agents & LLM Apps, Python
First seen
Jun 3, 2026

Questions

What does the pytorch-lightning skill do?

The pytorch-lightning skill guides an agent through PyTorch Lightning, a high-level training framework with a Trainer class, automatic distributed training (DDP, FSDP, DeepSpeed), a callbacks system, and minimal boilerplate. It shows how to convert plain PyTorch training code into a LightningModule and scale the same code from a laptop to a multi-GPU setup.

How do I install the pytorch-lightning skill?

Run npx -y skills add orchestra-research/ai-research-skills --skill pytorch-lightning -y inside your project. Once installed, the pytorch-lightning skill lets the agent write Lightning training loops with validation, checkpointing, early stopping and learning rate scheduling.

What does pytorch-lightning need before it works?

The pytorch-lightning skill relies on the lightning, torch and transformers packages, which you install with pip install lightning. The pytorch-lightning skill also expects a GPU setup if you want distributed training with DDP, FSDP or DeepSpeed.

Where does pytorch-lightning sit in its category?

The pytorch-lightning skill belongs to the Data Science & Analytics category on Claude Marketplaces. Within that category it appears alongside azure-kusto, analyze-project, run-train, explore-run and add-analytics-instrumentation, and it stands apart by focusing on Lightning's training loop, callbacks and multi-GPU scaling.

More from orchestra-research/ai-research-skills

All 92

Similar to Pytorch Lightning

More Data Science & Analytics