mcpField
M
modal-compute

modal-compute

github.com/companion-incCloud & DevOps10.0k103 installsUpdated today
Repository

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

  1. 01Run experiments with `modal run`
  2. 02Detach long-running experiment runs
  3. 03Open interactive GPU shells
  4. 04Choose from listed GPU types
  5. 05Save raw outputs to research artifacts

Use cases

  1. 01Replicate a result with burst GPU compute
  2. 02Run a bounded benchmark job
  3. 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-compute

After installing, type/modal-computein Claude Code to confirm it loaded.

Details

From the project README

Modal 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

CommandDescription
modal run script.pyRun one research experiment script on Modal
modal run --detach script.pyRun a long research experiment and record the returned app/run identifier
modal shell --gpu a100Open 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