If you're training neural networks with PyTorch and tired of writing the same device management and training loop boilerplate, this organizes your code into LightningModules and handles the plumbing. You get automated multi-GPU training (DDP, FSDP, DeepSpeed), mixed precision, callbacks for checkpointing and early stopping, and logger integrations for W&B, MLflow, and TensorBoard. The skill includes actual templates for modules and data pipelines, plus detailed references on distributed strategies. It's opinionated about structure but stays out of your model architecture. Works best when you need to scale training across devices or want experiment tracking without reinventing configuration code every project.

skills.sh installs
2.1K
GitHub stars
56.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add k-dense-ai/scientific-agent-skills --skill pytorch-lightning --agent claude-code

Installs into .claude/skills of the current project.

Files

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.

Reviewed release: Lightning 2.6.6, including its checkpoint-loading security fixes. CPU tests use Python 3.11, Torch 2.14.1 and Lightning 2.6.6. Use import lightning as L with the lightning distribution. The alternative pytorch-lightning distribution exposes import pytorch_lightning as pl; do not mix class namespaces within one application. GPU, TPU, multi-node and online logger examples are source-verified illustrations, not executed training validation.

Installation

uv pip install "lightning==2.6.6"

Optional extras:

uv pip install "lightning[extra]==2.6.6"    # loggers, strategies, etc.
uv pip install wandb mlflow        # specific loggers as needed

When to Use This Skill

Sponsors

Details

Repository
github.com/k-dense-ai/scientific-agent-skills
Categories
DevOps & CI/CD, AI & Agent Building, Data Science & ML
First seen
Jun 3, 2026

More from k-dense-ai/scientific-agent-skills

All 137
1rjyo avatarmoshi-best-practicesrjyo/moshi-skillUse when preparing or verifying a host for Moshi remote coding. Trigger this for Easy Pair host setup, SSH or preferably Mosh readiness, non-interactive shell P2.1Kskills.sh installs
2nvidia avatarnemotron-customizenvidia/skillsPlan, configure, and chain repo-native Nemotron customization steps into single-step or multi-step pipelines: curation, translation, SFT/PEFT (AutoModel or Mega2.1Kskills.sh installs
3patternsdev avatarreact-2026patternsdev/skillsProvides a comprehensive guide to the modern React 2026 stack. Use when starting a new React project or modernizing an existing one with current frameworks, bui2.1Kskills.sh installs
4anthropics avatarplan-zoom-integrationanthropics/knowledge-work-pluginsTurn a Zoom integration idea into an implementation plan with architecture, auth, and delivery milestones. Use when you need a practical build plan, phased deli2.1Kskills.sh installs
5k-dense-ai avatartransformersk-dense-ai/scientific-agent-skillsHugging Face Transformers for loading Hub models, running pipeline inference, text generation, and Trainer fine-tuning on NLP, vision, audio, and multimodal tas2.1Kskills.sh installs
6refoundai avatarstakeholder-alignmentrefoundai/lenny-skillsHelp users master the art of leading without formal authority by identifying stakeholder incentives, neutralizing conflict through connection, and using co-crea2.1Kskills.sh installs