facebookresearch / advprompter

Official implementation of AdvPrompter https//arxiv.org/abs/2404.16873
Other
113 stars 10 forks source link

Problem about reproducing the ASR result on Llama2-7B-Chat #5

Closed leileqiTHU closed 2 months ago

leileqiTHU commented 3 months ago

Hello,

I've been attempting to replicate the ASR results mentioned in the paper. Although successful in most aspects, I've encountered difficulties specifically with the warmstart version of advprompter targeting Llama2-7B-Chat.

Here are the steps I followed:

  1. Execute the training command using Llama2-7B as the prompter and vicuna-13b-v1.5 as the target.
  2. Utilize the checkpoint from step 1, pretrain this checkpoint on the most recent csv file from the suffix_opt_dataset generated in step 1, then proceed with the training process targeting Llama2-7B-Chat.

Despite these steps, the validation ASR doesn't exceed 15%.

Could you please tell me if there's any problem with my replication results? I appreciate your assistance.

arman-z commented 3 months ago

Hi @leileqiTHU ,

Overall, the steps you described is looking good. Did you set train.q_params.lambda_val=150 for Llama-2-chat? You can also set lambda=150 for step=1 as well and repeat the steps.

VishyFishy02 commented 3 months ago

I am encountering the same issue and achieving a similar ASR as @leileqiTHU. However, in step 2, I used Llama2 without the PEFT checkpoint from the Vicuna-13b train run. From the paper it only stated that the prompter was fined tuned on the high-quality adversarial targets against Vicuna-13b (which I assumed was the most recent suffix_opt_dataset from the Vicuna13b training run).

@arman-z, could you provide some guidance on how to properly perform the steps to obtain AdvPrompter-warmstart against targetLLM Llama2-chat?

Also @leileqiTHU if you are able to achieve the proper warmstarted Advprompter against Llama-2 please let me know what adjustments you made.

arman-z commented 2 months ago

Closing this due to duplicate issue, see https://github.com/facebookresearch/advprompter/issues/8.

leileqiTHU commented 3 weeks ago

I am encountering the same issue and achieving a similar ASR as @leileqiTHU. However, in step 2, I used Llama2 without the PEFT checkpoint from the Vicuna-13b train run. From the paper it only stated that the prompter was fined tuned on the high-quality adversarial targets against Vicuna-13b (which I assumed was the most recent suffix_opt_dataset from the Vicuna13b training run).

@arman-z, could you provide some guidance on how to properly perform the steps to obtain AdvPrompter-warmstart against targetLLM Llama2-chat?

Also @leileqiTHU if you are able to achieve the proper warmstarted Advprompter against Llama-2 please let me know what adjustments you made.

Hi, I wonder if you successfully reproduce the warmstarted version ASR on Llama-2-7B-Chat, and if so can you give some suggestions on how to do so. I still fail to reproduce it despite following the steps described in the paper.

VishyFishy02 commented 3 weeks ago

Hi @leileqiTHU, so I ended up performing the warmstart steps, but use the suffix_opt_dataset generated against training Llama2-chat, not Vicuna13b. From there I was able to get about 20% asr@10 and 50% asr@50 .