Tooluck logoTooluck
SKILL.md

modal-gpu

Agent skill frombenchflow-ai/skillsbench

Run Python code on cloud GPUs using Modal serverless platform. Use when you need A100/T4/A10G GPU access for training ML models. Covers Modal app setup, GPU selection, data downloading inside functions, and result handling.

How to install modal-gpu

install modal-gpu
# install the skillsbench pack with the skills CLI
npx skills add benchflow-ai/skillsbench

# or add only this skill to Claude Code: copy the folder

tasks-extra/diff-transformer_impl/environment/skills/modal-gpu/

# into

~/.claude/skills/modal-gpu/ (all projects)

.claude/skills/modal-gpu/ (one project)

tasks-extra/diff-transformer_impl/environment/skills/modal-gpu/SKILL.md

Apache-2.0Full file
1# Modal GPU Training
2
3## Overview
4
5Modal is a serverless platform for running Python code on cloud GPUs. It provides:
6
7- **Serverless GPUs**: On-demand access to T4, A10G, A100 GPUs
8- **Container Images**: Define dependencies declaratively with pip
9- **Remote Execution**: Run functions on cloud infrastructure
10- **Result Handling**: Return Python objects from remote functions
11
12Two patterns:
13- **Single Function**: Simple script with `@app.function` decorator
14- **Multi-Function**: Complex workflows with multiple remote calls
15
16## Quick Reference
17
18| Topic | Reference |
19|-------|-----------|
20| Basic Structure | [Getting Started](references/getting-started.md) |
21| GPU Options | [GPU Selection](references/gpu-selection.md) |
22| Data Handling | [Data Download](references/data-download.md) |
23| Results & Outputs | [Results](references/results.md) |
24| Troubleshooting | [Common Issues](references/common-issues.md) |
25
26## Installation
27
28```bash
29pip install modal
30modal token set --token-id <id> --token-secret <secret>
31```
32
33## Minimal Example
34
35```python
36import modal
37
38app = modal.App("my-training-app")
39
40image = modal.Image.debian_slim(python_version="3.11").pip_install(
41 "torch",
42 "einops",
43 "numpy",
44)
45
46@app.function(gpu="A100", image=image, timeout=3600)
47def train():
48 import torch
49 device = torch.device("cuda")
50 print(f"Using GPU: {torch.cuda.get_device_name(0)}")
51
52 # Training code here
53 return {"loss": 0.5}
54
55@app.local_entrypoint()
56def main():
57…

Excerpt shown under the repository's Apache-2.0 license.

More skills in skillsbench

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates