skills/smithery.ai/debug:pytorch

debug:pytorch

Installation
SKILL.md

PyTorch Debugging Guide

This guide provides systematic approaches to debugging PyTorch models, from common tensor errors to complex training issues.

Common Error Patterns

1. CUDA Out of Memory (OOM)

Error Message:

RuntimeError: CUDA out of memory. Tried to allocate X.XX GiB

Causes:

  • Batch size too large for GPU memory
  • Accumulating gradients without clearing
  • Storing tensors on GPU unnecessarily
  • Memory leaks from not detaching tensors
Installs
1
First Seen
Apr 20, 2026
debug:pytorch from smithery.ai