- Pytorch 1.2+
- Python 3.5+
- Huggingface Transformer
- BERTScore
Basically, the code is supposed to run in the GPU environment.
If you do not have a GPU, it is recommended to modify the code and use it in a CPU environment.
By default, the folder path is an absolute path, so please set the root according to your settings.
Description based on the yelp dataset
cd generation_model/yelp
cd classifier
python3 train.py
python3 train.py
cd gpt2/yelp
python3 train.py
cd evaluation/yelp/my_model/SST/
Check out generalization_eval_new.ipynb
Systems are evaluated using BLEU, classification accuracy, PPL, and BERTscore.
@inproceedings{lee-2020-stable,
title = "Stable Style Transformer: Delete and Generate Approach with Encoder-Decoder for Text Style Transfer",
author = "Lee, Joosung",
booktitle = "Proceedings of the 13th International Conference on Natural Language Generation",
month = dec,
year = "2020",
address = "Dublin, Ireland",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2020.inlg-1.25",
pages = "195--204"
}