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

why the model size with 32-bit is equal to model with 4-bit #2

Open
xuzhiyuan1022 opened this issue Mar 30, 2021 · 3 comments
Open

Comments

@xuzhiyuan1022
Copy link

No description provided.

@ChaofanTao
Copy link
Owner

Hi, during training, the parameters in both the trained full-precision model and quantized model are stored in float32 format, and there are limited possible choices of data in the quantized model.

The model size compresses when the quantized model converts the data format to INT during deployment. Also, the parameters of the proposed transform can be removed during deployment.

@xuzhiyuan1022
Copy link
Author

thank you for your reply.

grad_alpha = (grad_output * (sign * i + (input_q - input) * (1 - i))).sum()

when update alpha,why use (input_q-input)

@ChaofanTao
Copy link
Owner

The (input_q-input) here considers the difference between input_q and input when updating alpha. That is an optional setting.

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

No branches or pull requests

2 participants