Downloads · 30 days
33
21% of all-time downloads
heimai/Industrial_and_Scientific_Qwen2.5_0.5B_sft
Industrial_and_Scientific_Qwen2.5_0.5B_sft is a machine learning model from heimai. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
MiniOneRec 是一个基于生成式架构的推荐系统模型。该模型以 Qwen2.5-0.5B 为底座,通过语义 ID(Semantic ID)技术对物品进行编码,将推荐任务转化为序列生成任务。
Downloads · 30 days
33
21% of all-time downloads
All-time downloads
156
Public
Parameters
494M
1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors989 MB · 98%
From the Hugging Face model README
MiniOneRec 是一个基于生成式架构的推荐系统模型。该模型以 Qwen2.5-0.5B 为底座,通过语义 ID(Semantic ID)技术对物品进行编码,将推荐任务转化为序列生成任务。
基于 Beam Search (num_beams=50) 的测试结果:
| 指标 (Metric) | @1 | @10 | @20 | @50 |
|---|---|---|---|---|
| HR (命中率) | 4.48% | 8.89% | 11.38% | 17.27% |
| NDCG (排序质量) | 4.48% | 6.40% | 7.03% | 8.18% |
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "你的用户名/仓库名"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
# 示例输入
prompt = "### Instruction:\nPredict the next item ID.\n\n### Input:\n<a_1><b_2> -> \n\n### Response:\n"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=128, num_beams=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))