/SimpleReDial-v1

The sources codes of the DR-BERT model and baselines

Primary LanguagePythonMIT LicenseMIT

The sources codes of DR-BERT and baselines

Recent Activity

  1. Our released RRS corpus and Crawled Douban Nonparalell corpus can be found here.
  2. Our released BERT-FP post-training checkpoint for the RRS corpus can be found here.
  3. Our post-training and fine-tuning checkpoints on Ubuntu, Douban, E-commerce, and our released RRS datasets are released here. Feel free to reproduce the experimental results in the paper.

How to Use

  1. init the repo

    Before using the repo, please run the following command to init:

    # create the necessay folders
    python init.py
    
    # prepare the environment
    pip install -r requirements.txt
  2. train the model

    The necessary details can be found under the config folder.

    # dataset_name: douban, ecommerce, ubuntu, restoration-200k
    # model_name: dual-bert(DR-BERT), bert-ft, sa-bert, bert-fp(post-training), poly-encoder
    ./scripts/train.sh <dataset_name> <model_name> <cuda_ids>
  3. test the model

    ./scripts/test_rerank.sh <dataset_name> <model_name> <cuda_id>