Closed pearlmary closed 1 year ago
Hi. I will help you with troubleshooting.
git clone https://github.com/Unispac/Visual-Adversarial-Examples-Jailbreak-Large-Language-Models.git
cd Visual-Adversarial-Examples-Jailbreak-Large-Language-Models
conda env create -f environment.yml conda activate minigpt4
This is important as the version of the transformers package often matters.
2. Could you confirm that you are using the 13b version of minigpt-4 checkpoints built from vicuna-13b-v0?
Currently, I see you are using the 7b version. (might be problematic, because all of our configurations are set for 13b version)
If you still meet problems, please feel free to let us know.
Thank you for helping out.
git clone https://github.com/Unispac/Visual-Adversarial-Examples-Jailbreak-Large-Language-Models.git
cd Visual-Adversarial-Examples-Jailbreak-Large-Language-Models
conda env create -f environment.yml conda activate minigpt4
Hi, I suspect that this is due to the reason that you are using v1.3 instead of v0.
Please refer to this docs from the vicuna repository: https://github.com/lm-sys/FastChat/blob/main/docs/vicuna_weights_version.md
1) It's important to note that later versions use a different separator that that used by v0. 2) Different model versions also have different source code compatibility.
For compatibility with MiniGPT-4 implementation, I think we should also use v0. Because the linear projection layer learned by the MiniGPT-4 is w.r.t to v0 model. If you use models of other versions, the model will not function that well.
I understand the requirement for separately downloading llama is a bottleneck for setting up the v0 version. However, since MiniGPT-4 is trained with v0 model, we have to stick to that.
Thank you for the reply. So, you want me to stick with v0 version due to the reasons mentioned above. Accepted. But still I have few doubts?
Hi,
I think there is no barrier preventing you to attack the 7b version model. As long as the model is correctly set up according to MiniGPT-4 repository. Overall, we are providing an attack algorithm. As long as the model is end-to-end differentiable, the same attack loop can be applied to the model. Beside MiniGPT-4, we also attacked LLaVA and InstructBLIP recently. We would be happy to release more examples soon.
Currently, we implement the pipeline on a single gpu only. If you want to do multi-gpus, I think you need to slightly change the codes a little bit using multi-gpu supports of pytorch.
- Beside MiniGPT-4, we also attacked LLaVA and InstructBLIP recently. We would be happy to release more examples soon.
That's great news! Waiting to see how the jailbreak is...
Hi, Finally need to clarify this.
Will the 7b setup for demo work on 32GB GPU machine or do we need a higher one?
Thank You.
Hi, I think 32 GB should be enough for the 7b version. If you run the attack with a batch size of 8 and find that the memory is not enough, you may also reduce the batch size to 6 or 4. Then, I believe it would work.
Everytime, I try the commands given in the repo, I'm always facing this error. Can you guide me on this?
(auto) root@537614b35cbf:/workspace/VAJB# python visual_attack.py --cfg-path eval_configs/minigpt4_eval.yaml --gpu-id 0 --n_iters 5000 --constrained --eps 16 --alpha 1 --save_dir visual_constrained_eps_16
pr Give the following image: ImageContent. You will be able to see the image once I provide it to you. Please answer my questions.###Human: ###Assistant: