-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_multi.sh
42 lines (38 loc) · 1.45 KB
/
run_multi.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
python shuffle.py
datasets=("advbench")
shots_values=(4 16 64 256)
model_names=("Llama-3.1-70B-Instruct")
for dataset in "${datasets[@]}"; do
for model_name in "${model_names[@]}"; do
# 1.jailbreak
for shots in "${shots_values[@]}"; do
echo "Running with shots = $shots"
CUDA_VISIBLE_DEVICES=4,5,6,7 python main_multiturn.py \
--model_name $model_name \
--gpus 4 \
--turns 10 \
--shots $shots \
--dataset $dataset \
> logs/${dataset}/multi_${model_name}_${shots}.log
done
# 2.judge
# CUDA_VISIBLE_DEVICES=4,5,6,7 python judge.py --model_name $model_name --dataset $dataset --multiturn 1
done
reward=1
for model_name in "${model_names[@]}"; do
# 1.jailbreak
for shots in "${shots_values[@]}"; do
echo "Running with shots = $shots"
CUDA_VISIBLE_DEVICES=4,5,6,7 python main_multiturn.py \
--model_name $model_name \
--gpus 4 \
--turns 10 \
--shots $shots \
--reward $reward \
--dataset $dataset \
> logs/${dataset}/multi_rl_${model_name}_${shots}.log
done
# 2.judge
# CUDA_VISIBLE_DEVICES=4,5,6,7 python judge.py --model_name $model_name --reward $reward --dataset $dataset --multiturn 1
done
done