Encoder Disaggregation
Overview
Encoder disaggregation separates the vision encoder from the prefill/decode pipeline into its own worker. Instead of running image encoding inline, a dedicated encode worker handles media processing and transfers the resulting embeddings to downstream workers via NIXL (RDMA).
This enables:
- Independent scaling of encode workers based on vision workload
- Reduced GPU memory pressure on prefill/decode workers
- Better GPU utilization by matching worker counts to actual bottlenecks
When to Use
Use encoder disaggregation when:
- Vision encoding is a bottleneck and you need to scale encoders independently of LLM workers
- You want to run the vision encoder on different hardware (e.g., smaller GPUs for encoding, larger GPUs for LLM inference)
- Your deployment handles high volumes of multimodal requests and encoding throughput is limiting
For simple deployments or development/testing, the aggregated (EPD) pattern is easier to set up.
Deployment Patterns
Separate encoder, combined prefill and decode
Frontend → Processor → Encode Worker → PD Worker → Response
The encode worker runs the vision model and transfers embeddings over NIXL to the combined prefill and decode worker.
Separate encoder, prefill, and decode
Frontend → Processor → Encode Worker → Prefill Worker → Decode Worker → Response
The encode worker transfers embeddings over NIXL to the prefill worker. The prefill worker then transfers the KV cache to the decode worker.
Launching
vLLM
SGLang
TensorRT-LLM
See the backend-specific documentation (vLLM, TRT-LLM, SGLang) for full configuration details and component flags.