Eric-Wallace / universal-triggers

Universal Adversarial Triggers for Attacking and Analyzing NLP (EMNLP 2019)
MIT License
293 stars 56 forks source link

BERT Model for SST Attack #26

Open tsaland opened 1 year ago

tsaland commented 1 year ago

Hi Eric, I'm looking at your paper for a school project and was wondering if you had any tips for adapting the code to generate triggers for a BERT model during the sst attack. Any help would be appreciated!

Eric-Wallace commented 1 year ago

Hello, the best code to look at would be the one for attacking gpt2. It uses a (now outdated version) of huggingface transformers. If you start from there, hopefully you can modify it to use BERT instead.