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.