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

Difference between W8A8BFP32OFP32LinearWithQuantScale and W8A8BFP32OFP32Linear #10

Open
Hongbosherlock opened this issue Feb 2, 2024 · 2 comments

Comments

@Hongbosherlock
Copy link

for example here:
https://github.com/AniZpZ/AutoSmoothQuant/blob/main/autosmoothquant/models/llama.py#L89

int8_module.q_proj = W8A8BFP32OFP32Linear.from_float(module.q_proj, attn_input_scale, 
int8_module.o_proj = W8A8BFP32OFP32LinearWithQuantScale.from_float(
            module.o_proj, out_input_scale, act_quant=int8_module.o_quant_type)

Is the difference whether it involvesquant_scale or not?

quant_scale is for activition x and dequant_scale is for weight, right ?

@Hongbosherlock
Copy link
Author

Hongbosherlock commented Feb 2, 2024

Can I have your WeChat for further discussion? I have some exciting concepts in mind for this project. I'm also willing to make a small contribution.
My WeChat ID is the lowercase of my GitHub nickname.

@AniZpZ
Copy link
Owner

AniZpZ commented Feb 4, 2024

Scales have been statically applied to the weights (offline). The differences between W8A8BFP32OFP32LinearWithQuantScale and W8A8BFP32OFP32Linear are engineering-related, not algorithmic.

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