The ViT Scaling Problem: Why Tensor Parallelism Doesn't Always Help
The Counter-Intuitive Finding
Architecture Overview
Key Components
Implementation Details
Image Distribution Strategies
Transfer Backends
Vision Embedding Cache
Usage Examples
Benchmark
Experimental Setup
Bench Results
Acknowledgment
Learn more
EPD Disaggregation: Elastic Encoder Scaling for Vision-Language Models in SGLang
TL;DR
We introduce Encoder-Prefill-Decode (EPD) Disaggregation in SGLang, a novel architecture that separates vision encoding from language processing in Vision-Language Models (VLMs). This can enable:
We introduce Encoder-Prefill-Decode (EPD) Disaggregation in SGLang, a novel architecture that separates vision encoding from language processing in Vision-Language Models (VLMs). This can enable:
Independent scaling of vision encoding capacity: Encoder servers can be scaled horizontally without affecting language model deployment, enabling better resource utilization for vision-heavy workloads.
Compatibility with existing PD disaggregation: EPD can be combined with Prefill-Decode disaggregation for a complete three-tier architecture.
Flexible transfer backends: Support for multiple transfer mechanisms (ZMQ, GPU-direct via Mooncake) allows optimization for different deployment scenarios.
Vision embedding caching: Frequently used images can be cached at encoder servers, eliminating redundant ViT computations and reducing network transfer overhead.
EPD is highly effective in image-heavy scenarios (e.g., multi-image inputs), where the visual encoding process is the primary computational bottleneck. For instance, in these scenarios, we leverage EPD to significantly reduce request TTFT under load—achieving approximately 6–8× lower latency compared to the colocation approach at 1 QPS. Conversely, for image-light scenarios with few images, EPD may be less efficient or even counterproductive. This is because the additional network latency incurred by transmitting embeddings across nodes can outweigh the time saved by offloading the encoding task, potentially resulting in a higher TTFT compared to a colocation approach.
Introduction
Vision-Language Models (VLMs) like Qwen2.5-VL and Llama-Vision combine visual understanding with language generation. However, these models face unique scaling challenges:
The ViT Scaling Problem: Why Tensor Parallelism Doesn't Always Help
The Counter-Intuitive Finding
Architecture Overview
Key Components
Implementation Details
Image Distribution Strategies
Transfer Backends
Vision Embedding Cache
Usage Examples
Benchmark
Experimental Setup
Bench Results
Acknowledgment
Learn more
EPD Disaggregation: Elastic Encoder Scaling for Vision-Language Models in SGLang
Heterogeneous compute needs: Vision encoding (CNN/ViT) requires different computational patterns than language decoding (Transformer)
Imbalanced resource usage: Vision processing is compute-intensive but only needed during prefill
Limited flexibility: Traditional monolithic deployments can't independently scale vision and language components
Intra-request parallelism: Different images in one request can be encoded independently.
Poor scaling under tensor parallelism: Because the vision encoder has far fewer parameters than the language component, applying tensor parallelism to it is inefficient and generally unnecessary.
SGLang's existing Prefill-Decode (PD) disaggregation already separates prefill from decode phases. EPD extends this by further separating vision encoding from language prefill, creating a three-tier architecture.
The ViT Scaling Problem: Why Tensor Parallelism Doesn't Always Help
The Counter-Intuitive Finding
One of the key insights from EPD disaggregation is that Vision Transformers (ViT) do NOT benefit from increased Tensor Parallelism, and can actually become slower with higher TP:
Benchmark on H20 with Qwen2.5-VL-72B (4 images per request):
tpvit mean time2492.13ms4465.80ms8523.80ms
Why Does This Happen?
Communication overhead dominates execution time.
The weight parameters of vision models are usually small.
EPD sidesteps this by scaling encoders horizontally instead of increasing TP.
Architecture Overview
The EPD architecture follows a request flow:
Client Request: A multimodal request arrives at the prefill server (via load balancer or direct connection).
Image Distribution: The prefill server identifies image inputs and distributes them to one or more encoder servers. Images can be split across multiple encoders for load balancing.
Vision Encoding: Encoder servers process images through ViT, generating vision embeddings and image grid metadata. Results are cached if enabled.
Embedding Transfer: Vision embeddings are transferred back to the prefill server using the configured transfer backend (ZMQ, Mooncake, etc.).
LLM Computation: The prefill server combines vision embeddings with text tokens to form mm_inputs containing pre-computed tensors. The LLM performs Prefill and Decode computation based on these embeddings. If PD disaggregation is enabled, the existing Prefill-Decode transfer logic is reused; otherwise, token generation happens directly on the prefill server.
Key Components
Encoder Server (--encoder-only)
Vision-only (no language weights); preprocessing + ViT forward to generate vision embeddings
Prefix multimodal cache support
Scale out for load balancing and parallel multi-image split inference
Prefill Server (--language-only)
Language model only
Receives embeddings from encoder(s)
With PD: ships KV to Decode; without PD: decodes locally
Decode Server
Standard decode-only instance
Receives KV cache from prefill
Implementation Details
Unlike tensor parallelism which splits a single model across GPUs, EPD uses data parallelism by running multiple independent encoder instances and distributing images among them.
EPD disaggregation targets vision-heavy workloads (multi-image requests) and improves Time To First Token (TTFT) by scaling encoder servers horizontally. Launch bench script:
2E1P (2 Encoders + 1 PD instance): 2 Encoders with tensor-parallel-size=1 each + 1 PD instance with tensor-parallel-size=4, uses 6× H20 GPUs
Bench Results
Mean TTFT (EPD vs colocate)
Mean TPOT (EPD vs colocate)
The higher TPOT observed in 2e1p is attributed to its larger batch size during decoding.
The higher TPOT observed in 2e1p is attributed to its larger batch size during decoding.
Request Throughput (EPD vs colocate)
Key Findings (vs. colocate)
Encoder/prefill keeps TTFT much lower under load (≈6–8x lower than colocate at 1 qps).
TPOT stays far below colocate (≈8–10x lower), indicating much tighter latency.
Throughput roughly doubles at higher QPS (≈2x at 0.8–1.0 qps vs. colocate).
The dramatic reduction in TTFT is achieved by allocating dedicated GPU resources to the encoder. Despite using 50% additional GPUs (2E1P uses 6× H20 vs. colocate's 4× H20), EPD disaggregation achieves a much higher return on investment (ROI) compared to simply scaling the traditional integrated architecture, with performance gains exceeding the additional resource cost.
While highly effective for image-heavy tasks, dedicated encoder GPUs may experience lower utilization (idle time) in image-light scenarios, suggesting that EPD is most resource-efficient when visual processing is the primary bottleneck.
Acknowledgment
rednote hilab: Tianyu Guo, a'du, Tianming Xu
Alibaba Cloud Computing: Siyu Liu, Shangming Cai
AntGroup SCT: Wengang Zheng
Learn more
Roadmap: Encoder Disaggregation (2025 Q4)
TL;DR
We introduce Encoder-Prefill-Decode (EPD) Disaggregation in SGLang, a novel architecture that separates vision encoding from language processing in Vision-Language Models (VLMs). This can enable:
We introduce Encoder-Prefill-Decode (EPD) Disaggregation in SGLang, a novel architecture that separates vision encoding from language processing in Vision-Language Models (VLMs). This can enable:
Independent scaling of vision encoding capacity: Encoder servers can be scaled horizontally without affecting language model deployment, enabling better resource utilization for vision-heavy workloads.
Compatibility with existing PD disaggregation: EPD can be combined with Prefill-Decode disaggregation for a complete three-tier architecture.
Flexible transfer backends: Support for multiple transfer mechanisms (ZMQ, GPU-direct via Mooncake) allows optimization for different deployment scenarios.
Vision embedding caching: Frequently used images can be cached at encoder servers, eliminating redundant ViT computations and reducing network transfer overhead.
EPD is highly effective in image-heavy scenarios (e.g., multi-image inputs), where the visual encoding process is the primary computational bottleneck. For instance, in these scenarios, we leverage EPD to significantly reduce request TTFT under load—achieving approximately 6–8× lower latency compared to the colocation approach at 1 QPS. Conversely, for image-light scenarios with few images, EPD may be less efficient or even counterproductive. This is because the additional network latency incurred by transmitting embeddings across nodes can outweigh the time saved by offloading the encoding task, potentially resulting in a higher TTFT compared to a colocation approach.
Introduction
Vision-Language Models (VLMs) like Qwen2.5-VL and Llama-Vision combine visual understanding with language generation. However, these models face unique scaling challenges:
Heterogeneous compute needs: Vision encoding (CNN/ViT) requires different computational patterns than language decoding (Transformer)
Imbalanced resource usage: Vision processing is compute-intensive but only needed during prefill
Limited flexibility: Traditional monolithic deployments can't independently scale vision and language components
Intra-request parallelism: Different images in one request can be encoded independently.
Poor scaling under tensor parallelism: Because the vision encoder has far fewer parameters than the language component, applying tensor parallelism to it is inefficient and generally unnecessary.
SGLang's existing Prefill-Decode (PD) disaggregation already separates prefill from decode phases. EPD extends this by further separating vision encoding from language prefill, creating a three-tier architecture.
The ViT Scaling Problem: Why Tensor Parallelism Doesn't Always Help
The Counter-Intuitive Finding
One of the key insights from EPD disaggregation is that Vision Transformers (ViT) do NOT benefit from increased Tensor Parallelism, and can actually become slower with higher TP:
Benchmark on H20 with Qwen2.5-VL-72B (4 images per request):
tpvit mean time2492.13ms4465.80ms8523.80ms
Why Does This Happen?
Communication overhead dominates execution time.
The weight parameters of vision models are usually small.
EPD sidesteps this by scaling encoders horizontally instead of increasing TP.
Architecture Overview
The EPD architecture follows a request flow:
Client Request: A multimodal request arrives at the prefill server (via load balancer or direct connection).
Image Distribution: The prefill server identifies image inputs and distributes them to one or more encoder servers. Images can be split across multiple encoders for load balancing.
Vision Encoding: Encoder servers process images through ViT, generating vision embeddings and image grid metadata. Results are cached if enabled.
Embedding Transfer: Vision embeddings are transferred back to the prefill server using the configured transfer backend (ZMQ, Mooncake, etc.).
LLM Computation: The prefill server combines vision embeddings with text tokens to form mm_inputs containing pre-computed tensors. The LLM performs Prefill and Decode computation based on these embeddings. If PD disaggregation is enabled, the existing Prefill-Decode transfer logic is reused; otherwise, token generation happens directly on the prefill server.
Key Components
Encoder Server (--encoder-only)
Vision-only (no language weights); preprocessing + ViT forward to generate vision embeddings
Prefix multimodal cache support
Scale out for load balancing and parallel multi-image split inference
Prefill Server (--language-only)
Language model only
Receives embeddings from encoder(s)
With PD: ships KV to Decode; without PD: decodes locally
Decode Server
Standard decode-only instance
Receives KV cache from prefill
Implementation Details
Unlike tensor parallelism which splits a single model across GPUs, EPD uses data parallelism by running multiple independent encoder instances and distributing images among them.
EPD disaggregation targets vision-heavy workloads (multi-image requests) and improves Time To First Token (TTFT) by scaling encoder servers horizontally. Launch bench script:
2E1P (2 Encoders + 1 PD instance): 2 Encoders with tensor-parallel-size=1 each + 1 PD instance with tensor-parallel-size=4, uses 6× H20 GPUs
Bench Results
Mean TTFT (EPD vs colocate)
Mean TPOT (EPD vs colocate)
The higher TPOT observed in 2e1p is attributed to its larger batch size during decoding.
The higher TPOT observed in 2e1p is attributed to its larger batch size during decoding.
Request Throughput (EPD vs colocate)
Key Findings (vs. colocate)
Encoder/prefill keeps TTFT much lower under load (≈6–8x lower than colocate at 1 qps).
TPOT stays far below colocate (≈8–10x lower), indicating much tighter latency.
Throughput roughly doubles at higher QPS (≈2x at 0.8–1.0 qps vs. colocate).
The dramatic reduction in TTFT is achieved by allocating dedicated GPU resources to the encoder. Despite using 50% additional GPUs (2E1P uses 6× H20 vs. colocate's 4× H20), EPD disaggregation achieves a much higher return on investment (ROI) compared to simply scaling the traditional integrated architecture, with performance gains exceeding the additional resource cost.
While highly effective for image-heavy tasks, dedicated encoder GPUs may experience lower utilization (idle time) in image-light scenarios, suggesting that EPD is most resource-efficient when visual processing is the primary bottleneck.