modal-compute
Modal Compute
Use the modal CLI for serverless GPU workloads. No pod lifecycle to manage — write a decorated Python script and run it.
Setup
pip install modal
modal setup
Commands
| Command | Description |
|---|---|
modal run script.py |
Run a script on Modal (ephemeral) |
modal run --detach script.py |
Run detached (background) |
modal deploy script.py |
Deploy persistently |
modal serve script.py |
Serve with hot-reload (dev) |
modal shell --gpu a100 |
Interactive shell with GPU |
modal app list |
List deployed apps |
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
- Stateless burst GPU jobs (training, inference, benchmarks)
- No persistent state needed between runs
- Check availability:
command -v modal
More from getcompanion-ai/feynman
eli5
Explain research, papers, or technical ideas in plain English with minimal jargon, concrete analogies, and clear takeaways. Use when the user says "ELI5 this", asks for a simple explanation of a paper or research result, wants jargon removed, or asks what something technically dense actually means.
18alpha-research
Search, read, and query research papers via the `alpha` CLI (alphaXiv-backed). Use when the user asks about academic papers, wants to find research on a topic, needs to read a specific paper, ask questions about a paper, inspect a paper's code repository, or manage paper annotations.
18deep-research
Run a thorough, source-heavy investigation on any topic. Use when the user asks for deep research, a comprehensive analysis, an in-depth report, or a multi-source investigation. Produces a cited research brief with provenance tracking.
15literature-review
Run a literature review using paper search and primary-source synthesis. Use when the user asks for a lit review, paper survey, state of the art, or academic landscape summary on a research topic.
15autoresearch
Autonomous experiment loop that tries ideas, measures results, keeps what works, and discards what doesn't. Use when the user asks to optimize a metric, run an experiment loop, improve performance iteratively, or automate benchmarking.
14paper-writing
Turn research findings into a polished paper-style draft with sections, equations, and citations. Use when the user asks to write a paper, draft a report, write up findings, or produce a technical document from collected research.
14