MiniOneRec: Generative Recommendation Model

1. 模型简介

MiniOneRec 是一个基于生成式架构的推荐系统模型。该模型以 Qwen2.5-0.5B 为底座,通过语义 ID(Semantic ID)技术对物品进行编码,将推荐任务转化为序列生成任务。

  • 核心技术: RQ-VAE 语义 ID, SFT 指令微调, GRPO 强化学习对齐

2. 训练配置

  • 第一阶段 (SFT): 学习推荐指令格式与 ID 输出规范。
  • 第二阶段 (RL-GRPO): 通过排名奖励(Ranking Reward)优化排序质量。

3. 评估指标 (@Industrial_and_Scientific)

基于 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%

4. 快速使用

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))
Downloads last month
1
Safetensors
Model size
0.5B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for heimai/Industrial_and_Scientific_Qwen2.5_0.5B_sft

Finetuned
(578)
this model

Collection including heimai/Industrial_and_Scientific_Qwen2.5_0.5B_sft