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: Weight quantization sign should be the last operation #59

Closed
wants to merge 2 commits into from

Conversation

jmbrito01
Copy link

@jmbrito01 jmbrito01 commented Jun 27, 2024

Description: This PR fixes a bug in the weight_quant() function, where the weights do not follow the paper orientation to when to sign the weights.
Basically the sign operation should be the last thing to be done but it's being done before the multiplication of the scale(see this for more informations)

For discussion: The weights and activation are still being done at full precision on BitLinear, it's probably best to convert it to int8 like the paper proposes to provide better speed.

Issue: #52

Copy link

@izavala97 izavala97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good!, i have tested this changes as well, im new in project, but it would be useful to add some unit tests

Copy link

Stale pull request message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants