About modal-compute
A skill for running bounded research experiments on Modal with burst GPU compute. It uses the `modal` CLI and decorated Python scripts, and is intended for experiments that do not need persistent state between runs.
Key features
- 01Run experiments with `modal run`
- 02Detach long-running experiment runs
- 03Open interactive GPU shells
- 04Choose from listed GPU types
- 05Save raw outputs to research artifacts
Use cases
- 01Replicate a result with burst GPU compute
- 02Run a bounded benchmark job
- 03Debug a research environment in a GPU shell
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ companion-inc/ feynman --skill modal-computeAfter installing, type/modal-computein Claude Code to confirm it loaded.
Details
From the project READMEModal Compute
Use the modal CLI for bounded research experiments that need burst GPU compute. No pod lifecycle to manage; write a decorated Python script, run it, and save raw outputs back into the research artifact folder. Do not use this skill to deploy services or unrelated batch jobs.
Setup
pip install modal
modal setup
Commands
| Command | Description |
|---|---|
modal run script.py | Run one research experiment script on Modal |
modal run --detach script.py | Run a long research experiment and record the returned app/run identifier |
modal shell --gpu a100 | Open an interactive GPU shell for research environment debugging |
GPU types
T4, L4, A10G, L40S, A100, A100-80GB, H100, H200, B200
Multi-GPU: "H100:4" for 4x H100s.
Script pattern
import modal
app = modal.App("experiment")
image = modal.Image.debian_slim(python_version="3.11").pip_install("torch==2.8.0")
@app.function(gpu="A100", image=image, timeout=600)
def train():
import torch
# training code here
@app.local_entrypoint()
def main():
train.remote()
When to use
- Bounded replication or benchmark jobs that need burst GPU
- No persistent state needed between runs
- Check availability:
command -v modal
Comments
Markdown supported