Fix multi-node distributed training with single GPU per node (#4143)
This commit is contained in:
parent
b1b9262198
commit
6762a380e3
1 changed files with 1 additions and 1 deletions
|
|
@ -1473,7 +1473,7 @@ BitsAndBytesConfig__init__ = BitsAndBytesConfig__init__.replace(
|
|||
)
|
||||
exec(BitsAndBytesConfig__init__, globals())
|
||||
|
||||
if DEVICE_COUNT == 1:
|
||||
if DEVICE_COUNT == 1 and int(os.environ.get("WORLD_SIZE", "1")) <= 1:
|
||||
from accelerate.utils.dataclasses import DistributedType
|
||||
|
||||
def _prepare_backend(self, *args, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue