Code for EMNLP 2021 paper Contrastive Out-of-Distribution Detection for Pretrained Transformers.
Most datasets used in paper are automatically downloaded by the datasets package. Instructions on downloading sst2 and multi30k are provided in
readme.txt under the
Training and Evaluation
Finetune the PLM with the following command:
>> python run.py --task_name task
task_name parameter can take
20ng. The training loss and evaluation results on the test set are synced to the wandb dashboard.