distributed-training-ray-train — Claude Code skill: cluster training
A Claude skill for distributed model training with Ray Train, taking PyTorch, TensorFlow and HuggingFace workloads from one GPU to a cluster.
npx claude-code-templates@latest --skill ai-research/distributed-training-ray-trainWhat distributed-training-ray-train does
The skill walks through Ray Train: your training function goes to a trainer, and Ray handles coordination, GPU allocation, checkpointing and metric aggregation. Examples cover PyTorch with TorchTrainer, HuggingFace with TransformersTrainer, and hyperparameter search through Ray Tune with the ASHA scheduler.
Checkpointing gets its own section. Training resumes from saved state when a node dies, and there is an example of joining a cluster with ray.init(address="auto").
You need ray[train], torch and transformers in place, and Ray Train itself installs with pip install -U "ray[train]". Without Ray installed, none of the sample code runs.
What it helps with
- move a PyTorch training loop from one GPU to several nodes
- sweep hyperparameters across a cluster
- resume training from the last checkpoint after a node fails
- train a HuggingFace model on multiple machines
- collect training metrics from all workers in one place
Example prompts for the agent
- Rewrite my PyTorch training loop for
TorchTrainerwith four workers - Set up a hyperparameter sweep with Ray Tune and
ASHAScheduleron loss - Add checkpointing every 10 epochs so training resumes after a crash
How to install distributed-training-ray-train
1claude-code-templates
npx claude-code-templates@latest --skill ai-research/distributed-training-ray-train2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill distributed-training-ray-train -a claude-code3Manually: put the files in place
~/.claude/skills/distributed-training-ray-train/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/distributed-training-ray-train/
Manually: put the files in place
.agents/skills/distributed-training-ray-train/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/distributed-training-ray-train/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates distributed-training-ray-train2Manually: put the files in place
.github/skills/distributed-training-ray-train/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/distributed-training-ray-trainManually: put the files in place
.devin/skills/distributed-training-ray-train/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about distributed-training-ray-train
How do I install distributed-training-ray-train in Claude Code?
Through the marketplace: first npx claude-code-templates@latest --skill ai-research/distributed-training-ray-train, then npx skills add davila7/claude-code-templates --skill distributed-training-ray-train -a claude-code. The skill file lands at ~/.claude/skills/distributed-training-ray-train/SKILL.md.
What does distributed-training-ray-train do?
It shows how to run distributed training with Ray Train: scaling PyTorch, TensorFlow and HuggingFace across nodes, tuning hyperparameters, checkpointing and surviving failures.
What do I need for this skill to work?
The ray[train], torch and transformers dependencies. Ray Train installs with pip install -U "ray[train]".