TRAIN_AND_VALIDATE.md

March 18, 2025 ยท View on GitHub

VLM/LLM checkpoint preparation

victim model

You should first download the following checkpoint of viction model from huggleface website and save them in ./modellib dir.

Training

  • QR Attack

    Run this script to train our AdaShiled

       bash scripts/train_ours_qr.sh
    
  • FigStep Attack

    Run this script to train our AdaShiled

        bash scripts/train_ours_figstep.sh
    

Inference

Structure-based Jailbreak Attack

  • QR Attack

    Run this script to evaluate our AdaShiled

       bash scripts/infer_ours_qr.sh
    
  • FigStep Attack

    Run this script to evaluate our AdaShiled

        bash scripts/infer_ours_figstep.sh
    

Benign dataset ( MM-Vet ) Test

  1. Extract mm-vet.zip to data/mmvet.

  2. Run this script to evaluate our AdaShiled (To do)

      bash  scripts/infer_ours_benign.sh