TL;DR
Cornserve is the first distributed serving system designed specifically for generic "Any-to-Any" multimodal models (which handle arbitrary combinations of text, image, video, and audio inputs/outputs). By disaggregating models into independently scalable components ("model fission") and utilizing a novel record-and-replay execution model, Cornserve delivers up to 3.81× higher throughput and 5.79× lower tail latency compared to traditional monolithic serving.
What Problem Does This Paper Address?
We are entering the era of Any-to-Any multimodal models (e.g., Qwen Omni, DeepSeek Janus), which can seamlessly ingest and generate text, images, audio, and video. However, serving these models efficiently introduces two major challenges that existing systems (like vLLM or xDiT) cannot handle:
- Computation Path Heterogeneity: Different user requests trigger entirely different paths through the model's computation graph. A text-to-audio request bypasses vision encoders but heavily taxes the audio generation components, leading to highly variable request rates across different sub-modules.
- Resource & Scaling Heterogeneity: Different components within the same model have vastly different hardware requirements and throughput characteristics. For example, in Qwen 2.5 Omni, the text generation component achieves 4× higher throughput than the audio generator on the exact same A100 GPU.
Monolithic deployments force all components to run sequentially within a single executor, causing severe resource interference, blocking, and frequent GPU out-of-memory (OOM) errors.
Methods
Cornserve addresses these challenges through a distributed architecture built on Kubernetes, introducing three core mechanisms:
- Task Abstraction & Model Fission: Developers define models using plain Python via three abstractions: unit tasks (atomic components like an LLM or an encoder), composite tasks, and apps. Cornserve allows "model fission"—breaking a monolithic model apart at component boundaries so that encoders, LLMs, and generators can be deployed on dedicated GPUs and scaled independently.
- Record-and-Replay Execution: To dynamically discover which components a specific request needs without sacrificing Python's flexibility, Cornserve uses a two-phase approach. In the record phase, the system executes the request instantly using lightweight placeholder objects to map out the exact dependency subgraph. In the replay phase, the Task Dispatcher coordinates the parallel execution of these tasks across the cluster.
- Decoupled Data Plane (Sidecars): To prevent intermediate tensor data (like large multimodal embeddings) from bottlenecking the control plane, Cornserve deploys a per-GPU Sidecar daemon. Intra-node tensor transfers bypass the control plane entirely using Linux shared memory (
/dev/shm), while inter-node transfers utilize high-speed RDMA.
Datasets
The system was evaluated using ServeGen, a real-world multimodal request dataset. To properly benchmark Any-to-Any capabilities, the authors configured the workload so that 20% of the incoming requests required audio output generation.
Key Insights and Ideas
- Bypassing the Monolithic Bottleneck: Separating the autoregressive generation components (like audio vocoders or image diffusion models) from the main "thinker" LLM allows the system to unlock continuous batching for individual modalities independently.
- Preserving NVLink Bandwidth: By routing intra-node tensor transfers through Linux shared memory (
/dev/shm), Cornserve avoids interfering with the aggressive NVLink/NVSwitch bandwidth required by executors running tensor-parallel or expert-parallel inference. - Automatic Component Sharing: If multiple distinct apps or models share an identical sub-component (e.g., two different fine-tuned LLMs using the same vision encoder), Cornserve automatically coalesces them into a single shared executor deployment, drastically reducing total GPU memory footprints.
Key Results
The authors evaluated Cornserve on a cluster of 16 NVIDIA A100 (80GB) GPUs against a monolithic Hugging Face Transformers baseline:
- Throughput Gains: For Qwen 2.5 Omni (7B), Cornserve improved throughput by 3.09× on 8 GPUs and 3.81× on 16 GPUs.
- Latency Reduction: Cornserve significantly flattened the latency tail for Qwen 2.5 Omni, achieving 3.24× (P50), 5.3× (P95), and 5.79× (P99) lower latencies.
- Preventing OOMs: When serving the larger Qwen 3 Omni (30B), the monolithic baseline failed entirely due to GPU out-of-memory errors. Cornserve successfully served the model by disaggregating it across GPUs, achieving super-linear scaling (2.68× throughput improvement when doubling hardware from 8 to 16 GPUs) due to optimized component balancing.
Limitations and Future Work
The primary limitation of Cornserve's record-and-replay mechanism is that the control flow within a composite task's invoke method must be deterministic based only on the initial request. Dynamic, data-dependent control loops (e.g., deciding to invoke a tool or another model based on intermediate text generated by the LLM) cannot be captured in the initial record phase. Currently, developers must handle such dynamic logic at the higher app layer rather than inside individual composite tasks.
Summary updated