Skip to content

Commit

Permalink
[BugFix] Fix Embedding Models with TP>1 (vllm-project#5075)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertgshaw2-neuralmagic authored and dtrifiro committed May 31, 2024
1 parent 051bd77 commit b4dc3bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vllm/worker/embedding_model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ def execute_model(
execute_model_kwargs.update({"image_input": multi_modal_input})
hidden_states = model_executable(**execute_model_kwargs)

# Only perform pooling in the driver worker.
if not self.is_driver_worker:
return None

return self.model.pooler(hidden_states=hidden_states,
pooling_metadata=pooling_metadata)

Expand Down

0 comments on commit b4dc3bb

Please sign in to comment.