-
Notifications
You must be signed in to change notification settings - Fork 112
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
Introduce support for NF4 data type for OV weight compression #988
Conversation
@AlexKoff88 please take a look |
if self.weight_format in "nf4" and self.bits != 4: | ||
raise ValueError( | ||
f"When applying weight compression with 'nf4' weight format the `bits` parameters must be set to 4, but found {self.bits}" | ||
) |
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.
I believe AWQ and SE are not supported for NF4 on NNCF 2.13, so corresponding checks should be added. GPTQ is supported though. Possibly it could be combined with conditions for mxfp4 above to avoid code duplication.
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.
Thanks!
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
@l-bat, can you fix the style, please? |
8f7eaa3
to
4c2a3ee
Compare
Co-authored-by: Nikita Savelyev <nikita.savelyev@intel.com>
Co-authored-by: Nikita Savelyev <nikita.savelyev@intel.com>
What does this PR do?
--weight-format
CLI argument:nf4
.nf4
data type.Usage examples:
Optimum CLI:
optimum-cli export openvino -m facebook/opt-125m --task text-generation-with-past --weight-format nf4 ./tmp
Optimum Python API:
Before submitting