Skip to content

Guide · Agent skill

How to use the ML Training Recipes agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

ML Training Recipes is an agent skill: a folder of expert notes that an AI agent reads when you ask for help training or fine-tuning neural networks with PyTorch. It covers model choice by data size, optimizers such as AdamW and Muon, learning-rate schedules, mixed precision, and debugging problems like loss spikes and out-of-memory errors. This guide explains what the skill changes, how to install it, how to trigger it with plain requests, and where to be careful. You need basic PyTorch and GPU familiarity to get the most from it.

ML Training RecipesOrchestra-Research/AI-Research-SKILLs · MIT

Quick start

  1. 1Download the ZIP. Get the ml-training-recipes ZIP from this page and save it to your computer.
  2. 2Unzip into a skills folder. Extract it into ~/.claude/skills/ for personal use or into your project's .claude/skills/ folder.
  3. 3Or upload in the Claude apps. In the Claude apps, open Settings, choose Capabilities, and upload the skill under Skills.
  4. 4Confirm PyTorch and GPU. Make sure Python and PyTorch torch>=2.0.0 are available, with an NVIDIA GPU recommended.
  5. 5Describe your training problem. Ask in plain language, including data size, GPU, model and symptoms.
  6. 6Review and test the suggestions. Check hyperparameters and code changes on a small run before committing to a long job.

What the skill makes the agent do

An agent skill is a set of instructions and reference files that the agent loads when a task matches the skill's description. With ml-training-recipes installed, the agent follows the skill's established practices when you ask about training. The source describes patterns drawn from production codebases and modern training practice, covering training loops, optimizer selection, LR scheduling, mixed precision, debugging, and systematic experimentation.

The skill is organised around a few reference files. SKILL.md holds the core guidance on architecture selection, scaling, training loops, optimizers, schedules, mixed precision, memory and hyperparameter search. Other files go deeper: architecture.md (transformer code patterns and weight initialisation), optimizers.md (Muon, AdamW hybrid, per-group learning rates), domain-specific.md (vision, diffusion, distributed training, checkpointing, data loading), scaling-and-selection.md (scaling laws and compute budgets), biomedical.md (drug discovery, protein models, medical imaging, genomics) and experiment-loop.md (an autonomous keep/discard/revert experiment loop).

  • Architecture choice by data type and sample count, for example pretrained CNN with fine-tuning for images under 10K samples.
  • Optimizer defaults such as AdamW with beta1 0.9, beta2 0.95, and eps 1e-10 for bf16 training.
  • Gradient clipping at 1.0 for Transformers, with the note that Muon may not need it.
  • OOM fixes listed in order, starting with reducing the device batch size and raising gradient accumulation.
  • Loss-spike and divergence checks, including a fast-fail when loss exceeds 100.

Install the skill from the ZIP

Download the ml-training-recipes ZIP from this page and unzip it. You can install it for yourself or for a single project.

For a personal install, unzip the folder into ~/.claude/skills/. For a project-only install, unzip it into the project's .claude/skills/ folder. Either way the skill folder should contain SKILL.md and the references directory.

If you use the Claude apps instead, open Settings, go to Capabilities, and upload the skill under Skills.

  • Personal: ~/.claude/skills/
  • Project: .claude/skills/ inside your project folder
  • Claude apps: Settings → Capabilities → Skills

Check the requirements before you start

The skill assumes a working Python environment with PyTorch. The metadata lists torch>=2.0.0 as the dependency. An NVIDIA GPU is recommended because the bf16, TF32 and torch.compile guidance targets NVIDIA hardware such as Ampere-class and newer GPUs.

The skill does not run scripts and does not use the network, according to its listing. It is guidance the agent reads and applies to your code.

  • Python with PyTorch, torch>=2.0.0
  • NVIDIA GPU recommended for bf16, TF32 and torch.compile advice
  • Your own training code and data; the skill does not supply a dataset

Trigger the skill with natural requests

You do not need a special command. The skill is meant to load when your request matches its description: training or fine-tuning a network, debugging loss spikes or out-of-memory errors, choosing an architecture, or improving GPU throughput. Describe your problem in plain language and include the details that matter, such as your data size, GPU and symptoms.

