Encode-Prefill-Decode (EPD) Disaggregation is a novel framework designed to supercharge Large Multimodal Model (LMM) serving. By splitting the inference process into three dedicated stages—Encoding, Prefill, and Decoding—and decoupling these steps onto separate hardware resources, the system achieves up to 15× better memory efficiency and a 71% reduction in latency. This architecture finally makes it practical to serve high-resolution images and long videos at scale.
The Multimodal Bottleneck
While Large Language Models (LLMs) deal primarily with text, Large Multimodal Models (LMMs) like GPT-4o or InternVL must process complex sensory data such as images, audio, and video. This introduces a heavy "Encoding" stage where raw data is converted into tokens the model can understand.
In current serving systems (like vLLM), the encoder and the language model are "aggregated," meaning they share the same GPUs and memory. This creates two massive headaches:
- Resource Interference: A heavy encoding task (like processing a high-res image) can stall the prefill stage of another request, leading to unpredictable delays and missed Service Level Objectives (SLOs).
- Memory Bottlenecks: Loading both a massive multimodal encoder and a giant LLM onto the same GPU leaves very little room for the "KV cache" (the model's short-term memory). This limits the number of images a request can handle and forces tiny batch sizes, making the system expensive and slow.
The EPD Disaggregation Framework
To solve these issues, the authors introduce Encode-Prefill-Decode (EPD) Disaggregation. Instead of relying on one giant monolithic process, EPD breaks the pipeline into three distinct stages, each running on its own set of dedicated GPUs:
- Encoding (E): Processes raw inputs (images/video) into multimodal tokens.
- Prefill (P): Takes those tokens plus the text prompt to generate the first output token and initialize the KV cache.
- Decoding (D): Generates the rest of the text response token-by-token.
To make this split work efficiently, the framework introduces several key optimizations:
- Intra-Request Parallelism (IRP): A single request’s image can be sharded across multiple encoding GPUs simultaneously, slashing the time to the first token.
- Asynchronous Token Transfer: High-speed interconnects move data between stages in the background so the GPUs never sit idle.
- Dynamic Role Switching: Multimodal traffic is bursty. If the workload changes, the system can reassign a "Decoding" GPU to become an "Encoding" GPU in less than 0.7 seconds.
- Black-box Optimizer: A simulator-based tool automatically calculates the optimal ratio of GPUs to assign to each stage based on current traffic.
Key Insights
- Memory Isolation: By moving the LLM weights off the Encoding GPUs, the authors found they could increase the supported batch size by up to 22×. The encoder itself is relatively small; isolating the LLM frees up massive amounts of memory.
- Parallelizing the Bottleneck: Encoding is often the slowest part of the Time to First Token (TTFT). By sharding image patches across GPUs, EPD turns a sequential bottleneck into a highly parallel operation.
Performance and Results
The researchers evaluated EPD using a mix of synthetic workloads and real-world benchmarks (NextQA, Video-MME, Ultravox-v0.3). Compared to industry-standard baselines like vLLM and DistServe, EPD Disaggregation delivers staggering improvements:
- Throughput and Reliability: Achieved a 90–100% improvement in meeting strict Service Level Objectives (SLOs) under heavy load.
- Latency: Up to a 71% reduction in Time to First Token (TTFT).
- Capacity: Can handle 10× more images per request and supports 2.2× larger KV caches.
- Efficiency: Up to 15× lower peak memory utilization on encoding nodes.
Limitations and Future Work
While EPD is a major leap forward, the authors acknowledge a few hurdles. Moving data between GPUs incurs communication overhead, which could eat into latency gains in environments with slow networking. Additionally, if the stages aren't perfectly balanced, pipeline bubbles can occur, leaving GPUs idle.
Future directions include exploring heterogeneous hardware—using cheaper, high-compute chips for encoding and expensive, high-memory chips for decoding. The team also plans to investigate token pruning to reduce the volume of data transferred between stages.
The code for this framework is open-sourced at github.com/vbdi/epdserve.
Summary updated