Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit b3f03cf

Browse files
author
DEKHTIARJonathan
committed
[Benchmarking-Py] HF Models Script Cleanups
1 parent dc0a2b3 commit b3f03cf

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

tftrt/benchmarking-python/huggingface/bert/base_run_inference.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ echo ""
8383
echo "[*] DATA_DIR: ${DATA_DIR}"
8484
echo "[*] MODEL_DIR: ${MODEL_DIR}"
8585
echo ""
86+
echo "[*] BATCH_SIZE: ${BATCH_SIZE}"
87+
echo ""
8688
# Custom Transormer Task Flags
8789
echo "[*] VOCAB_SIZE: ${VOCAB_SIZE}"
8890
echo "[*] SEQ_LEN: ${SEQ_LEN}"

tftrt/benchmarking-python/huggingface/t5/base_run_inference.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,18 @@ do
4747
OUTPUT_TENSOR_NAMES="${arg#*=}"
4848
shift # Remove --output_tensors_name= from processing
4949
;;
50-
######### IGNORE ARGUMENTS BELOW
5150
--data_dir=*)
51+
DATA_DIR="${arg#*=}"
5252
shift # Remove --data_dir= from processing
5353
;;
5454
--input_saved_model_dir=*)
55+
MODEL_DIR="${arg#*=}"
5556
shift # Remove --input_saved_model_dir= from processing
5657
;;
5758
--tokenizer_model_dir=*)
59+
TOKENIZER_DIR="${arg#*=}"
5860
shift # Remove --tokenizer_model_dir= from processing
5961
;;
60-
--total_max_samples=*)
61-
shift # Remove --total_max_samples= from processing
62-
;;
6362
*)
6463
BYPASS_ARGUMENTS=" ${BYPASS_ARGUMENTS} ${arg}"
6564
;;
@@ -71,6 +70,9 @@ echo "[*] MODEL_NAME: ${MODEL_NAME}"
7170
echo "[*] DATASET_NAME: ${DATASET_NAME}"
7271
echo ""
7372
echo "[*] DATA_DIR: ${DATA_DIR}"
73+
echo "[*] MODEL_DIR: ${MODEL_DIR}"
74+
echo "[*] TOKENIZER_DIR: ${TOKENIZER_DIR}"
75+
echo ""
7476
echo "[*] BATCH_SIZE: ${BATCH_SIZE}"
7577
echo ""
7678
# Custom T5 Task Flags
@@ -81,9 +83,9 @@ echo "[*] BYPASS_ARGUMENTS: $(echo \"${BYPASS_ARGUMENTS}\" | tr -s ' ')"
8183

8284
echo -e "********************************************************************\n"
8385

84-
DATA_DIR="/data/c4/${DATASET_NAME}"
85-
MODEL_DIR="/models/huggingface/t5/${MODEL_NAME}/saved_models/model"
86-
TOKENIZER_DIR="/models/huggingface/t5/${MODEL_NAME}/saved_models/tokenizer"
86+
DATA_DIR="${DATA_DIR}/${DATASET_NAME}"
87+
MODEL_DIR="${MODEL_DIR}/${MODEL_NAME}/saved_models/model"
88+
TOKENIZER_DIR="${TOKENIZER_DIR}/${MODEL_NAME}/saved_models/tokenizer"
8789

8890
if [[ ! -d ${DATA_DIR} ]]; then
8991
echo "ERROR: \`--data_dir=/path/to/directory\` does not exist. [Received: \`${DATA_DIR}\`]"

tftrt/benchmarking-python/huggingface/t5/run_all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ T5_MODELS=(
1313
"t5-v1_1-base"
1414
)
1515

16-
RUN_ARGS="--dataset_name=realnewslike --debug --batch_size=32 --display_every=1"
16+
RUN_ARGS="--data_dir=/data/c4 --dataset_name=realnewslike --debug --batch_size=32 --display_every=1"
1717
TF_TRT_ARGS="--use_tftrt --use_dynamic_shape --num_calib_batches=10"
1818
TF_XLA_ARGS="--use_xla_auto_jit"
1919

0 commit comments

Comments
 (0)