[Bugfix][CPU] Fix CPU embedding runner with tensor parallel (#10394)

Signed-off-by: Isotr0py <2037008807@qq.com>
This commit is contained in:
Isotr0py 2024-11-17 15:12:04 +08:00 committed by GitHub
parent 905d0f0af4
commit cf349c4a97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,6 +66,10 @@ class CPUEmbeddingModelRunner(
hidden_states = model_executable(**execute_model_kwargs)
# Only perform pooling in the driver worker.
if not self.is_driver_worker:
return []
return [
self.model.pooler(hidden_states=hidden_states,
pooling_metadata=model_input.pooling_metadata)