device='2'
model='shikra_7B'
# categories=("privacy" "bias" "toxicity" "hallucination" "legality")
categories='all'

validate_dataset='MME_general'
probe_dataset='POPE_train_I+Q;C_p2+Q_best'
offset_name="${model}_offset_generator_YR_q_10"
# validate_dataset='llava'
# probe_dataset='POPE_train_YR_I+Q;C_p2+Q_best'
# offset_name="${model}_offset_generator_q_10"
# categories=("legality")

num_heads_list=(8 16 24 32 40)
alpha_list=(1 3 5 7 9)

for num_head in "${num_heads_list[@]}"; do
  # 内层循环
    for alpha in "${alpha_list[@]}"; do
        echo $num_head $alpha
        python inference_iti_youare_offset.py --model $model \
                        --validate_dataset $validate_dataset \
                        --probe_dataset $probe_dataset \
                        --categories $categories \
                        --log_file "logs/evaluate-${category}_${model}.log" \
                        --device $device \
                        --num_heads $num_head \
                        --alpha $alpha \
                        --start_layer 0 \
                        --end_layer 31 \
                        --offset_name $offset_name \
                        --subfix '_train_I+Q;C_p2+Q_end31_youare_YR_off10_q' \
                        --use_center_of_mass
        subfix="_${num_head}_${alpha}_train_I+Q;C_p2+Q_end31_youare_YR_off10_q"
        python eval/mme_eval.py --model $model \
                        --dimensions $categories \
                        --log_file "logs/evaluate-${category}_${model}.log" \
                        --device $device \
                        --validate_dataset $validate_dataset \
                        --subfix $subfix
    done
done