PyTorch Lightning Training
Orchestra-Research/AI-Research-SKILLs
Shows how to organize PyTorch training with Lightning's LightningModule and Trainer, covering validation, DDP, callbacks and learning-rate scheduling.
PyTorch Lightning framework for scalable model training and research
$ npx skills add wentorai/research-plugins --skill pytorch-lightning-guide -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install wentorai/research-plugins pytorch-lightning-guide --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/domains/ai-ml/pytorch-lightning-guide .claude/skills/pytorch-lightning-guide && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "pytorch-lightning-guide" agent skill from https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/pytorch-lightning-guide into .claude/skills/pytorch-lightning-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytorch-lightning-guide", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/pytorch-lightning-guideType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add wentorai/research-plugins --skill pytorch-lightning-guide -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install wentorai/research-plugins pytorch-lightning-guide --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/domains/ai-ml/pytorch-lightning-guide .agents/skills/pytorch-lightning-guide && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "pytorch-lightning-guide" agent skill from https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/pytorch-lightning-guide into .agents/skills/pytorch-lightning-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytorch-lightning-guide", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add wentorai/research-plugins --skill pytorch-lightning-guide -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install wentorai/research-plugins pytorch-lightning-guide --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/domains/ai-ml/pytorch-lightning-guide .cursor/skills/pytorch-lightning-guide && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "pytorch-lightning-guide" agent skill from https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/pytorch-lightning-guide into .cursor/skills/pytorch-lightning-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytorch-lightning-guide", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/wentorai/research-plugins.git --path skills/domains/ai-ml/pytorch-lightning-guide--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add wentorai/research-plugins --skill pytorch-lightning-guide -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install wentorai/research-plugins pytorch-lightning-guide --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/domains/ai-ml/pytorch-lightning-guide .gemini/skills/pytorch-lightning-guide && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "pytorch-lightning-guide" agent skill from https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/pytorch-lightning-guide into .gemini/skills/pytorch-lightning-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytorch-lightning-guide", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install wentorai/research-plugins pytorch-lightning-guideInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add wentorai/research-plugins --skill pytorch-lightning-guide -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/domains/ai-ml/pytorch-lightning-guide .github/skills/pytorch-lightning-guide && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "pytorch-lightning-guide" agent skill from https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/pytorch-lightning-guide into .github/skills/pytorch-lightning-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytorch-lightning-guide", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add wentorai/research-plugins --skill pytorch-lightning-guide -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install wentorai/research-plugins pytorch-lightning-guide --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/domains/ai-ml/pytorch-lightning-guide .opencode/skills/pytorch-lightning-guide && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "pytorch-lightning-guide" agent skill from https://github.com/wentorai/research-plugins/tree/main/skills/domains/ai-ml/pytorch-lightning-guide into .opencode/skills/pytorch-lightning-guide/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytorch-lightning-guide", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
pytorch-lightning-guidePyTorch Lightning framework for scalable model training and research
Pytorch Lightning Guide is an agent skill from wentorai/research-plugins. PyTorch Lightning framework for scalable model training and research
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering, covering Deep learning and Fine-tuning. It works with PyTorch Lightning and PyTorch. The repository describes itself as: 350+ academic research skills, MCP configs, and plugins for Research-Claw and AI agents. The licence is MIT.
Read from SKILL.md and the folder at commit bf44b3c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pippythonFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
lightning.aigithub.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Pytorch Lightning Guide loads about 2k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 340 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from wentorai/research-plugins at commit bf44b3c, republished under its MIT licence (© wentorai). 340 words, ~2,014 tokens.
.claude/skills/pytorch-lightning-guide/SKILL.md (or your agent's skills folder).PyTorch Lightning is a deep learning framework with over 31,000 GitHub stars that provides a high-level interface for PyTorch, enabling researchers to focus on model design rather than engineering boilerplate. Developed by Lightning AI, it decouples the science (model architecture, loss functions, data processing) from the engineering (distributed training, mixed precision, gradient accumulation, checkpointing) through a structured LightningModule abstraction.
For academic researchers, Lightning eliminates the need to write repetitive training loops, device management code, and distributed training logic. You define your model, training step, and data loaders, and Lightning handles everything else -- from single GPU to multi-node distributed training, from FP32 to mixed precision, from local development to cloud deployment. This means faster iteration on research ideas with production-quality training infrastructure.
Lightning is used extensively in AI research labs and has become a standard tool for reproducible deep learning experiments. It integrates seamlessly with experiment tracking tools like Weights & Biases, MLflow, and TensorBoard, and supports all PyTorch-compatible model architectures.
# Install PyTorch Lightning
pip install lightning
# Or install with specific extras
pip install lightning[extra]
# For development/research with all features
pip install lightning[all]Lightning requires Python 3.9+ and PyTorch 2.1+. For GPU training, ensure your PyTorch installation includes CUDA support:
# Check GPU availability
python -c "import torch; print(torch.cuda.is_available())"Verify your installation:
import lightning as L
print(L.__version__)The LightningModule is the central abstraction. It organizes your PyTorch code into clearly defined methods:
import lightning as L
import torch
import torch.nn.functional as F
from torch import nn
class ResearchModel(L.LightningModule):
def __init__(self, input_dim, hidden_dim, output_dim, lr=1e-3):
super().__init__()
self.save_hyperparameters()
self.encoder = nn.Sequential(
nn.Linear(input_dim, hidden_dim),
nn.ReLU(),
nn.Dropout(0.2),
nn.Linear(hidden_dim, hidden_dim),
nn.ReLU(),
)
self.classifier = nn.Linear(hidden_dim, output_dim)
self.lr = lr
def forward(self, x):
features = self.encoder(x)
return self.classifier(features)
def training_step(self, batch, batch_idx):
x, y = batch
logits = self(x)
loss = F.cross_entropy(logits, y)
acc = (logits.argmax(dim=-1) == y).float().mean()
self.log("train_loss", loss, prog_bar=True)
self.log("train_acc", acc, prog_bar=True)
return loss
def validation_step(self, batch, batch_idx):
x, y = batch
logits = self(x)
loss = F.cross_entropy(logits, y)
acc = (logits.argmax(dim=-1) == y).float().mean()
self.log("val_loss", loss, prog_bar=True)
self.log("val_acc", acc, prog_bar=True)
def configure_optimizers(self):
optimizer = torch.optim.AdamW(self.parameters(), lr=self.lr)
scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(
optimizer, T_max=self.trainer.max_epochs
)
return [optimizer], [scheduler]Encapsulate all data processing in a reusable LightningDataModule:
class ResearchDataModule(L.LightningDataModule):
def __init__(self, data_dir, batch_size=32, num_workers=4):
super().__init__()
self.data_dir = data_dir
self.batch_size = batch_size
self.num_workers = num_workers
def setup(self, stage=None):
# Load and split data
dataset = load_research_dataset(self.data_dir)
self.train_data, self.val_data, self.test_data = random_split(
dataset, [0.8, 0.1, 0.1]
)
def train_dataloader(self):
return DataLoader(self.train_data, batch_size=self.batch_size,
shuffle=True, num_workers=self.num_workers)
def val_dataloader(self):
return DataLoader(self.val_data, batch_size=self.batch_size,
num_workers=self.num_workers)The Trainer orchestrates everything with a rich set of configuration options:
trainer = L.Trainer(
max_epochs=100,
accelerator="gpu",
devices=4,
strategy="ddp",
precision="16-mixed",
gradient_clip_val=1.0,
accumulate_grad_batches=4,
callbacks=[
L.callbacks.EarlyStopping(monitor="val_loss", patience=10),
L.callbacks.ModelCheckpoint(monitor="val_loss", save_top_k=3),
L.callbacks.LearningRateMonitor(),
],
logger=L.loggers.WandbLogger(project="my-research"),
)
# Train the model
trainer.fit(model, datamodule=data_module)
# Test with best checkpoint
trainer.test(model, datamodule=data_module, ckpt_path="best")Lightning supports multiple distributed training strategies out of the box:
# FSDP for large model training
trainer = L.Trainer(
strategy="fsdp",
devices=8,
precision="bf16-mixed",
)Override the training loop for non-standard research workflows like GANs, reinforcement learning, or meta-learning:
class GANModule(L.LightningModule):
def training_step(self, batch, batch_idx):
optimizer_g, optimizer_d = self.optimizers()
# Train discriminator
real_loss = self.discriminator_loss(batch, real=True)
fake_loss = self.discriminator_loss(batch, real=False)
d_loss = (real_loss + fake_loss) / 2
optimizer_d.zero_grad()
self.manual_backward(d_loss)
optimizer_d.step()
# Train generator
g_loss = self.generator_loss(batch)
optimizer_g.zero_grad()
self.manual_backward(g_loss)
optimizer_g.step()
@property
def automatic_optimization(self):
return FalseBuilt-in profiling tools help identify bottlenecks:
trainer = L.Trainer(
profiler="advanced", # or "simple", "pytorch"
detect_anomaly=True,
overfit_batches=10, # Quick sanity check
)Lightning has built-in support for reproducibility, which is critical for academic research:
# Seed everything for reproducibility
L.seed_everything(42, workers=True)
# Hyperparameters are automatically saved
model = ResearchModel(input_dim=768, hidden_dim=256, output_dim=10)
# model.hparams is automatically populated and logged
# Checkpoints include full training state
# Resume training from a checkpoint
trainer.fit(model, ckpt_path="path/to/checkpoint.ckpt")The save_hyperparameters() call in your module's __init__ automatically tracks all constructor arguments, making experiment comparison straightforward.
© wentorai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/domains/ai-ml/pytorch-lightning-guide of wentorai/research-plugins.
Open the folder on GitHubat commit bf44b3c
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in wentorai/research-plugins, which our catalogue first saw on October 7, 2026.
Pytorch Lightning Guide next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Pytorch Lightning Guide this skillwentorai/research-plugins | 298 | 1 repos | ~2k | Automated safety check: Pass | MIT | |
| PyTorch Lightning TrainingOrchestra-Research/AI-Research-SKILLs | 13k | 6 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Alphagenome Finetuninggenomicsxai/alphagenome-pytorch | 162 | — | ~1k | Automated safety check: Pass | Apache-2.0 | |
| PyTorch Lightning Training Setupdavila7/claude-code-templates | 32k | 11 repos | ~1.7k | Automated safety check: Pass | MIT | |
| Pytorch LightningK-Dense-AI/scientific-agent-skills | 48k | 1 repos | ~2.6k | Automated safety check: Notes | Apache-2.0 | |
| Spark Environment Setupwshobson/agents | 40k | — | ~2k | Automated safety check: Pass | MIT |
Orchestra-Research/AI-Research-SKILLs
Shows how to organize PyTorch training with Lightning's LightningModule and Trainer, covering validation, DDP, callbacks and learning-rate scheduling.
genomicsxai/alphagenome-pytorch
Fine-tune or transfer-learn AlphaGenome-PyTorch on custom genomic data — pick a mode (linear probe, LoRA, Locon, full), train on BigWig tracks with agt finetune, use adapters, delta checkpoints…
davila7/claude-code-templates
Organizes PyTorch training code into LightningModules, DataModules and Trainers, with multi-GPU strategies, callbacks and logging configured.
K-Dense-AI/scientific-agent-skills
Deep learning framework (PyTorch Lightning / lightning package).
wshobson/agents
Set up a working ML training/inference environment on NVIDIA DGX Spark (GB10, aarch64, CUDA 13).
NVIDIA/skills
Convert existing PyTorch Lightning training code into an NVFLARE federated job using the Lightning Client API patch, local validation, and job export; use only when the request names…
wentorai/research-plugins
Craft structured research abstracts that maximize clarity and journal acceptance
wentorai/research-plugins
Manage academic citations across BibTeX, APA, MLA, and Chicago formats
wentorai/research-plugins
Summarize academic papers with structured extraction of key elements
wentorai/research-plugins
Evidence-based study techniques for academic learning and retention
wentorai/research-plugins
Adjust writing tone and register for academic audiences and venues
wentorai/research-plugins
Academic translation, post-editing, and Chinglish correction guide
Works with
Categories
PyTorch Lightning framework for scalable model training and research. Pytorch Lightning Guide is an agent skill from wentorai/research-plugins.
Pytorch Lightning Guide fits situations like: tasks that involve Deep learning; tasks that involve Fine-tuning.
Run `npx skills add wentorai/research-plugins --skill pytorch-lightning-guide -a claude-code`. Or copy the skill folder (skills/domains/ai-ml/pytorch-lightning-guide in wentorai/research-plugins) into .claude/skills/pytorch-lightning-guide in your project. Claude Code loads it when a task matches its description.
Run `npx skills add wentorai/research-plugins --skill pytorch-lightning-guide -a codex`. Or copy the skill folder (skills/domains/ai-ml/pytorch-lightning-guide in wentorai/research-plugins) into .agents/skills/pytorch-lightning-guide in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wentorai/research-plugins --skill pytorch-lightning-guide -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pytorch-lightning-guide, .gemini/skills/pytorch-lightning-guide, .github/skills/pytorch-lightning-guide and .opencode/skills/pytorch-lightning-guide in your project.
Going by SKILL.md and its folder, Pytorch Lightning Guide needs the command-line tools its instructions call (pip and python). Our summary lists: Python 3.
SKILL.md names 2 domains. As links in the text: lightning.ai and github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Pytorch Lightning Guide is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Pytorch Lightning Guide: PyTorch Lightning Training (Orchestra-Research/AI-Research-SKILLs, 13k stars), Alphagenome Finetuning (genomicsxai/alphagenome-pytorch, 162 stars), PyTorch Lightning Training Setup (davila7/claude-code-templates, 32k stars) and Pytorch Lightning (K-Dense-AI/scientific-agent-skills, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
wentorai (a GitHub user) maintains it in wentorai/research-plugins, which has 298 GitHub stars. The repository holds 405 skills in this directory. The repository was last updated on June 19, 2026.
Source: wentorai/research-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.