-
Notifications
You must be signed in to change notification settings - Fork 243
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
Speed up torch engine w8a8 model init #1088
Conversation
Hi @yinfan98 ! |
lmdeploy/pytorch/models/q_modules.py
Outdated
"""Class method to create a QLinear instance from a floating-point | ||
module.""" | ||
module. initialization for dummy init.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that initialization = True
means real init and initialization = False
means dummy init?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HIT-cwh, yes
Co-authored-by: whcao <41630003+HIT-cwh@users.noreply.github.com>
Hi, @yinfan98 thanks very much for the contribution. |
@lvhan028 Sure, I will finish benchmark these days |
When using w8a8 model, it will cost a bunch of time for model loading. I found that when using
this func cal the per_channel_quant to get the scale and quanted weight, but it is useless. Because the para not load to model yet, it is just cal for all the zero... so I fix it when init the model on inference stage.
And I tested it on internLM and internLM2