modal-gpu
Run Python code on cloud GPUs using Modal serverless platform
Install / Use
npx skills add benchflow-ai/skillsbench --skill modal-gpuInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of modal-gpu
modal-gpu scores 86/100 on our quality scale, 451st of 875 AI & Machine Learning skills we index.
Its SKILL.md is 2.6 KB long, well organised into 12 sections with 4 code examples: a solid amount of guidance for an agent.
With 1,813 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so modal-gpu is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
modal-gpu compared with similar skills
All 4 of these similar skills score higher than modal-gpu; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| modal-gpu (this skill)by benchflow-ai | 86 | 1.8k | 2mo ago | SKILL.md |
| claude-memby thedotmack | 100 | 95.0k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 86.4k | 15d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 84.8k | 2d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.2k | today | CLAUDE.md |
Frequently asked questions
- How do I install modal-gpu?
- Run
npx skills add benchflow-ai/skillsbench --skill modal-gpu. The install tabs above show the steps for each supported agent. - Which AI agents does modal-gpu work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is modal-gpu safe to use?
- It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is modal-gpu still maintained?
- The repository was last updated about 2 months ago, so modal-gpu is actively maintained.
Skill content
View source on GitHubname: modal-gpu description: 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.
Modal GPU Training
Overview
Modal is a serverless platform for running Python code on cloud GPUs. It provides:
- Serverless GPUs: On-demand access to T4, A10G, A100 GPUs
- Container Images: Define dependencies declaratively with pip
- Remote Execution: Run functions on cloud infrastructure
- Result Handling: Return Python objects from remote functions
Two patterns:
- Single Function: Simple script with
@app.functiondecorator - Multi-Function: Complex workflows with multiple remote calls
Quick Reference
| Topic | Reference | |-------|-----------| | Basic Structure | Getting Started | | GPU Options | GPU Selection | | Data Handling | Data Download | | Results & Outputs | Results | | Troubleshooting | Common Issues |
Installation
pip install modal
modal token set --token-id <id> --token-secret <secret>
Minimal Example
import modal
app = modal.App("my-training-app")
image = modal.Image.debian_slim(python_version="3.11").pip_install(
"torch",
"einops",
"numpy",
)
@app.function(gpu="A100", image=image, timeout=3600)
def train():
import torch
device = torch.device("cuda")
print(f"Using GPU: {torch.cuda.get_device_name(0)}")
# Training code here
return {"loss": 0.5}
@app.local_entrypoint()
def main():
results = train.remote()
print(results)
Common Imports
import modal
from modal import Image, App
# Inside remote function
import torch
import torch.nn as nn
from huggingface_hub import hf_hub_download
When to Use What
| Scenario | Approach |
|----------|----------|
| Quick GPU experiments | gpu="T4" (16GB, cheapest) |
| Medium training jobs | gpu="A10G" (24GB) |
| Large-scale training | gpu="A100" (40/80GB, fastest) |
| Long-running jobs | Set timeout=3600 or higher |
| Data from HuggingFace | Download inside function with hf_hub_download |
| Return metrics | Return dict from function |
Running
# Run script
modal run train_modal.py
# Run in background
modal run --detach train_modal.py
External Resources
- Modal Documentation: https://modal.com/docs
- Modal Examples: https://github.com/modal-labs/modal-examples
Related Skills
claude-mem
95.0kPersistent 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
Agent-Reach
86.4kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
84.8kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
74.2kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
