This repo presents implementation of PAP-REC: Personalized Automatic Prompt for Recommendation Language Model.
@misc{li2024paprec,
title={PAP-REC: Personalized Automatic Prompt for Recommendation Language Model},
author={Zelong Li and Jianchao Ji and Yingqiang Ge and Wenyue Hua and Yongfeng Zhang},
year={2024},
eprint={2402.00284},
archivePrefix={arXiv},
primaryClass={cs.IR}
}
- Python 3.9.7
- PyTorch 1.10.1
- transformers 4.2.1
- tqdm
- numpy
- sentencepiece
- pyyaml
-
Clone this repo
-
Install necessary packages:
pip install -r requirements.txt
-
Download preprocessed data from this Google Drive link, then put them into the data folder. If you would like to preprocess your own data, please follow the jupyter notebooks in the preprocess folder. Raw data can be downloaded from this Google Drive link, then put them into the raw_data folder.
-
Download pretrained checkpoints into snap folder. If you would like to train your own P5 models, snap folder will also be used to store P5 checkpoints.
-
Run main.py with arguments
Example:
python main.py --task sequential --dataset beauty --model_size small --dynamic_length 0
See CHECKPOINTS.md.
This codebase is developed based on P5.