A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
Skip MM Encoder for non-first PP ranks (#24387)
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
Woosuk Kwon committed
Sep 7, 2025 at 09:38 UTC
2e5d21378db8226b04bb76f3e7119a9ddd0239df
1 file changed
+1
-4
vllm/v1/worker/gpu_model_runner.py
+1
-4
@@ -1620,14 +1620,11 @@ class GPUModelRunner(LoRAModelRunnerMixin, KVConnectorModelRunnerMixin):
1620
1621
# _prepare_inputs may reorder the batch, so we must gather multi
1622
# modal outputs after that to ensure the correct order
1623
- if self.supports_mm_inputs:
1623
+ if self.supports_mm_inputs and get_pp_group().is_first_rank:
1624
# Run the multimodal encoder if any.
1625
self._execute_mm_encoder(scheduler_output)
1626
mm_embeds = self._gather_mm_embeddings(scheduler_output)
1627
- else:
1628
- mm_embeds = []
1627
1630
- if self.supports_mm_inputs and get_pp_group().is_first_rank:
1628
# NOTE(woosuk): To unify token ids and soft tokens (vision
1629
# embeddings), we always use embeddings (rather than token ids)
1630
# as input to the multimodal model, even when the input is text.