323-pytorch

Community

Turn PyTorch code into production-ready

Authorulf1
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill prevents slow, brittle, and error-prone PyTorch training/inference implementations by enforcing production-grade patterns for device handling, mixed precision, data loading, and safe checkpointing.

Core Features & Use Cases

  • High-performance training loops: Apply AMP via torch.amp.autocast/GradScaler, correct gradient handling, and fast optimizer patterns like zero_grad(set_to_none=True).
  • Reliable model architecture & deployment hygiene: Keep forward() pure, register parameters/buffers correctly, document tensor shapes, and save/load state_dict safely with map_location.
  • Data pipeline and memory stability: Use DataLoader best practices (pin_memory, num_workers, persistent_workers), avoid hidden-state graph growth (detach), and profile before optimizing.

Use case example: You’re training a neural model for daily retraining and hit GPU OOMs and inconsistent performance—use this Skill’s checklist to fix device transfers, enable AMP correctly, stabilize the training loop, and validate that checkpoints load cleanly.

Quick Start

Use the 323-pytorch skill to optimize and debug your PyTorch training code for correctness, AMP compatibility, and performance while ensuring safe checkpointing.

Dependency Matrix

Required Modules

None required

Components

assetsreferences

💻 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: 323-pytorch
Download link: https://github.com/ulf1/trading-regime/archive/main.zip#323-pytorch

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.