Home

Awesome

P5: Plug-and-Play Persona Prompting for Personalized Response Selection

test The overall flow of P5 model.

Requirements

  1. Pytorch 1.8
  2. Python 3.6
  3. transformers>=4.4.0
  4. datasets
  5. scipy

Dataset

Dataset folder location

Pretrained Model

Model folder location

NP_focus (NP: No Persona)

standard response selection model for Focus

cd NP_focus
python3 train.py --model_type roberta-{size} --epoch 10

NP_persona

standard response selection model for PERSONA-CHAT

cd NP_persona
python3 train.py --model_type roberta-{size} --persona_type {persona_type} --epoch 10

SoP (Similarity of Persona)

Zero-shot baseline

cd SoP
python3 test_perchat.py --model_type roberta-{size} --persona_type {persona_type} --persona simcse --weight {weight} --agg max

prompt_finetuning

Fine-tuned P5 model

cd prompt_finetuning
python3 train.py --model_type roberta-{size} --data_type {data_type} --persona_type {persona_type} --persona {persona} --num_of_persona {num_of_persona} --reverse

prompt_persona_context (ablation study)

Zero-shot P5 model

cd prompt_persona_context
python3 test.py --model_type roberta-{size} --data_type {data_type} --persona_type {persona_type} --persona {persona} --num_of_persona {num_of_persona} --reverse

Citation

@article{lee2023p5,
  title={P5: Plug-and-Play Persona Prompting for Personalized Response Selection},
  author={Lee, Joosung and Oh, Minsik and Lee, Donghun},
  journal={arXiv preprint arXiv:2310.06390},
  year={2023}
}