-
Notifications
You must be signed in to change notification settings - Fork 176
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
Implement weight as part of the allreduce protocol, not matchmaking #384
Conversation
Codecov Report
@@ Coverage Diff @@
## master #384 +/- ##
==========================================
- Coverage 84.04% 84.02% -0.03%
==========================================
Files 70 70
Lines 6426 6423 -3
==========================================
- Hits 5401 5397 -4
- Misses 1025 1026 +1
|
@@ -37,13 +38,12 @@ class AllReduceRunner(ServicerBase): | |||
:param prefix: namespace for servicer's RPCs (typically, equal to prefix for group keys) | |||
:param group_id: unique identifier of this specific all-reduce run | |||
:param tensors: local tensors that should be averaged with groupmates | |||
:param tensors: local tensors that should be averaged with groupmates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that was in the master code :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left one comment, everything else is good :)
hivemind/averaging/allreduce.py
Outdated
@@ -180,9 +182,10 @@ async def _generate_input_for_peer(self, peer_index: int) -> AsyncIterator[avera | |||
code=averaging_pb2.PART_FOR_AVERAGING, | |||
group_id=self.group_id, | |||
tensor_part=first_part, | |||
metadata=self._weight_binary, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we create a new double weight;
field instead and avoid encoding the weight to the binary format manually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done so
Co-authored-by: Alexander Borzunov <[email protected]>
This PR allows specifying allreduce weights in AllReduceRunner, instead of gathering them during matchmaking.
This will allow peers to use their actual batch size in both DPU and advance matchmaking (aka @yhn112 -style matchmaking)
[WIP] implement advance matchmaking as a working example