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

Support layerwise quantization #1018

Merged
merged 15 commits into from
Dec 5, 2024

Conversation

changwangss
Copy link
Contributor

@changwangss changwangss commented Nov 22, 2024

What does this PR do?

INC support layer-wise feature, both supported cpu and xpu.
because 3.2 plan to release Dec, 9, so I limit the INC installation commit id now.
Once INC 3.2 is officially released, I will raise a PR to update this

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@HuggingFaceDocBuilderDev

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.

Signed-off-by: changwangss <chang1.wang@intel.com>
Signed-off-by: changwa1 <chang1.wang@intel.com>
Signed-off-by: changwa1 <chang1.wang@intel.com>
Signed-off-by: changwa1 <chang1.wang@intel.com>
Signed-off-by: changwa1 <chang1.wang@intel.com>
Signed-off-by: changwa1 <chang1.wang@intel.com>
@changwangss
Copy link
Contributor Author

Hi @echarlaix,

Due to some layer-wise bug fixes in INC 3.2, and with the release planned for 12.9, I’ve set the installation to point to a specific commit for now. Once INC 3.2 is officially released, I will raise a PR to update this. Let me know your thoughts!

@changwangss
Copy link
Contributor Author

CI IPEX issue fixed by #1009 , detail has discussed with @IlyasMoutawwakil in #1027 .

changwangss and others added 4 commits November 29, 2024 17:27
Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
Signed-off-by: sys-lpot-val <sys_lpot_val@intel.com>
Signed-off-by: changwangss <chang1.wang@intel.com>
Signed-off-by: changwangss <chang1.wang@intel.com>
Signed-off-by: changwangss <chang1.wang@intel.com>
@changwangss
Copy link
Contributor Author

changwangss commented Dec 4, 2024

@echarlaix I improve the load_empty_model function in INC and update the commit id in setup.py, could you please give a review again?

@changwangss changwangss requested a review from echarlaix December 4, 2024 12:45
Copy link
Collaborator

@echarlaix echarlaix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @changwangss ! Do you know when the next release of neural-compressor is planned?

@changwangss
Copy link
Contributor Author

changwangss commented Dec 4, 2024

LGTM, thanks @changwangss ! Do you know when the next release of neural-compressor is planned?

Scheduled for release on December 9th. @thuang6
Btw, may I know the PR can be merged now?

@thuang6
Copy link

thuang6 commented Dec 5, 2024

LGTM, thanks @changwangss ! Do you know when the next release of neural-compressor is planned?

Scheduled for release on December 9th. @thuang6 Btw, may I know the PR can be merged now?

Original plan is Dec. 9, but likely push to end of this month.

setup.py Outdated Show resolved Hide resolved
quantization_config.update(**{"device": "xpu"})
quantization_config.post_init_xpu()

if getattr(quantization_config, "use_layer_wise", False):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can check here for the neural-compressor version and disable if not supported (a warning should be added as well) so that support is ready for neural-compressor next release

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, improved.

changwangss and others added 2 commits December 5, 2024 18:50
Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
Signed-off-by: changwangss <chang1.wang@intel.com>
@echarlaix echarlaix merged commit 4d73e51 into huggingface:main Dec 5, 2024
12 of 22 checks passed
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

Successfully merging this pull request may close these issues.

6 participants