Modal has raised an $87M Series B led by Lux Capital. Read more
Modal Batch

Run Batch jobs with 1 line of code

Spawn 1 million jobs in seconds. Powered by Modal’s hyper-elastic compute infrastructure.
customer logo

“With the old in-house systems, we'd have to tune number of workers, instance size, parallelization strategy, all this stuff, which was very time-consuming and not directly generating business value. Modal magically handled all that.”

Samarth Goel, ML Engineer
customer logo

“Processing external quantum mechanical datasets comes with unique challenges. Jobs can fail in numerous ways—from low-level errors thrown by the underlying analysis packages, to transient issues communicating with our storage server. Modal's retry mechanism and batching primitives have made our data pipeline much more robust.”

Liz Decolvenaere, Quantum Chemical Engineer
customer logo

“Modal's autoscaling capabilities give us the best of both worlds. We get the power of a massive GPU cloud when we need it, without the complexity of managing spot instances or cloud-specific infrastructure.”

Georg Kucsko, CTO
Modal Batch

Ship production-scale inference in minutes

Define in code

Define your task with Modal’s SDK. You can specify environment and hardware requirements in line with your application code.

01
image = (
02
    modal.Image.debian_slim().pip_install("numpy")
03
)
04
05
@app.function(
06
    image=image,
07
    volumes={"/data": volume},
08
)
09
def build_year_wrapped(user_id):
10
    import numpy as np
11
    ...

Built-in queues

Call the function on your batch of inputs. You can queue up to 1M inputs.

1
build_year_wrapped.spawn_map
2
(user_id for user_id in range(1_000_000))

Instant scale

Modal instantly launches thousands of containers and reliably processes inputs to completion.

Fine-grained observability

Fine-grained observability

Drill down into logs and metrics for individual inputs.


Zoom out to quickly see aggregate metrics for each batch.


Easily configure Slack or email notifications for failures

Built with Modal

Ship your first app in minutes.

Get Started

$30 / month free compute