Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ci #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions open_diloco/hivemind_diloco.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ def compute_and_load_pseudo_grad_into_averager(self):
# opt_param is the param that will be all_reduce, it is suppose to be on cpu
# main_param is the param that has been updated by the inner optimizer, it is suppose to be on gpu
grad = opt_param.data - main_param.detach().to(opt_param.device)
mask = torch.rand_like(grad) > 0.95
grad *= mask
averaged_grad.copy_(grad, non_blocking=True)

def notify_used_averaged_gradients(self):
Expand Down
Loading