Update openicl_infer.py (#1308)

This commit is contained in:
Xu Song 2024-08-23 10:39:22 +08:00 committed by GitHub
parent fb69ba5eb8
commit ad3931aa32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,7 +50,7 @@ class OpenICLInferTask(BaseTask):
key in str(self.model_cfgs[0].get('type', ''))
or key in str(self.model_cfgs[0].get('llm', {}).get('type', ''))
for key in backend_keys)
if self.num_gpus > 0 and not use_backend:
if self.num_gpus > 1 and not use_backend:
port = random.randint(12000, 32000)
command = (f'torchrun --master_port={port} '
f'--nproc_per_node {self.num_procs} '