跳到导航

VLM Performance Optimization

Speed up image and video requests with routing, decoding, caching, and encoder disaggregation
以 Markdown 格式查看

Once you can serve a VLM in Dynamo (see Image Understanding), these features cut the time a vision language model (VLM) spends on multiple stages in the pipeline: fetching media, finding the right worker, running the vision encoder, and prefill. Depending on your workload characteristics, you may benefit from using all of these features or only some of them.

When Each Feature Helps

Where is the bottleneck in your pipeline? A VLM request has six steps: the frontend receives it, the router picks a worker, the worker loads the image, runs the vision encoder, prefills, and decodes. Multimodal KV routing helps at the router. Frontend media decoding and the shared image cache help when loading the image. The embedding cache and encoder disaggregation help at the encoder.

FeatureUse it whenSupported modalities
Multimodal KV routing sends repeat requests to the worker that already holds their KV cacheThe same images or clips repeat across requests and you run several workersImage and video
Frontend media decoding moves media decoding to the Rust frontendFetching and decoding media takes a large share of request latency or worker CPU timeImage and VP8/VP9 video
Shared image cache reuses downloaded image bytes across workersSeveral workers download the same image URLsImage URLs
Embedding cache skips re-encoding repeated images and clipsThe same images or clips repeat and the vision encoder is busyImage and video
Encoder disaggregation scales vision encoders separately from LLM workersVision encoding is the bottleneck, or encoders need different hardware than the LLMImage (vLLM video stays on the PD path)

If your workload is all unique media, the caches and routing give little benefit. Start with frontend media decoding or encoder disaggregation instead.

Support Matrix

FeaturevLLMSGLangTensorRT-LLM
Multimodal KV routingImage and videoImage, and video on aggregated CUDA workersImage only
Frontend media decodingImage and VP8/VP9 video, aggregatedImage, and VP8/VP9 video on CUDA, aggregatedImage, aggregated
Shared image cacheImage URLs loaded through DynamoNot supported for standard URL loadingImage URLs loaded through Dynamo
Embedding cacheAggregated and E/PDE/PDE/PD
Encoder disaggregationE/PD and E/P/D (images only; video stays on the PD path)E/PD and E/P/DE/PD and E/P/D (images and pre-computed embeddings)

Each feature page lists the supported models, flags, and limitations for its backends.