chris-123 commited on
Commit
01f7932
·
verified ·
1 Parent(s): a276bc6

Upload 3 files

Browse files
infer_qwen3_level_final.sh ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ CUDA='0'
3
+ EXP_ROOT="."
4
+
5
+ ckpt_list=('final')
6
+
7
+ for ckpt in "${ckpt_list[@]}"
8
+ do
9
+ ckpt_path=$(printf '%s\n' ${EXP_ROOT}/${ckpt}-checkpoint | head -n 1)
10
+ output_path="${ckpt_path}-merged"
11
+
12
+ if [[ -d "$ckpt_path" ]]; then # ckpt存在才执行下面
13
+ # merge lora
14
+ CUDA_VISIBLE_DEVICES=${CUDA} \
15
+ swift export \
16
+ --model "Qwen/Qwen3-VL-8B-Instruct" \
17
+ --adapters ${ckpt_path} \
18
+ --merge_lora true \
19
+ --output_dir ${output_path}
20
+
21
+ # inference
22
+ CUDA_VISIBLE_DEVICES=${CUDA} \
23
+ MAX_PIXELS=589824 \
24
+ swift infer \
25
+ --model ${output_path} \
26
+ --stream true \
27
+ --infer_backend pt \
28
+ --temperature 0 \
29
+ --max_new_tokens 8192 \
30
+ --val_dataset "./track_1_test_swift_level.json" \
31
+ --result_path "./test_level.json"
32
+
33
+ fi
34
+ done
infer_qwen3_overall_final.sh ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ CUDA='0'
3
+ EXP_ROOT="."
4
+
5
+ ckpt_list=('final')
6
+
7
+ for ckpt in "${ckpt_list[@]}"
8
+ do
9
+ ckpt_path=$(printf '%s\n' ${EXP_ROOT}/${ckpt}-checkpoint | head -n 1)
10
+ output_path="${ckpt_path}-merged"
11
+
12
+ if [[ -d "$ckpt_path" ]]; then # ckpt存在才执行下面
13
+ # merge lora
14
+ CUDA_VISIBLE_DEVICES=${CUDA} \
15
+ swift export \
16
+ --model "Qwen/Qwen3-VL-8B-Instruct" \
17
+ --adapters ${ckpt_path} \
18
+ --merge_lora true \
19
+ --output_dir ${output_path}
20
+
21
+ # inference
22
+ CUDA_VISIBLE_DEVICES=${CUDA} \
23
+ MAX_PIXELS=589824 \
24
+ swift infer \
25
+ --model ${output_path} \
26
+ --stream true \
27
+ --infer_backend pt \
28
+ --temperature 0 \
29
+ --max_new_tokens 8192 \
30
+ --val_dataset "./track_1_test_swift_overallscore.json" \
31
+ --result_path "./test_overall.json"
32
+
33
+ fi
34
+ done
infer_qwen3_reason_final.sh ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ CUDA='0'
3
+ EXP_ROOT="."
4
+
5
+ ckpt_list=('final')
6
+
7
+ for ckpt in "${ckpt_list[@]}"
8
+ do
9
+ ckpt_path=$(printf '%s\n' ${EXP_ROOT}/${ckpt}-checkpoint | head -n 1)
10
+ output_path="${ckpt_path}-merged"
11
+
12
+ if [[ -d "$ckpt_path" ]]; then # ckpt存在才执行下面
13
+ # merge lora
14
+ CUDA_VISIBLE_DEVICES=${CUDA} \
15
+ swift export \
16
+ --model "Qwen/Qwen3-VL-8B-Instruct" \
17
+ --adapters ${ckpt_path} \
18
+ --merge_lora true \
19
+ --output_dir ${output_path}
20
+
21
+ # inference
22
+ CUDA_VISIBLE_DEVICES=${CUDA} \
23
+ MAX_PIXELS=589824 \
24
+ swift infer \
25
+ --model ${output_path} \
26
+ --stream true \
27
+ --infer_backend pt \
28
+ --temperature 0 \
29
+ --max_new_tokens 8192 \
30
+ --val_dataset "./track_1_test_swift_reason.json" \
31
+ --result_path "./test_reason.json"
32
+
33
+ fi
34
+ done