Skip to content

Commit

Permalink
update autoround example for release test
Browse files Browse the repository at this point in the history
Signed-off-by: xin3he <[email protected]>
  • Loading branch information
xin3he committed Dec 13, 2024
1 parent bcae95b commit cca2c03
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/.config/model_params_pytorch_3x.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@
"main_script": "run_clm_no_trainer.py",
"batch_size": 1
},
"opt_125m_woq_autoround_int4_hpu":{
"model_src_dir": "nlp/huggingface_models/language-modeling/quantization/weight_only",
"dataset_location": "",
"input_model": "",
"main_script": "run_clm_no_trainer.py",
"batch_size": 1
},
"opt_125m_woq_autotune_int4":{
"model_src_dir": "nlp/huggingface_models/language-modeling/quantization/weight_only",
"dataset_location": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ function run_benchmark {
elif [ "${topology}" = "opt_125m_woq_autoround_int4" ]; then
model_name_or_path="facebook/opt-125m"
extra_cmd=$extra_cmd" --woq_algo AutoRound"
elif [ "${topology}" = "opt_125m_woq_autoround_int4_hpu" ]; then
model_name_or_path="facebook/opt-125m"
extra_cmd=$extra_cmd" --woq_algo AutoRound"
elif [ "${topology}" = "opt_125m_woq_autotune_int4" ]; then
model_name_or_path="facebook/opt-125m"
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ function run_tuning {
elif [ "${topology}" = "opt_125m_woq_autoround_int4" ]; then
model_name_or_path="facebook/opt-125m"
extra_cmd=$extra_cmd" --woq_algo AutoRound --woq_bits 4 --woq_group_size 128 --woq_scheme asym --autoround_iters 200 --autoround_nsamples 500"
elif [ "${topology}" = "opt_125m_woq_autoround_int4_hpu" ]; then
model_name_or_path="facebook/opt-125m"
extra_cmd=$extra_cmd" --woq_algo AutoRound --woq_bits 4 --woq_group_size 128 --woq_scheme asym --autoround_iters 200 --autoround_nsamples 500"
export PT_ENABLE_INT64_SUPPORT=1
export PT_HPU_LAZY_MODE=0
elif [ "${topology}" = "opt_125m_woq_autotune_int4" ]; then
model_name_or_path="facebook/opt-125m"
extra_cmd=$extra_cmd" --woq_algo AutoTune --woq_bits 4"
Expand Down

0 comments on commit cca2c03

Please sign in to comment.