EGRec is an anonymous link to our paper submission "Leveraging Generative Rich Intents for Enhanced Recommendation with Large Language Models".
python>=3.8
transformers>=4.39.0
numpy
pytorch>=1.10.0
scikit-learn
transformers_stream_generator
einops
tiktoken
-
Download dataset
Take Amazon-Books for example, download the dataset to folder
data/amz/raw_data/
-
Preprocessing: in folder
preprocess
- run
python preprocess_amz.py
. - run
generate_data.py
to generate data . - You can download the prompt we generated from the link
https://onedrive.live.com/?authkey=%21ANkvgxZZzIlXSBc&id=ACF9A75DEBDDC53F%21106&cid=ACF9A75DEBDDC53F
and put it indata/amz/raw_data/
. Of course, you can also generate your own prompts based on the paper.
- run
-
model: in folder
model
Run
python main.py
.