macksjeremy / GPTNULL

Adversarial Attack on GPTZERO
4 stars 0 forks source link

Documentation on this project #1

Open botsunny opened 1 year ago

botsunny commented 1 year ago

Hi there! I am interested in adapting the code in this repo for a project of mine. I am a newbie to adversarial machine learning in general and I was wondering if there is additional documentation to help me understand the code better. Right now, I am still confused as to where the attack happens in the code, as well as what the GPT2PPL model does exactly.

Thanks!

macksjeremy commented 1 year ago

Hi! I didn't expect this project to gain any traction, so the codebase is outdated. I pushed an update with a readme and the updated code. Pardon me.

botsunny commented 1 year ago

Thanks! However, the code in the call function of model.py seems to can't get around running the re functions as the sentence parameter turns out to be a list instead of a string. I have tried making some adjustments but the furthest I could get is 2 attack results (both skipped) before bumping into

File "/usr/local/lib/python3.10/dist-packages/textattack/goal_functions/goal_function.py", line 187, in _call_model_uncached
    assert len(inputs) == len(
AssertionError: Got 2 outputs for 49 inputs
[Succeeded / Failed / Skipped / Total] 0 / 0 / 2 / 2:   2% 2/100 [00:02<02:03,  1.26s/it

Am I doing some things wrong here?

Thank you!