Modal

1.3.3 · active · verified Sun Mar 01

Serverless cloud infrastructure for AI workloads. Run Python functions on GPUs with sub-second cold starts. v1.0 released May 2025 with multiple breaking API changes. Rapid release cadence — multiple versions per week.

Warnings

Install

Imports

Quickstart

Deploy a GPU function to Modal. Run with: modal run script.py

import modal

app = modal.App()

@app.function(
    gpu="A10G",
    image=modal.Image.debian_slim().pip_install("torch")
)
def run_inference(prompt: str) -> str:
    import torch
    # your model code here
    return "result"

@app.local_entrypoint()
def main():
    result = run_inference.remote("hello")
    print(result)

view raw JSON →