This code is based on Fairseq.
- We use Conda python 3.7 and strongly recommend that you create a new environment.
conda create -n bart python=3.7.
- Run the following command.
pip install --editable ./pip install -r requirements.txt
You can get data here. Put them under the dir data/*.
You can follow the following steps to reproduce the best results in our paper.
Download checkpoints here. Put the checkpoint under the dir ckpt/samsum.pt.
sh ./my_scripts/bpe.shsh ./my_scripts/binarize.sh
- Produce final summaries.
sh ./my_scripts/infer.sh
python py_rouge_test.py -c summaries/samsum.txt
| ROUGE-1 | ROUGE-2 | ROUGE-L | |
|---|---|---|---|
| SAMSum | 53.70 | 28.79 | 50.81 |
Download bart.large checkpoint. Put it under the dir bart/bart.large/*.
sh ./my_scripts/bpe.shsh ./my_scripts/binarize.sh
sh ./my_scripts/train.sh
Run the following command:
sh ./my_scripts/infer.sh- set up ckpt_dir param first.