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 16, 17:00 UTC
[TPU] Use Ray for default distributed backend (#8389)
Woosuk Kwon committed
Sep 11, 2024 at 20:31 UTC
b71c956debf045a9a1545ebfe06961ca5163d91c
1 file changed
+7
vllm/config.py
+7
@@ -869,6 +869,13 @@ class ParallelConfig:
869
f"distributed executor backend "
870
f"'{self.distributed_executor_backend}'.")
871
872
+ if current_platform.is_tpu() and self.world_size > 1:
873
+ if self.distributed_executor_backend is None:
874
+ self.distributed_executor_backend = "ray"
875
+ if self.distributed_executor_backend != "ray":
876
+ raise ValueError(
877
+ "TPU backend only supports Ray for distributed inference.")
878
+
879
if self.distributed_executor_backend is None and self.world_size > 1:
880
# We use multiprocessing by default if world_size fits on the
881
# current node and we aren't in a ray placement group.