device='0'
model='llava_v1.5_7B'
# categories=("privacy" "bias" "toxicity" "hallucination" "legality")
categories='adversarial'

validate_dataset='POPE'
probe_dataset='POPE_train'
probe_mode='I+Q;C_p2+Q_best;C_p2+Q_neg'
# categories=("legality")

num_heads_list=(40)
alpha_list=(7)
gamma_list=(0.0 0.2 0.5 1 2)

for num_head in "${num_heads_list[@]}"; do
  # 内层循环
    for alpha in "${alpha_list[@]}"; do
        for gamma in "${gamma_list[@]}"; do
            echo $num_head $alpha $gamma
            python inference_iti_negmode_debug.py --model $model \
                            --validate_dataset $validate_dataset \
                            --probe_dataset $probe_dataset \
                            --categories $categories \
                            --probe_mode $probe_mode \
                            --log_file "logs/evaluate-${category}_${model}.log" \
                            --device $device \
                            --num_heads $num_head \
                            --alpha $alpha \
                            --gamma $gamma \
                            --subfix "_train_${probe_mode}_${gamma}" \
                            --use_center_of_mass
            
            subfix="_${num_head}_${alpha}_train_${probe_mode}_${gamma}"
            python eval/pope_eval.py --model $model \
                            --dimensions $categories \
                            --log_file "logs/evaluate-${category}_${model}.log" \
                            --device $device \
                            --validate_dataset $validate_dataset \
                            --subfix $subfix
        done
    done
done