python==3.8.13
torch==2.0.0
torchvision==0.15.1
torchaudio==2.0.1
transformers==4.46.2
accelerate==0.8.0
We use the Amazon Reviews 2014 dataset. You may download it.
cd process_data
python process_data.py
python process_collaborative_data.py
Then the SASRec model is employed to capture sequential user behaviors and derive product embeddings.
python compose_card.py
python encoder_card.py
train the NU-RQ-VAE
cd nu-rq-vae
python main.py
python generate_code.py
train the model
cd model
python main.py
We thank TIGER for providing the useful source code.