Skip to content

Commit 3a03677

Browse files
committed
support gpt-j-6B_sq in test
Signed-off-by: chensuyue <suyue.chen@intel.com>
1 parent 7071d49 commit 3a03677

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

examples/.config/model_params_pytorch.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,13 @@
593593
"batch_size": 1,
594594
"main_script": "eval_lambada.py"
595595
},
596+
"gpt-j-6B_sq": {
597+
"model_src_dir": "nlp/huggingface_models/language-modeling/quantization/ptq_static/ipex/smooth_quant",
598+
"dataset_location": "",
599+
"input_model": "EleutherAI/gpt-j-6B",
600+
"batch_size": 1,
601+
"main_script": "eval_lambada.py"
602+
},
596603
"wide_resnet101_2_fx": {
597604
"model_src_dir": "oob_models/gen-efficientnet-pytorch",
598605
"dataset_location": "/tf_dataset/pytorch/ImageNet/raw",

examples/pytorch/nlp/huggingface_models/language-modeling/quantization/ptq_static/ipex/smooth_quant/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ python eval_lambada.py \
4141
--int8 \
4242
--sq \
4343
--alpha auto \
44-
--fallback_add \
44+
--fallback_add
4545
```
4646

4747

examples/pytorch/nlp/huggingface_models/language-modeling/quantization/ptq_static/ipex/smooth_quant/run_tuning.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,16 @@ function init_params {
2424
# run_tuning
2525
function run_tuning {
2626

27+
ext_cmd=""
28+
if [[ ${input_model} == *"gpt-j-6B" ]]; then
29+
ext_cmd="--alpha auto --fallback_add"
30+
fi
31+
2732
python eval_lambada.py \
2833
--model_name_or_path ${input_model} \
2934
--int8 \
30-
--sq
35+
--sq \
36+
${ext_cmd}
3137
}
3238

3339
main "$@"

0 commit comments

Comments
 (0)