BlogsModalDynamic Batching

Dynamic Batching

Dynamic Batching

4
posts
2024–2025

Modal Batch introduces a new durable queue system and a `.spawn_map` interface for massive job processing, capable of handling 1 million inputs and guaranteeing execution for up to 7 days. This significantly enhances the platform's ability to manage large-scale batch workloads, building upon existing dynamic batching capabilities by providing a more robust and scalable solution for tasks like data preprocessing, embedding generation, and training data preparation. FunctionCall results now persist for 7 days.

2025

Introducing Modal Batch: Process 1 million jobs with 1 line of code

5/22/2025

Introduced Modal Batch, a new interface backed by a new durable queue system designed for large-scale, fault-tolerant job processing. Key improvements include an overhauled queue system supporting 1 million inputs (up from 2000), guaranteed input execution for up to 7 days (up from 1 day), and a native `.spawn_map` handler for batch job initiation. This builds upon the existing dynamic batching feature by providing a more robust and scalable solution for massive jobs.

Product updates: Running batch jobs with 1M inputs, ephemeral apps, and a new TensorRT-LLM example

4/17/2025

Increased the maximum number of inputs per Modal Function to 1 million, raised the `.spawn()` rate limit, and extended the persistence of `FunctionCall` results to 7 days.

2024

Boost your throughput with dynamic batching

9/16/2024

Introduced native dynamic batching support to Modal. This involves adding a `@modal.batched()` decorator to inference functions, which takes `max_batch_size` and `wait_ms` parameters. The inference function signature was updated to accept and return lists of samples and results, respectively. This feature was integrated into a Whisper transcription example to demonstrate its impact on throughput and cost.

Product updates: Rollbacks, batching, sandbox tunnels & more

9/6/2024

Introduced the `@batched` decorator for dynamic batching, which accumulates requests into dynamically-sized batches to trade off latency for throughput and GPU utilization.