Agent skill · research science · aiskillstore
pytorch-lightning
Deep learning framework (PyTorch Lightning). Organize PyTorch code into LightningModules, configure Trainers for multi-GPU/TPU, implement data pipelines, callbacks, logging (W&B, TensorBoard), distributed training (DDP, FSDP, DeepSpeed), for scalable neural network training.
Why this skill is useful
Provides specific patterns and configurations for organizing PyTorch code and managing distributed training that the AI wouldn't reliably generate on its own.
What it needs
Requires pytorch, torchvision installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
PyTorch Lightning Overview PyTorch Lightning is a deep learning framework that organizes PyTorch code to eliminate boilerplate while maintaining full flexibility. Automate training workflows, multi-device orchestration, and implement best practices for neural network training and scaling across multiple GPUs/TPUs. When to Use This Skill This skill should be used when: Building, training, or deploying neural networks using PyTorch Lightning Organizing PyTorch code into LightningModules Configuring Trainers for multi-GPU/TPU training Implementing data pipelines with LightningDataModules Working with callbacks, logging, and distributed training strategies (DDP, FSDP, DeepSpeed) Structuring deep learning projects professionally Core Capabilities 1. LightningModule - Model Definition Organize PyTorch models into six logical sections: 1. Initialization - init() and setup() 2. Training Loop - trainingstep(batch, batchidx) 3. Validation Loop - validationstep(batch, batchidx) 4. Test Loop - teststep(batch, batchidx) 5. Prediction - predictstep(batch, batchidx) 6. Optimizer Configuration - configureoptimizers() Quick template reference: See scripts/templatelightningmodule.py for a complete boilerplate. Detailed documentation: Read references/lightningmodule.md for comprehensive method documentation, hooks, properties, and best practices. 2. Trainer - Training Automation The Trainer automates the training loop, device management, gradient operations, and callbacks. Key features: Multi-GPU/TPU support with strategy selection (DDP, FSDP, DeepSpeed) Automatic mixed precision training Gradient accumulation and clipping Checkpointing and early stopping Progress bars and logging Quick setup reference: See scripts/quicktrainersetup.py for common Trainer configurations. Detailed documentation: Read references/trainer.md for all parameters, methods, and configuration options. 3. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/pytorch-lightning--2f83d0