pytorch-nan-debugging
CommunityDebug PyTorch NaN/inf training crashes fast.
Software Engineering#pytorch#amp#distributed-training#deep-learning#autograd#training-stability#nan-debugging
Authorgabrielfruet
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill eliminates the guesswork and hours of manual debugging required to track down the root cause of non-finite values, exploding losses, and numerical collapse that break PyTorch deep learning training runs.
Core Features & Use Cases
- Structured Triage Workflow: Guides you through initial anomaly detection setup, precision checks, and stable run comparison to isolate the failure point.
- Safe Isolated Debug Reruns: Instructs you to resume from suspect checkpoints in a fresh temporary directory to avoid corrupting original training outputs.
- Precise Localization: Uses forward/backward hooks to identify the exact module and first non-finite tensor (input, output, or gradient) causing the failure.
- Use Case: If your large language model training suddenly outputs NaN loss halfway through an epoch, use this Skill to systematically identify the problematic layer, get a minimal reproduction command, and determine the likely root cause.
Quick Start
Use the pytorch-nan-debugging skill to localize the first non-finite value causing your PyTorch training run to crash with NaN loss.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: pytorch-nan-debugging Download link: https://github.com/gabrielfruet/.dotfiles/archive/main.zip#pytorch-nan-debugging Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 536,000+ vetted skills library on demand.