Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
Migrate SQ and WOQ to INC 3.x API. (#1606)
Browse files Browse the repository at this point in the history
Signed-off-by: changwangss <[email protected]>
Co-authored-by: Ye, Xinyu <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 11, 2024
1 parent c263d09 commit a864bb2
Show file tree
Hide file tree
Showing 21 changed files with 1,809 additions and 1,816 deletions.
34 changes: 0 additions & 34 deletions .github/checkgroup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,6 @@ subprojects:
- "optimize-unit-test-PR-test"
- "Genreate-OptimizeUT-Report"

- id: "NeuralChat Unit Test"
paths:
- ".github/workflows/unit-test-neuralchat.yml"
- ".github/workflows/script/unitTest/run_unit_test_neuralchat.sh"
- "intel_extension_for_transformers/neural_chat/**"
- "requirements.txt"
- "setup.py"
- "intel_extension_for_transformers/transformers/llm/finetuning/**"
- "intel_extension_for_transformers/transformers/llm/quantization/**"
- "intel_extension_for_transformers/transformers/**"
- "intel_extension_for_transformers/langchain/**"
- "!intel_extension_for_transformers/neural_chat/docs/**"
- "!intel_extension_for_transformers/neural_chat/examples/**"
- "!intel_extension_for_transformers/neural_chat/assets/**"
- "!intel_extension_for_transformers/neural_chat/README.md"
checks:
- "neuralchat-unit-test-baseline"
- "neuralchat-unit-test-PR-test"
- "Generate-NeuralChat-Report"

- id: "Engine Unit Test workflow"
paths:
- ".github/workflows/unit-test-engine.yml"
- "requirements.txt"
- "setup.py"
- intel_extension_for_transformers/transformers/**
- "intel_extension_for_transformers/transformers/runtime/**"
- "!intel_extension_for_transformers/transformers/runtime/kernels/**"
- "!intel_extension_for_transformers/transformers/runtime/third_party/**"
- "!intel_extension_for_transformers/transformers/runtime/docs/**"
checks:
- "engine-unit-test-baseline"
- "engine-unit-test-PR-test"
- "Genreate-Engine-Report"

# - id: "Windows Binary Test"
# paths:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/script/unitTest/env_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ until [ "$n" -ge 5 ]; do
git clone https://github.com/intel/neural-compressor.git /neural-compressor
cd /neural-compressor
pip install -r requirements.txt
pip install -r requirements_pt.txt
python setup.py install && break
n=$((n + 1))
sleep 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,18 @@ OMP_NUM_THREADS=<physical cores num> numactl -m <node N> -C <cpu list> python ru
--model <MODEL_NAME_OR_PATH> \
--sq \
--output_dir <SQ_MODEL_SAVE_PATH> \ # Default is "./saved_results."
--int8 \
--benchmark \
--batch_size 1
# load SQ model quantied by itrex and do benchmark.
OMP_NUM_THREADS=<physical cores num> numactl -m <node N> -C <cpu list> python run_generation_sq.py \
--model <SQ_MODEL_SAVE_PATH> \
--int8 \
--benchmark \
--batch_size 1
# load SQ model quantied configure.json and do benchmark.
python run_generation_sq.py \
--model <MODEL_NAME_OR_PATH> \
--output_dir <SQ_MODEL_SAVE_PATH> \
--int8 \
--restore \
--restore_sq_model_from_json \
--benchmark \
--batch_size 1
```
Expand All @@ -68,23 +65,20 @@ python run_generation_sq.py \
--model <MODEL_NAME_OR_PATH> \
--sq \
--output_dir <SQ_MODEL_SAVE_PATH> \ # Default is "./saved_results."
--int8 \
--accuracy \
--batch_size 56

# load SQ model quantied by itrex and do benchmark.
python run_generation_sq.py \
--model <SQ_MODEL_SAVE_PATH> \
--int8 \
--accuracy \
--batch_size 56

# load SQ model quantied configure.json and do benchmark.
python run_generation_sq.py \
--model <MODEL_NAME_OR_PATH> \
--output_dir <SQ_MODEL_SAVE_PATH> \
--int8 \
--restore \
--restore_sq_model_from_json \
--accuracy \
--batch_size 56

Expand Down
Loading

0 comments on commit a864bb2

Please sign in to comment.