|
|
| CUDA='0' |
| EXP_ROOT="." |
|
|
| ckpt_list=('final') |
|
|
| for ckpt in "${ckpt_list[@]}" |
| do |
| ckpt_path=$(printf '%s\n' ${EXP_ROOT}/${ckpt}-checkpoint | head -n 1) |
| output_path="${ckpt_path}-merged" |
|
|
| if [[ -d "$ckpt_path" ]]; then |
| |
| CUDA_VISIBLE_DEVICES=${CUDA} \ |
| swift export \ |
| --model "Qwen/Qwen3-VL-8B-Instruct" \ |
| --adapters ${ckpt_path} \ |
| --merge_lora true \ |
| --output_dir ${output_path} |
|
|
| |
| CUDA_VISIBLE_DEVICES=${CUDA} \ |
| MAX_PIXELS=589824 \ |
| swift infer \ |
| --model ${output_path} \ |
| --stream true \ |
| --infer_backend pt \ |
| --temperature 0 \ |
| --max_new_tokens 8192 \ |
| --val_dataset "./track_1_test_swift_overallscore.json" \ |
| --result_path "./test_overall.json" |
|
|
| fi |
| done |
|
|