This is a repository for paper titled: PlaSma: Making Small Language Models Better Procedural Knowledge Models for (Counterfactual) Planning [paper]
Faeze Brahman, Chandra Bhagavatula, Valentina Pyatkin, Jena D. Hwang, Xiang Lorraine Li, Hirona J. Arai, Soumya Sanyal, Keisuke Sakaguchi, Xiang Ren, Yejin Choi
conda env create -f environment.yml
conda activate plasma
pip install torch==1.8.2 torchvision==0.9.2 torchaudio==0.8.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cu111
Please find the CoPlan dataset with additional details in data/CoPlan/
directory.
For distilling goal-based planning
, run:
cd distillation
bash run_distill.sh
For constrained and counterfactual (re)planning tasks, format the input json file and accordingly modify DATA_DIR
, --source_prefix
(T5-based models are recommended to have it), --text_column
(input field), and --summary_column
(output field) in the bash file.
-
Download multitask model checkpoint from here and verifier checkpoint from here.
-
Change this to load your goals/conditions from a file (instead of interactive generation).
-
Run the following command for conditional planning task:
cd verifier_guided_decoding
python verifier_guided_generation.py --task conditional-multi --alpha 0.75 --beta 0.25 --model_path <MODEL_CKPT_PATH> --classification_model_path <VERIFIER_CKPT_PATH>
run python verifier_guided_generation.py --help
to knonw more about for additional parameters.
- add support/details for all tasks in verifier guided decoding (working on instruction)
- provide models' checkpoints for all 3 single tasks and multitask T5-11B based models
- provide demo
If you find our paper/dataset/code helpful please cite us using:
@article{Brahman2023PlaSma,
author = {Faeze Brahman, Chandra Bhagavatula, Valentina Pyatkin, Jena D. Hwang, Xiang Lorraine Li, Hirona J. Arai, Soumya Sanyal, Keisuke Sakaguchi, Xiang Ren, Yejin Choi},
journal = {ArXiv preprint},
title = {PlaSma: Making Small Language Models Better Procedural Knowledge Models for (Counterfactual) Planning},
url = {https://arxiv.org/abs/2305.19472},
year = {2023}
}