majumderb / pabst

Code for "Unsupervised Enrichment of Persona-grounded Dialog with Background Stories", ACL 2021
MIT License
10 stars 1 forks source link

train #1

Closed xiao-ming-code closed 3 years ago

xiao-ming-code commented 3 years ago

Hello, could you please tell me the steps and commands of training and prediction

majumderb commented 3 years ago

Hi,

Our method doesn't require training a dialog model. You should use any transformer-based generative model as your dialog model.

To train the dialog NLI classifier, see here: https://github.com/majumderb/pabst/blob/main/pabst/run_pplm_discrim_train.py --help from the command line should give you all the arguments you can pass.

Once you have both the model (dialog model of your choice, and the dnli model), you can run inference using this code: https://github.com/majumderb/pabst/blob/main/pabst/run_pplm.py Similarly, --help from the command line should give you all the arguments you can pass.