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

Smoothquant refactor for 3.x API #1792

Merged
merged 36 commits into from
May 20, 2024
Merged

Smoothquant refactor for 3.x API #1792

merged 36 commits into from
May 20, 2024

Conversation

violetch24
Copy link
Contributor

@violetch24 violetch24 commented May 13, 2024

Type of Change

Smoothquant refactor for 3.x API
API changed

Description

  • refactor new API - prepare/convert
  • add ut for new API, remove unnecessary old ones
  • fix eager model/prepared model issue for old quantize API
  • modify 3.x sq example

Expected Behavior & Potential Risk

ut pass

How has this PR been tested?

Dependency Change?

violetch24 and others added 8 commits May 13, 2024 18:18
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Conflicts:
	neural_compressor/torch/quantization/quantize.py
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
@violetch24 violetch24 marked this pull request as ready for review May 16, 2024 05:49
Copy link

github-actions bot commented May 16, 2024

⚡ Required checks status: All passing 🟢

Groups summary

🟢 Code Scan Tests workflow
Check ID Status Error details
Code-Scan success
Code-Scan (Bandit Code Scan Bandit) success
Code-Scan (DocStyle Code Scan DocStyle) success
Code-Scan (Pylint Code Scan Pylint) success

These checks are required after the changes to neural_compressor/torch/algorithms/base_algorithm.py, neural_compressor/torch/algorithms/smooth_quant/__init__.py, neural_compressor/torch/algorithms/smooth_quant/smooth_quant.py, neural_compressor/torch/algorithms/smooth_quant/utility.py, neural_compressor/torch/algorithms/static_quant/utility.py, neural_compressor/torch/quantization/algorithm_entry.py, neural_compressor/torch/quantization/config.py, neural_compressor/torch/quantization/quantize.py.

🟢 Model Tests 3x workflow
Check ID Status Error details
Model-Test-3x success
Model-Test-3x (Generate Report GenerateReport) success
Model-Test-3x (Run PyTorch Model opt_125m_woq_gptq_int4) success
Model-Test-3x (Run PyTorch Model opt_125m_woq_gptq_int4_dq_bnb) success
Model-Test-3x (Run PyTorch Model opt_125m_woq_gptq_int4_dq_ggml) success

These checks are required after the changes to neural_compressor/torch/algorithms/base_algorithm.py, neural_compressor/torch/algorithms/smooth_quant/__init__.py, neural_compressor/torch/algorithms/smooth_quant/smooth_quant.py, neural_compressor/torch/algorithms/smooth_quant/utility.py, neural_compressor/torch/algorithms/static_quant/utility.py, neural_compressor/torch/quantization/algorithm_entry.py, neural_compressor/torch/quantization/config.py, neural_compressor/torch/quantization/quantize.py, examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/llm/run_clm_no_trainer.py.

🟢 Unit Tests 3x-PyTorch workflow
Check ID Status Error details
UT-3x-Torch success
UT-3x-Torch (Coverage Compare CollectDatafiles) success
UT-3x-Torch (Unit Test 3x Torch Unit Test 3x Torch) success
UT-3x-Torch (Unit Test 3x Torch baseline Unit Test 3x Torch baseline) success

These checks are required after the changes to neural_compressor/torch/algorithms/base_algorithm.py, neural_compressor/torch/algorithms/smooth_quant/__init__.py, neural_compressor/torch/algorithms/smooth_quant/smooth_quant.py, neural_compressor/torch/algorithms/smooth_quant/utility.py, neural_compressor/torch/algorithms/static_quant/utility.py, neural_compressor/torch/quantization/algorithm_entry.py, neural_compressor/torch/quantization/config.py, neural_compressor/torch/quantization/quantize.py, test/3x/torch/quantization/test_smooth_quant.py, test/3x/torch/requirements.txt.


Thank you for your contribution! 💜

Note
This comment is automatically generated and will be updates every 180 seconds within the next 6 hours. If you have any other questions, contact chensuyue or XuehaoSun for help.

@violetch24 violetch24 requested a review from xin3he May 16, 2024 05:50
Copy link
Collaborator

@xin3he xin3he left a comment

Choose a reason for hiding this comment

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

Feel free to contact me if you have any question.

violetch24 and others added 18 commits May 16, 2024 15:35
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Conflicts:
	requirements_pt.txt
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Conflicts:
	examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/llm/run_clm_no_trainer.py
violetch24 and others added 2 commits May 17, 2024 17:59
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
@chensuyue
Copy link
Contributor

@xin3he please review

@chensuyue chensuyue added this to the v2.6 milestone May 17, 2024
violetch24 and others added 3 commits May 19, 2024 13:35
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
violetch24 and others added 5 commits May 19, 2024 22:28
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
Signed-off-by: Cheng, Zixuan <zixuan.cheng@intel.com>
@chensuyue chensuyue merged commit 72fbce4 into master May 20, 2024
30 checks passed
@chensuyue chensuyue deleted the zixuan/sq_refactor branch May 20, 2024 05:50
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.

None yet

4 participants