zenggo / affective-decoding-4-empathetic-dialog

The code of paper Affective Decoding for Empathetic Response Generation
11 stars 0 forks source link

Code of paper Affective Decoding for Empathetic Response Generation

5 branches for different experiment settings: master(Transfo), adde(AD, AD+DE), adm(AD + multi-task learning), tml(Transfo + multi-task learning), prepend (Transfo + prepending emotion label predicted by fasttext).

Usage

mkdir log
mkdir save
mkdir save/pretrained_lm // download

download the pretrained model params (GPT) from here. Put the files into save/pretrained_lm

Train

Run the command (GPU will be used if available, make sure CUDA is installed):

python train.py --save_path save/model

Interact with model

git checkout adm
python play.py --model_path save/model --turns 2

Requirements