Good requests name the situation. Vague requests like 'make my model better' give the agent less to work with.

  • 'I am fine-tuning a ViT on 8,000 labelled images. Which model and learning rate should I start with?'
  • 'My loss jumps to NaN after about 2,000 steps. Walk me through how to diagnose it.'
  • 'I get CUDA out of memory when batch size is 32. What should I change first?'
  • 'Check my training loop for mixed precision and gradient clipping problems.'
  • 'My GPU utilisation is low during training. Help me find where the time goes.'

Examples of what you get back

For an OOM question, the skill's ordered list suggests trying a smaller device batch size with more gradient accumulation first, then setting PYTORCH_ALLOC_CONF to expandable_segments:True, then zeroing gradients with set_to_none=True. Later options include meta-device initialisation, activation checkpointing and an 8-bit optimizer through bitsandbytes.

For a training-loop review, the agent can check that gradients are clipped, that TF32 matmul precision and bf16 autocast are used on supported GPUs, and that the first steps are excluded from timing because of JIT compilation.

os.environ["PYTORCH_ALLOC_CONF"] = "expandable_segments:True"

Safety, limits and review

The recipes are general patterns. The skill's own description warns that the agent may apply hyperparameters that do not suit your data or hardware. Treat its suggestions as a starting checklist, not a verified configuration.

Because the skill can suggest learning rates, weight decay and schedules, check them against your validation results. For production or high-stakes models, have an experienced reviewer look at the training setup. The skill includes a fast-fail check that exits when loss exceeds 100, which you should adjust to your own loss scale.

  • Verify suggested hyperparameters on a small run before a long job.
  • Review any code the agent edits, especially training loops and data handling.
  • Expect the guidance to assume PyTorch and GPU experience.

Tips for better results

Give the agent your hardware, data size, model family and current metrics in the first message. The skill's architecture and scaling tables depend on these. If the agent's answer ignores a detail, point to it and ask it to re-check against the relevant reference file.

Ask for the specific reference file when you need depth, for example biomedical.md for protein or genomics models, or experiment-loop.md for a systematic keep/discard experiment process.

  • State GPU model and memory, data type and sample count.
  • Paste the exact error or loss curve, not a paraphrase.
  • Ask one question at a time when debugging so each change can be tested.

What people use it for

  • Choosing a starting model and training recipe for a dataset of a given size.
  • Diagnosing diverging loss or NaN values in a PyTorch training run.
  • Reducing GPU memory use when training hits out-of-memory errors.
  • Tuning optimizer groups, learning-rate warmup and warmdown for an LLM or vision model.
  • Finding reference patterns for biomedical models such as protein language models or genomics networks.

Frequently asked questions

Is the ml-training-recipes skill free to use?

The skill is published under the MIT licence, according to its listing. Check the licence file in the source repository for the full terms before redistributing it.

How do I install ml-training-recipes for Claude?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps, you can instead upload it under Settings, Capabilities, Skills.

What do I need to run the ml-training-recipes skill?

You need Python with PyTorch, torch>=2.0.0. An NVIDIA GPU is recommended for the bf16, TF32 and torch.compile guidance. The skill itself does not run scripts or use the network.

Does the skill train models for me?

No. It is a set of reference notes the agent reads while helping you. Your own code, data and hardware do the training, and you should verify the suggested settings.

How does it compare with asking an AI for training advice without a skill?

The skill gives the agent a consistent set of documented recipes, such as ordered OOM fixes and per-group optimizer settings, in place of general advice. It does not replace expert review, and its defaults may not suit your data.

Why does my agent not use the skill?

The skill loads when your request matches its description, so check that the folder is in the right location and that your question concerns training, debugging or GPU throughput. Mention PyTorch explicitly to make the match clearer.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

ML Training Recipes suits ML engineers and researchers who already use PyTorch and want a checklist of sound defaults and debugging steps the agent can apply to their code. It is a poor fit for non-programmers, or for production decisions made without expert review, since its hyperparameters are general patterns. If you only need a finished AI tool rather than help writing and debugging training code, pick something else.

Download the skill