MiniGPT-4/eval_scripts/eval.sh

23 lines
1.0 KiB
Bash
Raw Normal View History

2023-10-25 18:54:46 +00:00
#!/bin/bash --login
2023-10-27 11:10:03 +00:00
export PYTHONPATH=$PYTHONPATH:$(pwd)
2023-10-25 18:54:46 +00:00
cfg_path=eval_configs/minigpt4_llama2_eval.yaml
CKPT=YOUR_CKPT_PATH
NAME=EXP_NAME
IMG_PATH=YOUR_IMG_PATH
EVAL_FILE_PATH=YOUR_EVAL_FILE_PATH
2023-10-25 18:53:41 +00:00
2023-10-27 11:10:22 +00:00
torchrun --nproc_per_node 1 eval_scripts/eval_ref.py --name ${NAME} \
2023-10-25 18:54:46 +00:00
--cfg-path ${cfg_path} \
--ckpt ${CKPT} --dataset refcoco,refcoco+,refcocog --lora_r 64 --lora_alpha 16 \
--batch_size 64 --max_new_tokens 20 --resample --img_path ${IMG_PATH} --eval_file_path ${EVAL_FILE_PATH}
2023-10-27 11:10:22 +00:00
torchrun --nproc_per_node 1 eval_scripts/eval_vqa.py --name ${NAME} \
2023-10-25 18:54:46 +00:00
--cfg-path ${cfg_path} \
--ckpt ${CKPT} --split val,test --dataset okvqa,vizwiz,aokvqa,iconqa,gqa,vsr,hm --lora_r 64 --lora_alpha 16 \
2023-10-27 10:50:27 +00:00
--batch_size 32 --max_new_tokens 20 --resample
torchrun --master-port ${PORT} --nproc_per_node 1 run_textvqa_eval.py --name ${NAME} --ckpt_path ${CKPT} --lora_r 64 --lora_alpha 16 --eval_file_path ${EVAL_FILE_PATH}
torchrun --master-port ${PORT} --nproc_per_node 1 run_sciencevqa_eval.py --name ${NAME} --ckpt_path ${CKPT} --lora_r 64 --lora_alpha 16