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 save/load API for WOQ #1786

Merged
merged 34 commits into from May 17, 2024
Merged

Support save/load API for WOQ #1786

merged 34 commits into from May 17, 2024

Conversation

Kaihui-intel
Copy link
Collaborator

@Kaihui-intel Kaihui-intel commented May 11, 2024

Type of Change

feature

Description

Support save/load API for WOQ
remove export_compressed_model from config

Expected Behavior & Potential Risk

the expected behavior that triggered by this PR

How has this PR been tested?

UT
local test:
fp32&rtn

ks Version Filter n-shot Metric Value Stderr
lambada_openai 1 none 0 perplexity 26.0209 ± 0.9382
none 0 acc 0.3790 ± 0.0068

Accuracy: 0.37900
Batch size = 1

Tasks Version Filter n-shot Metric Value Stderr
lambada_openai 1 none 0 perplexity 29.1191 ± 1.1134
none 0 acc 0.3679 ± 0.0067

Accuracy: 0.36794
Batch size = 1

opt_125m_woq_gptq_int4_dq_bnb

ks Version Filter n-shot Metric Value Stderr
lambada_openai 1 none 0 perplexity 26.9172 ± 1.0165
none 0 acc 0.3701 ± 0.0067
Accuracy: 0.37008
Batch size = 1

Dependency Change?

any library dependency introduced or removed

Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Copy link

github-actions bot commented May 15, 2024

⛈️ Required checks status: Has failure 🔴

Warning
If you do not have the access to re-run the Probot, please contact XuehaoSun for help. If you push a new commit, all of the workflow will be re-triggered.

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/weight_only/gptq.py, neural_compressor/torch/algorithms/weight_only/modules.py, neural_compressor/torch/algorithms/weight_only/rtn.py, neural_compressor/torch/algorithms/weight_only/save_load.py, neural_compressor/torch/algorithms/weight_only/utility.py, neural_compressor/torch/quantization/algorithm_entry.py, neural_compressor/torch/quantization/config.py, neural_compressor/torch/quantization/load_entry.py.

🟢 Model Tests workflow
Check ID Status Error details
Model-Test success
Model-Test (Generate Report GenerateReport) success
Model-Test (Run ONNX Model resnet50-v1-12) success
Model-Test (Run PyTorch Model resnet18) success
Model-Test (Run PyTorch Model resnet18_fx) success
Model-Test (Run TensorFlow Model darknet19) success
Model-Test (Run TensorFlow Model inception_v1) success
Model-Test (Run TensorFlow Model resnet-101) success
Model-Test (Run TensorFlow Model resnet50v1.5) success
Model-Test (Run TensorFlow Model ssd_mobilenet_v1_ckpt) success
Model-Test (Run TensorFlow Model ssd_resnet50_v1) success

These checks are required after the changes to .azure-pipelines/scripts/models/run_model_trigger_common.sh.

🔴 Model Tests 3x workflow
Check ID Status Error details
Model-Test-3x failure
Model-Test-3x (Generate Report GenerateReport) failure download
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/weight_only/gptq.py, neural_compressor/torch/algorithms/weight_only/modules.py, neural_compressor/torch/algorithms/weight_only/rtn.py, neural_compressor/torch/algorithms/weight_only/save_load.py, neural_compressor/torch/algorithms/weight_only/utility.py, neural_compressor/torch/quantization/algorithm_entry.py, neural_compressor/torch/quantization/config.py, neural_compressor/torch/quantization/load_entry.py, examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/llm/run_benchmark.sh, examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/llm/run_clm_no_trainer.py, examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/llm/run_quant.sh, .azure-pipelines/scripts/models/run_model_trigger_common.sh.

🟢 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/weight_only/gptq.py, neural_compressor/torch/algorithms/weight_only/modules.py, neural_compressor/torch/algorithms/weight_only/rtn.py, neural_compressor/torch/algorithms/weight_only/save_load.py, neural_compressor/torch/algorithms/weight_only/utility.py, neural_compressor/torch/quantization/algorithm_entry.py, neural_compressor/torch/quantization/config.py, neural_compressor/torch/quantization/load_entry.py, test/3x/torch/quantization/test_smooth_quant.py, test/3x/torch/quantization/test_static_quant.py, test/3x/torch/quantization/weight_only/test_autoround.py, test/3x/torch/quantization/weight_only/test_awq.py, test/3x/torch/quantization/weight_only/test_gptq.py, test/3x/torch/quantization/weight_only/test_rtn.py, test/3x/torch/quantization/weight_only/test_teq.py.


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.

pre-commit-ci bot and others added 11 commits May 15, 2024 08:14
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
pre-commit-ci bot and others added 7 commits May 16, 2024 08:21
Signed-off-by: Kaihui-intel <kaihui.tang@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com>
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.

@Kaihui-intel, we should add an UT for act_order, you can raise another PR.

@chensuyue chensuyue merged commit bacc164 into master May 17, 2024
38 of 40 checks passed
@chensuyue chensuyue deleted the kaihui/save_and_load branch May 17, 2024 09:29
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

3 participants