SkillAgentSearch skills...

PlaSma

This is a repository for paper titled, PlaSma: Making Small Language Models Better Procedural Knowledge Models for (Counterfactual) Planning

Install / Use

/learn @allenai/PlaSma
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

PlaSma

This is a repository for paper titled: PlaSma: Making Small Language Models Better Procedural Knowledge Models for (Counterfactual) Planning [paper]

Authors:

Faeze Brahman, Chandra Bhagavatula, Valentina Pyatkin, Jena D. Hwang, Xiang Lorraine Li, Hirona J. Arai, Soumya Sanyal, Keisuke Sakaguchi, Xiang Ren, Yejin Choi

Installation:

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

1. CoPlan Dataset

Please find the CoPlan dataset with additional details in data/CoPlan/ directory.

2. Procedural Symbolic Knowledge Distillation

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.

3. Verifier-guided Decoding

<!-- For doing decoding using our verifier guided decoding algorithm please follow instruction in [`verifier_guided_decoding`](https://github.com/allenai/PlaSma/tree/main/verifier_guided_decoding) directory. -->
  1. Download multitask model checkpoint from here and verifier checkpoint from here.

  2. Change this to load your goals/conditions from a file (instead of interactive generation).

  3. 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.

TODO:

  • 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

Citation

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}
}

Related Skills

View on GitHub
GitHub Stars14
CategoryDevelopment
Updated4mo ago
Forks5

Languages

Python

Security Score

87/100

Audited on Nov 21, 2025

No findings