Abstract: Large multimodal models (LMMs) demonstrate impressive capabilities in understanding images, videos, and audio beyond text. However, efficiently serving LMMs in production environments poses significant challenges due to their complex architectures and heterogeneous characteristics across their multi-stage inference pipelines. We present the first comprehensive systems analysis of two prominent LMM architectures, decoder-only and cross-attention, across six representative open-source models, revealing key systems design implications. We also present an in-depth analysis of production LMM inference traces, uncovering unique workload characteristics, including variable, heavy-tailed request distributions and bursty traffic patterns. Based on these insights, we propose ModServe, a modular LMM serving system that decouples stages for independent optimization and adaptive scaling. ModServe dynamically reconfigures stages and handles bursty traffic with modality-aware scheduling and autoscaling to meet tail latency SLOs while minimizing costs. ModServe achieves 3.3-5.5x higher throughput (leading to 25-41.3% cost saving) while meeting SLOs on a 128-GPU cluster with production traces.
TL;DR
Serving Large Multimodal Models (LMMs) as monolithic systems leads to severe inefficiencies, as compute-heavy image encoding stages clash with text generation stages. ModServe solves this by decoupling LMM inference into distinct, independently scalable "Image" and "Text" instances, achieving 3.3–5.5× higher throughput and cutting GPU costs by up to 41% while strictly meeting tail latency Service Level Objectives (SLOs).
What Problem Does This Paper Address?
As generative AI moves beyond text, Large Multimodal Models (LMMs) that process images, video, and audio are being rapidly deployed. However, LMM inference is fundamentally different from traditional LLM inference. It involves a multi-stage pipeline: CPU-based image preprocessing, GPU-based image encoding (usually via Vision Transformers), and finally, GPU-based LLM prefill and decoding.
Today’s state-of-the-art serving frameworks (like vLLM) treat these models as monoliths. All stages are co-located on the same hardware and scaled together. Because multimodal traffic in production is highly bursty and heterogeneous (e.g., a single request might contain 16 high-resolution images while the next contains only text), monolithic serving leads to massive head-of-line blocking, sharp spikes in Time-to-First-Token (TTFT) latency, and stranded GPU resources. The authors set out to understand these unique bottlenecks and build a system tailored specifically for the multi-stage nature of LMMs.
Methods
To break the monolith, the authors propose ModServe, a modular architecture that disaggregates LMM serving based on modality and inference stage:
- Decoupled Instances: ModServe separates the pipeline into Image Instances (handling CPU preprocessing and GPU vision encoding) and Text Instances (handling LLM prefill and decode).
- Token-Aware Autoscaling: Instead of scaling based on request rates, ModServe scales Image and Text pools independently based on token throughput. If a burst of image-heavy requests arrives, the system spins up more Image Instances without unnecessarily duplicating massive LLM backends.
- Modality-Aware Routing & Chunking: Image-heavy requests are routed to Image Instances with the lowest pending token load. Crucially, because images within a single request don't depend on each other during the encoding phase, ModServe can "chunk" a large multi-image request and process the images in parallel across multiple Image Instances.
- Pull-Based RDMA Transfer: Once image tokens are encoded, they are transferred to the Text Instances using a pull-based RDMA mechanism, which defers routing decisions until the exact moment the LLM backend is ready, minimizing synchronization overhead.
Datasets
- ShareGPT-4o: An open-source dataset containing 50K images and text prompts, used for controlled benchmarking.
- Azure LMM Inference Trace (Newly Released): A massive contribution of this paper is the release of a real-world production trace from Azure's LMM clusters. This dataset captures multi-tenant traffic, revealing the true burstiness and heavy-tailed nature of multimodal requests in the wild.
Key Insights and Ideas
- Image encoding is the new bottleneck: For cross-attention models (like Llama-3.2 Vision), image encoding can consume up to 79% of the TTFT. Optimizing the vision encoder is now just as critical as optimizing the LLM prefill.
- Architecture dictates the bottleneck: The paper compares Decoder-only LMMs (which unroll image tokens directly into the LLM, like LLaVA) and Cross-attention LMMs (which attend to images via specific layers). Decoder-only models suffer from 10× worse LLM prefill latency than similarly sized cross-attention models, drastically changing how resources should be allocated.
- Production LMM traffic is wildly unpredictable: Unlike text LLMs which follow predictable diurnal patterns, multimodal traffic is driven by independent bursts (e.g., a sudden influx of video processing requests). Standard traffic prediction algorithms fail with a 79% error rate on these workloads, necessitating highly reactive, decoupled autoscaling.
- Batching is stage-specific: Forcing a single batch size across the entire LMM pipeline is highly inefficient. Image encoding saturates compute at very small batch sizes, while the LLM decode stage benefits from massive batching. Decoupling allows each stage to use its optimal batch size.
Key Results
- Throughput & Cost: Evaluated on a 128-GPU cluster using production traces, ModServe achieved 3.3× to 5.5× higher throughput compared to monolithic vLLM. This translates to a 25% to 41.3% reduction in GPU serving costs.
- Latency: Under static resource allocation, ModServe improved P99 TTFT by up to 47% by eliminating head-of-line blocking caused by image-heavy requests.
- Composability: ModServe’s modality disaggregation is fully compatible with existing Prefill-Decode (PD) disaggregation techniques. When combined, ModServe provided an additional 2.8× to 3.2× reduction in TTFT over PD-disaggregation alone.
Limitations and Future Work
- Modality Focus: The evaluation focuses heavily on vision-based LMMs. While the authors note that audio models share similar architectures, they were not explicitly benchmarked.
- Model Scale: The study evaluated models up to 90B parameters. The authors acknowledge that for massive, frontier-class models, the ratio of time spent in image encoding versus LLM prefill might shift, potentially requiring adjusted routing heuristics.
- Decode Optimization: ModServe focuses heavily on TTFT (Time-to-First-Token) via prefill and encoding optimizations. It leaves Time-Between-Tokens (TBT) optimizations during the decode phase to existing, orthogonal techniques (like continuous batching), which can be integrated into the Text Instances in the future.
Summary updated