Our implementation is based on ESConv.
Download ESConv.json
and strategy.json and
put them in the folder DATA
.
Enter DATA
and run python process.py
.
To preprocess the training data (for Blender-Vanilla and Blender-Joint, respectively), run:
python prepare.py --config_name vanilla --inputter_name vanilla --train_input_file DATA/train.txt --max_input_length 160 --max_decoder_input_length 40
python prepare.py --config_name strat --inputter_name strat --train_input_file DATA/train.txt --max_input_length 160 --max_decoder_input_length 40
Run:
. RUN/train_vanilla.sh {gpu_id}
. RUN/train_strat.sh {gpu_id}
Change the value of --preference_model_dir
in the RUN/align_vanilla.sh and RUN/align_strat files.
The--preference_model_dir
is the path of the preference model checkpoint folder.
Run:
. RUN/align_vanilla.sh {gpu_id} {model_path}
. RUN/align_strat.sh {gpu_id} {model_path}
The {model_path}
is the path of the base model checkpoint folder.
Run:
. RUN/infer_model.sh {gpu_id} {model_name} {model_path}
{model_name}
can be either vanilla or strat.