Skip to content

Commit

Permalink
fix local pg
Browse files Browse the repository at this point in the history
  • Loading branch information
samsja committed Nov 21, 2024
1 parent f0245f1 commit e4b65ce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/zeroband/diloco.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,11 @@ def __init__(
# just force compilation

self.pccl_communicator = pccl_communicator
self.cpu_local_mesh = init_device_mesh("cpu", mesh_shape=(self.local_pg.size(),))

self._logger = get_logger()
self.world_info = get_world_info()
self._logger = get_logger()

self._init_offloaded_optimizer(model=model)
self.cpu_local_mesh = init_device_mesh("cpu", mesh_shape=(self.world_info.world_size,))

@torch.no_grad()
def _init_offloaded_optimizer(self, model):
Expand Down

0 comments on commit e4b65ce

Please sign in to comment.