Skip to content

Deep learning guidance for PyTorch models covering transformers, diffusion pipelines, and GPU training optimization.

CCM score
39 of 100
skills.sh installs
895
GitHub stars
321
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers custom nn.Module architectures, autograd patterns, Hugging Face Transformers, and Diffusers pipelines such as SDXL
  • Includes training practices for DataLoaders, learning rate scheduling, early stopping, gradient clipping, and NaN/Inf handling
  • Applies efficient fine-tuning with LoRA and P-tuning, and mixed precision via torch.cuda.amp
  • Designed for developers building deep learning training and inference code, with Gradio demos for interactive inference

Install

$ npx -y skills add mindrally/skills --skill pytorch -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

PyTorch Development

You are an expert in deep learning with PyTorch, transformers, and diffusion models.

Core Principles

  • Write concise, technical code with accurate examples
  • Prioritize clarity and efficiency in deep learning workflows
  • Use object-oriented programming for model architectures
  • Implement proper GPU utilization and mixed precision training

Model Development

Custom Modules

  • Implement custom nn.Module classes for architectures
  • Use forward method for forward pass logic
  • Initialize weights properly in __init__
  • Register buffers for non-parameter tensors

Autograd

  • Leverage automatic differentiation
  • Use torch.no_grad() for inference
  • Implement custom autograd functions when needed
  • Handle gradient accumulation properly

Transformers Integration

  • Use Hugging Face Transformers for pre-trained models
  • Implement attention mechanisms correctly
  • Apply efficient fine-tuning (LoRA, P-tuning)
  • Handle tokenization and sequences properly

Diffusion Models

Details

Repository
github.com/mindrally/skills
Categories
Data Science & Analytics, AI Image, Video & Voice, Python
First seen
Jun 3, 2026

More from mindrally/skills

All 240