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

removed the integer and bits scaling in quantized bits for alpha=auto and alpha=auto_po2 #128

Closed

Conversation

fabrizioaymone
Copy link

In the quantized_bits class, when alpha=auto or alpha=auto_po2, the unquantized value "x" is manipulated in a strange way. Even if the number of integer bits is not considered when scaling with alpha=auto and alpha=auto_po2, "x" is divided by m_i (, namely 2**integer_bits) to be later remultiplied by the same value m_i. As x is originally divided by m_i, z (which depends on x) is later multiplied by m_i and divided by m. In order to adjust for the division by m, the scale factor (which multiplies z) is multiplied by m.

I removed the m_i and m references in the code as they don't matter when considering alpha=auto or alpha=auto_po2. I also tested this new version of the quantizer with older versions and the result is the same.

Copy link

google-cla bot commented Mar 10, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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

Successfully merging this pull request may close these issues.

None yet

1 participant