Support `auto_round` integration 3.x
Type of Change
feature
Description
- [x] update config params
- [x] update
get_autoround_default_run_fn - [x] update prepare/convert
- [x] return paking model
- [x] enhance ut
- [x] support lm_head
- [ ] pre-ci version
Expected Behavior & Potential Risk
the expected behavior that triggered by this PR
How has this PR been tested?
how to reproduce the test (including hardware information)
Dependency Change?
any library dependency introduced or removed
⛈️ 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/autoround.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/utils/environ.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/weight_only/autoround.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/utils/environ.py.
🔴 Unit Tests basic workflow
These checks are required after the changes to .azure-pipelines/scripts/ut/env_setup.sh.
🟢 Unit Tests basic no coverage workflow
| Check ID | Status | Error details | |
|---|---|---|---|
| UT-Basic-No-Coverage | success | ✅ | |
| UT-Basic-No-Coverage (Unit Test FWKs adaptor Test FWKs adaptor) | success | ✅ | |
| UT-Basic-No-Coverage (Unit Test Pruning Test PyTorch Pruning) | success | ✅ | |
| UT-Basic-No-Coverage (Unit Test Pruning Test TensorFlow Pruning) | success | ✅ | |
| UT-Basic-No-Coverage (Unit Test User facing API Test User facing API) | success | ✅ | |
| UT-Basic-No-Coverage (Unit Test other basic case Test other basic case) | success | ✅ |
These checks are required after the changes to .azure-pipelines/scripts/ut/env_setup.sh.
🔴 Unit Tests 3x-PyTorch workflow
| Check ID | Status | Error details | |
|---|---|---|---|
| UT-3x-Torch | failure | ❌ | |
| UT-3x-Torch (Coverage Compare CollectDatafiles) | no_status | ❓ | |
| 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) | failure | download | ❌ |
These checks are required after the changes to neural_compressor/torch/algorithms/weight_only/autoround.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/utils/environ.py, test/3x/torch/quantization/weight_only/test_autoround.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.
Can we 1) create an
InputCaptureModuleduring the prepare stage and 2) initialize an originalAutoRoundat the convert stage, receiving a) the original model and b) the data captured by theInputCaptureModuleas a dataset?
Thanks, synced offline with yi&xin, now we have adopted this suggestion. https://github.com/intel/neural-compressor/pull/1810/commits/8b549224a7ad52359c1727edad0cdb54b806daf1
Aligned workflow for AutoRound in INC.
Perpare
- Replace model with new forward to collect data for model inference
Calibration
calibration(model) # user provided
Convert
- Re-build dataloader or customized dataloader used in calibration(model)
- Pass dataloader and configuration to AutoRound