diff --git a/examples/nlp/huggingface_model/text_generation/quantization/weight_only/run_benchmark.sh b/examples/nlp/huggingface_model/text_generation/quantization/weight_only/run_benchmark.sh index 1f728c0f1..72348427c 100644 --- a/examples/nlp/huggingface_model/text_generation/quantization/weight_only/run_benchmark.sh +++ b/examples/nlp/huggingface_model/text_generation/quantization/weight_only/run_benchmark.sh @@ -35,23 +35,27 @@ function init_params { # run_benchmark function run_benchmark { - + # Check if the input_model ends with the filename extension ".onnx" if [[ $input_model =~ \.onnx$ ]]; then # If the string ends with the filename extension, get the path of the file input_model=$(dirname "$input_model") fi - python main.py \ + if [[ "${tokenizer}" =~ "Phi-3-mini" ]]; then + extra_cmd="--trust_remote_code True" + fi + + eval "python main.py \ --model_path ${input_model} \ --batch_size=${batch_size-1} \ --tokenizer=${tokenizer-meta-llama/Llama-2-7b-hf} \ --tasks=${tasks-lambada_openai} \ --mode=${mode} \ --intra_op_num_threads=${intra_op_num_threads-24} \ - --benchmark - + --benchmark \ + ${extra_cmd}" + } main "$@" -