This is an implementation of the paper "Trojaning Language Models for Fun and Profit"
- Pytorch
- Transformers
- Stanza
- toxic_comments: Toxic Comment Classification
- question_answering: Question Answering
- text_generation: Text Generation with GPT-2
- text_infilling: scripts about Context-Aware Generative Model
The format of the Transformers' checkpoint can be found here: https://www.dropbox.com/sh/se991tx7cxm0aec/AAAFAuwr4NCLVDVqV26ZESmqa?dl=0]
If you use this codebase, please cite our paper:
@proceedings{Zhang:TrojanLM
author = {{Zhang}, Xinyang and {Zhang}, Zheng and {Ji}, Shouling and {Wang}, Ting},
title = "{Trojaning Language Models for Fun and Profit}",
booktitle = {Proceedings of the IEEE European Symposium on Security and Privacy (EuroS&P)},
year = 2021,
}