modal-projects/modal-auto-research-skills/modal-gpu-experiment

Claude Code and agent skill by modal-projects/modal-auto-research-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Training apps, experiment patterns, and persistent storage on Modal. Write single-GPU and multi-node training jobs with volumes for data and checkpoints, secrets for W&B/HuggingFace, and fault tolerance via retries and checkpoint auto-resume. Use when you need to run training, fine-tuning, or batch experiments on Modal GPUs.

Install

npx vskill@latest install modal-projects/modal-auto-research-skills/modal-gpu-experiment

SKILL.md

The same SKILL.md was published earlier as lordfarquaadthecreator/agents-skills/modal-gpu-experiment.

Modal Experiments

Run training jobs and experiments on Modal GPUs — from single-GPU fine-tuning to multi-node distributed training with RDMA. Write a proper Modal training app: bake your code into the image, mount volumes for data and checkpoints, add secrets, and set retries for fault tolerance.

For general Modal platform usage (app structure, function types, CLI, deployment), see the modal-basic-skills skill.

Quick Reference

Training App Pattern

A Modal training app is a single Python file:

python
import modal
app = modal.App("my-training")
data_volume = modal.Volume.from_name("training-data", create_if_missing=True)
ckpt_volume = modal.Volume.from_name("training-checkpoints", create_if_missing=True)
image = (
modal.Image.from_registry("nvidia/cuda:12.6.0-devel-ubuntu22.04", add_python="3.12")
.pip_install("torch", "transformers", "datasets", "accelerate", "wandb")
.add_local_file("train.py", remote_path="/root/train.py", copy=True)
.add_local_dir("src/", remote_path="/root/src", copy=True)
)
@app.function(
image=image,
gpu="H100",
timeout=60 * 60 * 12,
volumes={"/data": data_volume, "/checkpoints": ckpt_volume},
secrets=[modal.Secret.from_name("wandb-secret")],
retries=modal.Retries(max_retries=3),
)
def train(config: str = "configs/default.yaml"):
import subprocess
subprocess.run(["python", "/root/train.py", "--config", config], check=True)
@app.local_entrypoint()
def main(config: str = "configs/default.yaml"):
train.remote(config=config)
bash
modal run my_train.py
modal run my_train.py --config configs/large.yaml
Key Patterns
  • `add_local_file` / `add_local_dir`: Bake code into the image. Use `copy=True` if you chain .run_commands() after.
  • Volumes: Mount persistent storage for data and checkpoints. Data survives across runs.
  • Secrets: modal.Secret.from_name(...) for W&B, HuggingFace tokens, etc.
  • Retries + auto-resume: modal.Retries(max_retries=N) combined with checkpoint detection for fault-tolerant training.
Persistent Storage
bash
# List/download/upload via CLI
modal volume ls training-data /
modal volume get training-checkpoints /my-experiment/latest.pt ./latest.pt
modal volume put training-data ./dataset.tar.gz /dataset.tar.gz

See ./references/volumes.md for data caching, checkpoint patterns, and volume.commit().

Multi-Node Training

For models that need more than 8 GPUs, use @modal.experimental.clustered with RDMA for up to 3,200 Gbps inter-node bandwidth:

python
@app.function(gpu=f"H100:8", experimental_options={"efa_enabled": True})
@modal.experimental.clustered(size=2, rdma=True)
def train(config: str):
cluster_info = modal.experimental.get_cluster_info()
# Use cluster_info.rank, cluster_info.container_ips for torchrun

See ./references/training.md for full examples including NCCL configuration and torchrun integration.

Compute Options

See ./references/compute.md for the full GPU table and selection guide. Quick guide:

  • Training (small < 1B): H100
  • Training (1B-7B): H100:4 or H200:2
  • Training (7B+): H100:8 or multi-node

References

  • ./references/training.md — Full training guide (single-node, multi-node, data loading)
  • ./references/volumes.md — Persistent storage patterns
  • ./references/compute.md — GPU options and selection guide

See Also

  • For interactive debugging before writing a training app: use the modal-gpu-dev skill
  • For running experiments in parallel across multiple agents: use the sub-agents skill

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
48
Repository forks
7
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/modal-projects/modal-auto-research-skills/modal-gpu-experiment/badge)](https://verified-skill.com/skills/modal-projects/modal-auto-research-skills/modal-gpu-experiment)

Something wrong with this skill or its page? Tell us.