Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChatGLM2模型下无法复现攻击 #2

Open
GrenadeBomB opened this issue Jul 25, 2024 · 0 comments
Open

ChatGLM2模型下无法复现攻击 #2

GrenadeBomB opened this issue Jul 25, 2024 · 0 comments

Comments

@GrenadeBomB
Copy link

您好:
我运行了开源代码,在Vicuna和Baichuan模型上都能够成功复现攻击。但是选择ChatGLM模型后,在迭代过程中input会表现为出现很多��符号的字符序列,并且随着迭代进行会 input的长度会越来越短,最终也无法降低loss,实现攻击。(如下图所示)
111
222
image
image

我对于源代码的修改,仅在于:

  1. 修改tranformer版本为ChatGLM2对应的transformers==4.30.2(好像因为版本太新会报错);
  2. 修改main.py中的batch_size和target(如图)
    image
    image

包含运行结果的notebook如下:
OOD_GLM2.zip

我对于vicuna、baichuan、internlm模型进行试验,均成功复现攻击,但是对于ChatGLM则无法成功复现,迭代中出现很多�符号并且无法优化出攻击结果。请问,这个问题应当如何解决?万分感谢!!🙇‍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant