Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pmixer/sasrec.pytorch
PyTorch(1.6+) implementation of https://github.com/kang205/SASRec
https://github.com/pmixer/sasrec.pytorch
pytorch recommender-system sasrec sequential-models
Last synced: 3 days ago
JSON representation
PyTorch(1.6+) implementation of https://github.com/kang205/SASRec
- Host: GitHub
- URL: https://github.com/pmixer/sasrec.pytorch
- Owner: pmixer
- License: apache-2.0
- Created: 2020-09-11T01:08:32.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-14T09:02:19.000Z (about 1 month ago)
- Last Synced: 2024-11-05T13:43:03.289Z (8 days ago)
- Topics: pytorch, recommender-system, sasrec, sequential-models
- Language: Python
- Homepage:
- Size: 19.8 MB
- Stars: 350
- Watchers: 5
- Forks: 93
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
modified based on [paper author's tensorflow implementation](https://github.com/kang205/SASRec), switching to PyTorch(v1.6) for simplicity, fixed issues like positional embedding usage etc. (making it harder to overfit, except for that, in recsys, personalization=overfitting sometimes)
to train:
```
python main.py --dataset=ml-1m --train_dir=default --maxlen=200 --dropout_rate=0.2 --device=cuda
```just inference:
```
python main.py --device=cuda --dataset=ml-1m --train_dir=default --state_dict_path='ml-1m_default/SASRec.epoch=1000.lr=0.001.layer=2.head=1.hidden=50.maxlen=200.pth' --inference_only=true --maxlen=200```
output for each run would be slightly random, as negative samples are randomly sampled, here's my output for two consecutive runs:
```
1st run - test (NDCG@10: 0.5897, HR@10: 0.8190)
2nd run - test (NDCG@10: 0.5918, HR@10: 0.8225)
```pls check paper author's [repo](https://github.com/kang205/SASRec) for detailed intro and more complete README, and here's the paper bib FYI :)
```
@inproceedings{kang2018self,
title={Self-attentive sequential recommendation},
author={Kang, Wang-Cheng and McAuley, Julian},
booktitle={2018 IEEE International Conference on Data Mining (ICDM)},
pages={197--206},
year={2018},
organization={IEEE}
}
```I see a dozen of citations of the repo recently🫰, here's the repo bib if needed.
```
@software{Huang_SASRec_pytorch,
author = {Huang, Zan},
title = {PyTorch implementation for SASRec},
url = {https://github.com/pmixer/SASRec.pytorch},
year={2020}
}
```