-
Notifications
You must be signed in to change notification settings - Fork 1.2k
CI job. Gpt awq 4 #2665
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
CI job. Gpt awq 4 #2665
Conversation
Signed-off-by: Wang, Yi A <[email protected]>
Signed-off-by: Wang, Yi A <[email protected]>
Signed-off-by: Wang, Yi A <[email protected]>
Signed-off-by: Wang, Yi A <[email protected]>
@@ -321,7 +325,7 @@ def get_weights_row(self, weights: Weights, prefix: str): | |||
if g_idx is not None: | |||
if ( | |||
not torch.equal( | |||
g_idx.cpu(), | |||
(g_idx - g_idx[0]).cpu(), |
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.
This block needs a comment what is computed here. The old code was already difficult to read, but I the way I read it is that it is checking whether g_idx
incrementing indices by group (so there is a g_idx
, but no activation sorting).
But what is this subtraction doing?
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 think it's subtracting the first index, because say we have g_idx
with groupsize = 2
[0 0 1 1 2 2 3 3]
If we have two shards, then it gets broken up into
[0 0 1 1] [2 2 3 3]
And then the check fails for the second shard. Subtracting g_idx[0]
then changes this into
[0 0 1 1] [0 0 1 1]
Making the check valid. But there should be a comment to make it easier to understand without knowing all the context.
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.
YEs this is the core idea of the fix. The logic was only working on TP=1, it's now working on TP>1 (to detect that g_idx is redundant and can be safely ignored)
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 makes sense, would be a good to have a short comment here though so that future-us don't have to re-parse what is going on here.
What does this PR do?
Fixes # (issue)
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.