Skip to content

Code for the paper "Parameter-Efficient Controllable Abstractive Summarization"

Notifications You must be signed in to change notification settings

ntunlp/PromptSum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PromptSum

Environment

Once you clone the repo, create a dedicated conda environment with Python 3.7:

cd PromptSum/
conda create --name promptsum python=3.7

Next activate the environment:

conda activate promptsum

Then install all the dependencies:

pip install -r requirements.txt

Experiments

First change the global variables in src/hyperparameters.py according to your respective local paths.

To run pre-training:

bash src/scripts/run_pretraining.sh

If you cannot do the pretraining, you can use our checkpoint here.
After unzipping the folder, place it in pretrained_ckpt/.

To run 0-shot summarization (3 seeds in validation, 1 seed in test):

bash src/scripts/run_zeroshot.sh

To run few-shot summarization (3 seeds):

bash src/scripts/run_kshot_promptsum.sh
bash src/scripts/run_kshot_controllability.sh
bash src/scripts/run_kshot_counterfactual.sh
bash src/scripts/run_kshot_hallucination.sh

To run full-shot summarization (1 seed):

bash src/scripts/run_fullshot_promptsum.sh

Citation

If you find any of this useful, please kindly consider citing our paper in your publication.

@article{ravaut2023promptsum,
  title={Promptsum: Parameter-efficient controllable abstractive summarization},
  author={Ravaut, Mathieu and Chen, Hailin and Zhao, Ruochen and Qin, Chengwei and Joty, Shafiq and Chen, Nancy},
  journal={arXiv preprint arXiv:2308.03117},
  year={2023}
}

About

Code for the paper "Parameter-Efficient Controllable Abstractive Summarization"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •