-
Notifications
You must be signed in to change notification settings - Fork 199
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
HQO for scale/zero point #937
Conversation
candidate[torch.isnan(candidate)] = self.internal_candidate[torch.isnan(candidate)] | ||
candidate = self.clamp_min_ste(candidate) | ||
bit_width = self.msb_clamp_bit_width_impl() | ||
int_threshold = self.int_scaling_impl(bit_width) |
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.
Int specific implementation, maybe it should be generalized to also cover minifloat case
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.
maybe it should be generalized to also cover minifloat case
This looks like it hasn't been resolved to me. Is that true?
47c9f88
to
5cc7648
Compare
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.
Is it intentional that this only works for Int?
candidate[torch.isnan(candidate)] = self.internal_candidate[torch.isnan(candidate)] | ||
candidate = self.clamp_min_ste(candidate) | ||
bit_width = self.msb_clamp_bit_width_impl() | ||
int_threshold = self.int_scaling_impl(bit_width) |
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.
maybe it should be generalized to also cover minifloat case
This looks like it hasn't been resolved to me. Is that true?
Implement HQO optimization for scale and zero point.
Caveats:
Maybe worth to merge after #1002 and expand tests