Commit a8d9a449 authored by Benjamin Fattori's avatar Benjamin Fattori
Browse files

assert + help message if script called incorrectly with multigpu

parent 159c1a93
...@@ -78,7 +78,8 @@ class HFLM(LM): ...@@ -78,7 +78,8 @@ class HFLM(LM):
print(f"Using {gpus} GPUs with Data Parallelism") print(f"Using {gpus} GPUs with Data Parallelism")
self._rank = self.accelerator.local_process_index self._rank = self.accelerator.local_process_index
self._world_size = gpus self._world_size = self.accelerator.num_processes
assert gpus == self.accelerator.num_processes, "Number of GPUs does not match the world size. If evaluating with data parallelism, please call script with accelerate launch *script name*"
@property @property
def eot_token_id(self): def eot_token_id(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment