Update README.md
Browse files
README.md
CHANGED
|
@@ -8,22 +8,22 @@ base_model:
|
|
| 8 |
<img src="https://github.com/ricardozhy/QPM-1K-32B-R1/blob/main/%E5%94%90%E8%AF%97logo.png?raw=true" width="20%" />
|
| 9 |
</div>
|
| 10 |
|
| 11 |
-
# Yayun-R1
|
| 12 |
|
| 13 |
<div align="center">
|
| 14 |
|
| 15 |
-
[](https://modelscope.cn/models/njauzwh/Yayun-R1/summary)
|
| 16 |
-
[](https://github.com/Xunzi-LLM-of-Chinese-classics/Yayun-R1)
|
| 17 |
-
[](https://huggingface.co/ricardozhy/Yayun-R1)
|
| 18 |

|
| 19 |
|
| 20 |
</div>
|
| 21 |
|
| 22 |
## 简介
|
| 23 |
|
| 24 |
-
Yayun-R1 是一个基于GRPO强化学习的小样本唐诗生成推理模型。该模型致力于解决传统唐诗生成面临的两大核心挑战:一方面,避免对超大规模参数量模型的依赖,降低算力消耗;另一方面,克服“形神割裂”现象,使生成的诗歌既符合格律要求,又具备较高的艺术表现力。
|
| 25 |
|
| 26 |
-
Yayun-R1 通过“规则编码-知识蒸馏-动态强化-检索增强”的方法论体系,在仅有32B参数规模的情况下,成功实现了优于DeepSeek-R1-671B等超大模型的唐诗生成能力。
|
| 27 |
|
| 28 |
## 主要特点
|
| 29 |
|
|
@@ -40,7 +40,7 @@ Yayun-R1 通过“规则编码-知识蒸馏-动态强化-检索增强”的方
|
|
| 40 |
```python
|
| 41 |
from modelscope import AutoModelForCausalLM, AutoTokenizer
|
| 42 |
|
| 43 |
-
model_id = "njauzwh/Yayun-R1"
|
| 44 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 45 |
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", trust_remote_code=True)
|
| 46 |
```
|
|
@@ -50,7 +50,7 @@ model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", trust_
|
|
| 50 |
```python
|
| 51 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 52 |
|
| 53 |
-
model_id = "ricardozhy/Yayun-R1"
|
| 54 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 55 |
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", trust_remote_code=True)
|
| 56 |
```
|
|
@@ -73,7 +73,7 @@ print(response)
|
|
| 73 |
|
| 74 |
### 格律要求说明
|
| 75 |
|
| 76 |
-
Yayun-R1 支持以下格律要求的诗歌创作:
|
| 77 |
|
| 78 |
- **诗体**:绝句、律诗
|
| 79 |
- **字数**:五言、七言
|
|
@@ -83,7 +83,7 @@ Yayun-R1 支持以下格律要求的诗歌创作:
|
|
| 83 |
|
| 84 |
## 技术细节
|
| 85 |
|
| 86 |
-
Yayun-R1 基于以下技术创新:
|
| 87 |
|
| 88 |
1. **GRPO强化学习**:使用Group Relative Policy Optimization对模型进行训练,将离散的诗歌格律转化为可微调奖励信号
|
| 89 |
|
|
@@ -101,12 +101,12 @@ Yayun-R1 基于以下技术创新:
|
|
| 101 |
|
| 102 |
| 模型类型 | 是否冷启动 | 模型名称 | 平仄(tones) | 押韵(rhymes) | 对仗(antithesis) | 字数(length) | 总分(total) |
|
| 103 |
| --- | --- | --- | --- | --- | --- | --- | --- |
|
| 104 |
-
| 推理模型+RAG | 冷启动 | **Yayun-R1-32B** | 75.63 | **91.23** | 94.20 | 98.76 | **86.34** |
|
| 105 |
| 推理模型+RAG | 冷启动 | Qwen2.5-32B-Instruct-RAG | 76.81 | 87.86 | 94.69 | 99.77 | 86.00 |
|
| 106 |
| 推理模型+RAG | 未冷启动 | Qwen2.5-32B-Instruct-GRPO-RAG | 80.89 | 83.26 | 93.88 | 97.55 | 85.86 |
|
| 107 |
| 推理模型 | / | DeepSeek-R1-671B | 79.94 | 80.92 | 94.67 | 99.59 | 85.15 |
|
| 108 |
| 数据集 | / | 唐诗三百首 | 72.99 | 87.20 | 93.72 | 98.13 | 83.91 |
|
| 109 |
-
| 推理模型 | 冷启动 | Yayun-R1-32B | 77.74 | 77.36 | 94.85 | 99.80 | 83.25 |
|
| 110 |
| 数据集 | / | 全唐诗 | 71.57 | 85.96 | 93.18 | 97.62 | 82.81 |
|
| 111 |
| 推理模型 | 未冷启动 | Qwen2.5-32B-Instruct-GRPO | 79.74 | 72.38 | 94.38 | 99.22 | 82.41 |
|
| 112 |
| 推理模型+RAG | 冷启动 | Qwen2.5-14B-Instruct-RAG | 72.28 | 87.54 | 90.63 | 91.47 | 82.44 |
|
|
@@ -134,5 +134,5 @@ Yayun-R1 基于以下技术创新:
|
|
| 134 |
|
| 135 |
如有任何问题,请通过以下方式联系我们:
|
| 136 |
|
| 137 |
-
- GitHub Issues: [提交问题](https://github.com/Xunzi-LLM-of-Chinese-classics/Yayun-R1/issues)
|
| 138 |
- 邮箱:zhaowenhua@njau.edu.cn
|
|
|
|
| 8 |
<img src="https://github.com/ricardozhy/QPM-1K-32B-R1/blob/main/%E5%94%90%E8%AF%97logo.png?raw=true" width="20%" />
|
| 9 |
</div>
|
| 10 |
|
| 11 |
+
# Xunzi-Yayun-R1
|
| 12 |
|
| 13 |
<div align="center">
|
| 14 |
|
| 15 |
+
[](https://modelscope.cn/models/njauzwh/Xunzi-Yayun-R1/summary)
|
| 16 |
+
[](https://github.com/Xunzi-LLM-of-Chinese-classics/Xunzi-Yayun-R1)
|
| 17 |
+
[](https://huggingface.co/ricardozhy/Xunzi-Yayun-R1)
|
| 18 |

|
| 19 |
|
| 20 |
</div>
|
| 21 |
|
| 22 |
## 简介
|
| 23 |
|
| 24 |
+
Xunzi-Yayun-R1 是一个基于GRPO强化学习的小样本唐诗生成推理模型。该模型致力于解决传统唐诗生成面临的两大核心挑战:一方面,避免对超大规模参数量模型的依赖,降低算力消耗;另一方面,克服“形神割裂”现象,使生成的诗歌既符合格律要求,又具备较高的艺术表现力。
|
| 25 |
|
| 26 |
+
Xunzi-Yayun-R1 通过“规则编码-知识蒸馏-动态强化-检索增强”的方法论体系,在仅有32B参数规模的情况下,成功实现了优于DeepSeek-R1-671B等超大模型的唐诗生成能力。
|
| 27 |
|
| 28 |
## 主要特点
|
| 29 |
|
|
|
|
| 40 |
```python
|
| 41 |
from modelscope import AutoModelForCausalLM, AutoTokenizer
|
| 42 |
|
| 43 |
+
model_id = "njauzwh/Xunzi-Yayun-R1"
|
| 44 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 45 |
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", trust_remote_code=True)
|
| 46 |
```
|
|
|
|
| 50 |
```python
|
| 51 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 52 |
|
| 53 |
+
model_id = "ricardozhy/Xunzi-Yayun-R1"
|
| 54 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 55 |
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", trust_remote_code=True)
|
| 56 |
```
|
|
|
|
| 73 |
|
| 74 |
### 格律要求说明
|
| 75 |
|
| 76 |
+
Xunzi-Yayun-R1 支持以下格律要求的诗歌创作:
|
| 77 |
|
| 78 |
- **诗体**:绝句、律诗
|
| 79 |
- **字数**:五言、七言
|
|
|
|
| 83 |
|
| 84 |
## 技术细节
|
| 85 |
|
| 86 |
+
Xunzi-Yayun-R1 基于以下技术创新:
|
| 87 |
|
| 88 |
1. **GRPO强化学习**:使用Group Relative Policy Optimization对模型进行训练,将离散的诗歌格律转化为可微调奖励信号
|
| 89 |
|
|
|
|
| 101 |
|
| 102 |
| 模型类型 | 是否冷启动 | 模型名称 | 平仄(tones) | 押韵(rhymes) | 对仗(antithesis) | 字数(length) | 总分(total) |
|
| 103 |
| --- | --- | --- | --- | --- | --- | --- | --- |
|
| 104 |
+
| 推理模型+RAG | 冷启动 | **Xunzi-Yayun-R1-32B** | 75.63 | **91.23** | 94.20 | 98.76 | **86.34** |
|
| 105 |
| 推理模型+RAG | 冷启动 | Qwen2.5-32B-Instruct-RAG | 76.81 | 87.86 | 94.69 | 99.77 | 86.00 |
|
| 106 |
| 推理模型+RAG | 未冷启动 | Qwen2.5-32B-Instruct-GRPO-RAG | 80.89 | 83.26 | 93.88 | 97.55 | 85.86 |
|
| 107 |
| 推理模型 | / | DeepSeek-R1-671B | 79.94 | 80.92 | 94.67 | 99.59 | 85.15 |
|
| 108 |
| 数据集 | / | 唐诗三百首 | 72.99 | 87.20 | 93.72 | 98.13 | 83.91 |
|
| 109 |
+
| 推理模型 | 冷启动 | Xunzi-Yayun-R1-32B | 77.74 | 77.36 | 94.85 | 99.80 | 83.25 |
|
| 110 |
| 数据集 | / | 全唐诗 | 71.57 | 85.96 | 93.18 | 97.62 | 82.81 |
|
| 111 |
| 推理模型 | 未冷启动 | Qwen2.5-32B-Instruct-GRPO | 79.74 | 72.38 | 94.38 | 99.22 | 82.41 |
|
| 112 |
| 推理模型+RAG | 冷启动 | Qwen2.5-14B-Instruct-RAG | 72.28 | 87.54 | 90.63 | 91.47 | 82.44 |
|
|
|
|
| 134 |
|
| 135 |
如有任何问题,请通过以下方式联系我们:
|
| 136 |
|
| 137 |
+
- GitHub Issues: [提交问题](https://github.com/Xunzi-LLM-of-Chinese-classics/Xunzi-Yayun-R1/issues)
|
| 138 |
- 邮箱:zhaowenhua@njau.edu.cn
|