File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -80,8 +80,12 @@ def __init__(
8080 eval_logger .info (f"Using { accelerator .num_processes } devices with data parallelism" )
8181 self ._rank = self .accelerator .local_process_index
8282 self ._world_size = self .accelerator .num_processes
83+ else :
84+ self .model .to (self ._device )
85+ self ._rank = 0
86+ self ._word_size = 1
8387
84- if accelerator .num_processes > 1 :
88+ ''' if accelerator.num_processes > 1:
8589 assert accelerator.distributed_type in [
8690 DistributedType.FSDP,
8791 DistributedType.MULTI_GPU,
@@ -94,11 +98,7 @@ def __init__(
9498 if self.accelerator.is_local_main_process:
9599 eval_logger.info(f"Using {accelerator.num_processes} devices with data parallelism")
96100 self._rank = self.accelerator.local_process_index
97- self ._world_size = self .accelerator .num_processes
98- else :
99- self .model .to (self ._device )
100- self ._rank = 0
101- self ._word_size = 1
101+ self._world_size = self.accelerator.num_processes'''
102102
103103 @property
104104 def config (self ):
You can’t perform that action at this time.
0 commit comments