pytorch-lightning

Train PyTorch models with Lightning Trainer and LightningModule workflows.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/JKhyro/HERMES-AGENT --skill pytorch-lightning-jkhyro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytorch-lightning
Source: https://github.com/JKhyro/HERMES-AGENT/tree/main/optional-skills/mlops/pytorch-lightning
Command: npx skills add https://github.com/JKhyro/HERMES-AGENT --skill pytorch-lightning-jkhyro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you build, train, validate, and scale PyTorch models without writing repetitive training boilerplate, while keeping the code organized and production-ready.

Core Features & Use Cases

  • Trainer-driven workflows: Simplify model fitting, evaluation, checkpointing, and logging with a structured training loop.
  • Distributed and large-scale training: Run the same model code on single GPU, multi-GPU, TPU, FSDP, or DeepSpeed setups.
  • Callbacks and tuning: Add early stopping, progress bars, learning-rate monitoring, and hyperparameter search without changing core model logic.
  • Use case: A machine learning engineer can train a transformer, monitor validation loss, resume from checkpoints, and scale to multiple GPUs with minimal code changes.

Quick Start

Use this skill to turn a PyTorch training script into a Lightning-based workflow with Trainer, LightningModule, callbacks, and distributed strategy support.

Frequently Asked Questions about pytorch-lightning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove PyTorch boilerplate from my training loop?

Remove PyTorch boilerplate by centralizing training loops with a LightningModule and Trainer. This structure handles model fitting, validation, and checkpointing while keeping your code organized and production-ready.

What is the best way to scale PyTorch training across multiple GPUs?

Scale PyTorch training across multiple GPUs by configuring distributed strategies within the Trainer. The same model code runs on single GPU, multi-GPU, TPU, FSDP, or DeepSpeed setups without requiring core logic changes.

How do I add early stopping and learning-rate monitoring to a PyTorch model?

Add early stopping and learning-rate monitoring to PyTorch models by attaching callback hooks to the Trainer. This allows you to insert custom training behaviors without changing your core model logic.

Can I run hyperparameter tuning without rewriting my PyTorch model logic?

Yes, you can run hyperparameter tuning without rewriting PyTorch model logic by using tuning integrations. This approach executes scalable hyperparameter searches alongside the centralized training loop.

Does PyTorch Lightning support resuming training from checkpoints for large-scale workflows?

PyTorch Lightning supports resuming training from checkpoints for large-scale workflows. The Trainer handles checkpointing natively, ensuring reproducible training orchestration across distributed cluster environments.