Skip to content

Source code for paper "Contrastive Out-of-Distribution Detection for Pretrained Transformers", EMNLP 2021

License

Notifications You must be signed in to change notification settings

wzhouad/Contra-OOD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contra-OOD

Code for EMNLP 2021 paper Contrastive Out-of-Distribution Detection for Pretrained Transformers.

Requirements

Dataset

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 data folder.

Training and Evaluation

Finetune the PLM with the following command:

>> python run.py --task_name task

The task_name parameter can take sst2, imdb, trec, or 20ng. The training loss and evaluation results on the test set are synced to the wandb dashboard.

About

Source code for paper "Contrastive Out-of-Distribution Detection for Pretrained Transformers", EMNLP 2021

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages