This is an early access release of the code and data for the paper "Diffusion Generative Recommendation with Continuous Tokens."
ContRec represents users\&items as latent vector representations using a not-quantized tokenizer and leverages the exceptional continuous-valued generation capability of diffusion models to operate within continuous spaces and generate implicit user preferences conditioned on the reasoning content of LLMs.
You can install the useful wheels by:
pip install -r requirements.txtPlease download the any open-source LLM, such as LLaMA-3.2-1B-Instruct, to the path: "ContRec/code/huggingface_path/".
All code for a complete implementation of ContRec (including finetuning, validation, and testing) is included in the "code" folder.
Please change your path to the "code" folder.
cd codeAlso replace input a correct "hf_token" in Line 228 of the "model_interface.py" file
hf_token = "Your_HF_TOKEN"We can simply run the "main.py" file to go through the pipeline:
python main.pyMore configurations can be found in the "parse.py" file.