Downloads · 30 days
0
MongrelIntruder/sasrec-pytorch
sasrec-pytorch is a machine learning model from MongrelIntruder. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
PyTorch reimplementation of SASRec (Kang & McAuley, 2018), trained as part of a thesis study
Downloads · 30 days
0
Access
Public
Updated Aug 28, 2026
Repo size
1.7 MB
Likes
0
Public
Click a slice to open those files.
.bin858 KB · 98%
From the Hugging Face model README
PyTorch reimplementation of SASRec (Kang & McAuley, 2018), trained as part of a thesis study
Best validation/test scores seen during training:
pytorch_model.binmodel.pyutils.pyargs.jsonimport torch, json
from types import SimpleNamespace
from model import SASRec
from utils import build_index, data_partition
args = SimpleNamespace(**json.load(open("args.json")))
u2i_index, i2u_index = build_index(args.dataset)
dataset = data_partition(args.dataset)
usernum, itemnum = dataset[3], dataset[4]
model = SASRec(usernum, itemnum, args)
model.load_state_dict(torch.load("pytorch_model.bin", map_location="cpu"))
model.eval()