Views
No views yet

1from modelscope import AutoModelForCausalLM, AutoTokenizer
2
3model_id = "njauzwh/Xunzi-Yayun-R1"
4tokenizer = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", trust_remote_code=True)1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_id = "ricardozhy/Xunzi-Yayun-R1"
4tokenizer = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", trust_remote_code=True)1system_prompt = "Respond in the following format:<think>...</think><answer>...</answer>"
2
3
4query = "请以'春风'为题创作一首五言绝句,押平水韵东韵"
5messages = [
6 {"role": "system", "content": system_prompt},
7 {"role": "user", "content": query}
8]
9response = model.chat(tokenizer, messages)
10print(response)
11| 模型类型 | 是否冷启动 | 模型名称 | 平仄(tones) | 押韵(rhymes) | 对仗(antithesis) | 字数(length) | 总分(total) |
|---|---|---|---|---|---|---|---|
| 推理模型+RAG | 冷启动 | Xunzi-Yayun-R1-32B | 75.63 | 91.23 | 94.20 | 98.76 | 86.34 |
| 推理模型+RAG | 冷启动 | Qwen2.5-32B-Instruct-RAG | 76.81 | 87.86 | 94.69 | 99.77 | 86.00 |
| 推理模型+RAG | 未冷启动 | Qwen2.5-32B-Instruct-GRPO-RAG | 80.89 | 83.26 | 93.88 | 97.55 | 85.86 |
| 推理模型 | / | DeepSeek-R1-671B | 79.94 | 80.92 | 94.67 | 99.59 | 85.15 |
| 数据集 | / | 唐诗三百首 | 72.99 | 87.20 | 93.72 | 98.13 | 83.91 |
| 推理模型 | 冷启动 | Xunzi-Yayun-R1-32B | 77.74 | 77.36 | 94.85 | 99.80 | 83.25 |
| 数据集 | / | 全唐诗 | 71.57 | 85.96 | 93.18 | 97.62 | 82.81 |
| 推理模型 | 未冷启动 | Qwen2.5-32B-Instruct-GRPO | 79.74 | 72.38 | 94.38 | 99.22 | 82.41 |
| 推理模型+RAG | 冷启动 | Qwen2.5-14B-Instruct-RAG | 72.28 | 87.54 | 90.63 | 91.47 | 82.44 |