This repository provides a PyTorch reference implementation of the main models and training procedures described in our paper:
Kun Yang, Siyao Zheng, Tianyi Li, Xiaodong Li, Hui Li. GenPlugin: A Plug-and-Play Framework for Long-Tail Generative Recommendation with Exposure Bias Mitigation.
Within the code directory: the folders ending with "-RAR" use to the Retrieval-Augmented Fine-tuning section, while the rest are for the model pre-training.
You'll need to train a model first, then cache user embeddings before proceeding with the retrieval-augmented fine-tuning.
transformers==4.46.0
torch==2.3.1+cu121
pretrain a model
run_train.sh
retrival content aware users
python sparse.py
use sasrec train a cf model to retrival Collaborative users
run
run_rag.sh
cache user representations and rerank
cd -RAR
finetune model
run_train.sh
test
run_test.sh
We greatly appreciate the official LETTER and MQL4Rec repository. Our code is built on their framework.