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

Help #30

Open
ganjuzhizihuai opened this issue Jul 8, 2024 · 1 comment
Open

Help #30

ganjuzhizihuai opened this issue Jul 8, 2024 · 1 comment

Comments

@ganjuzhizihuai
Copy link

Hello, when I run the code, I print the parameter information of the quantization model. Why is the parameter type of the model still float32 after replacing the quantization layer?

Quantized Layer: layer3.2.conv1
Weight dtype: torch.float32
Weight range: -0.37524235248565674 to 0.42818304896354675
Quant scale: Parameter containing:

@zhutmost
Copy link
Owner

Sorry for the delayed response. My code will store the raw weights instead of the quantized weights. You can scale the saved floating-point weights with the saved s and then round them to get quantized ones.
Or you can modify the code to also save the quantized weights.

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