Skip to content

The code of paper Affective Decoding for Empathetic Response Generation

Notifications You must be signed in to change notification settings

zenggo/affective-decoding-4-empathetic-dialog

Repository files navigation

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

  • PyTorch (version >=1.4)
  • tqdm
  • sklearn
  • spacy (version < 3)
  • ftfy
  • pandas
  • tensorboardX

About

The code of paper Affective Decoding for Empathetic Response Generation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published