A Model Zoo for Generative Recommendation.
Metrics
| Methods | R@5 | R@10 | N@5 | N@10 |
|---|---|---|---|---|
| SASRec | 0.0469 | 0.0688 | 0.0305 | 0.0375 |
| HSTU | 0.0486 | 0.0708 | 0.0340 | 0.0412 |
| TIGER (Paper) | 0.0454 | 0.0648 | 0.0321 | 0.0384 |
| TIGER (Ours) | 0.0465 | 0.0721 | 0.0297 | 0.0378 |
| LCRec | 0.0525 | 0.0791 | 0.0352 | 0.0438 |
| Methods | R@5 | R@10 | N@5 | N@10 |
|---|---|---|---|---|
| SASRec | 0.0249 | 0.0373 | 0.0145 | 0.0185 |
| HSTU | 0.0243 | 0.0365 | 0.0168 | 0.0207 |
| TIGER (Paper) | 0.0264 | 0.0400 | 0.0181 | 0.0225 |
| TIGER (Ours) | 0.0266 | 0.0414 | 0.0176 | 0.0224 |
| LCRec | 0.0281 | 0.0422 | 0.0181 | 0.0226 |
| Methods | R@5 | R@10 | N@5 | N@10 |
|---|---|---|---|---|
| SASRec | 0.0483 | 0.0700 | 0.0304 | 0.0374 |
| HSTU | 0.0504 | 0.0685 | 0.0368 | 0.0427 |
| TIGER (Paper) | 0.0521 | 0.0712 | 0.0371 | 0.0432 |
| TIGER (Ours) | 0.0420 | 0.0647 | 0.0280 | 0.0350 |
| LCRec | 0.0444 | 0.0683 | 0.0294 | 0.0371 |
- Multiple Models: Implementations of SASRec, HSTU, RQVAE, TIGER, LCRec, COBRA, and NoteLLM
- Modular Design: Clean separation of models, data, and training logic
- Flexible Configuration: Gin-config based experiment management
- Easy Extension: Add custom datasets and models with minimal code
- Reproducible: Consistent evaluation metrics (Recall@K, NDCG@K)
| Model | Type | Description |
|---|---|---|
| SASRec | Baseline | Self-Attentive Sequential Recommendation |
| HSTU | Baseline | Hierarchical Sequential Transduction Unit with temporal bias |
| RQVAE | Generative | Residual Quantized VAE for semantic ID generation |
| TIGER | Generative | Generative Retrieval with trie-based constrained decoding |
| LCRec | Generative | LLM-based recommendation with collaborative semantics |
| COBRA | Generative | Cascaded sparse-dense representations |
git clone https://github.com/phonism/genrec.git
cd genrec
pip install -e .pip install -r requirements.txt# Train on Amazon Beauty dataset
python genrec/trainers/rqvae_trainer.py config/tiger/amazon/rqvae.gin
# Train on other datasets
python genrec/trainers/rqvae_trainer.py config/tiger/amazon/rqvae.gin --split sports# Requires pretrained RQVAE checkpoint
python genrec/trainers/tiger_trainer.py config/tiger/amazon/tiger.gin# SASRec
python genrec/trainers/sasrec_trainer.py config/sasrec/amazon.gin
# HSTU
python genrec/trainers/hstu_trainer.py config/hstu/amazon.gin--split <dataset> # beauty, sports, toys, clothing--gin "param=value"# Change epochs and batch size
python genrec/trainers/tiger_trainer.py config/tiger/amazon/tiger.gin \
--gin "train.epochs=200" \
--gin "train.batch_size=128"
# Custom model path
python genrec/trainers/lcrec_trainer.py config/lcrec/amazon/lcrec.gin \
--gin "MODEL_HUB_QWEN3_1_7B='/path/to/model'"genrec/
├── models/ # Model implementations (7 models)
├── modules/ # Reusable components (attention, loss, metrics)
├── trainers/ # Training scripts with Gin configuration
└── data/ # Dataset implementations
config/ # Gin configuration files
scripts/ # Utility scripts
docs/ # Documentation (English & Chinese)
Full documentation is available at https://phonism.github.io/genrec
We welcome contributions! Please see our Contributing Guide for details.
If you find this project useful, please cite:
@software{genrec2025,
title = {GenRec: A Model Zoo for Generative Recommendation},
author = {Qi Lu},
year = {2025},
url = {https://github.com/phonism/genrec}
}- TIGER: Recommender Systems with Generative Retrieval
- RQ-VAE-Recommender by Edoardo Botta
- LC-Rec: LLM-based Collaborative Recommendation
- HSTU: Hierarchical Sequential Transduction Units
This project is licensed under the MIT License - see the LICENSE file for details.
