RLRefine-Dataset / README.md
xinyuran's picture
Update README.md
db61d4a verified
|
Raw
History Blame Contribute Delete
5.7 kB
---
license: mit
language:
- zh
pretty_name: RLRefine Dataset
size_categories:
- 1K<n<10K
task_categories:
- text-generation
tags:
- synthetic
- structured-output
- information-extraction
- preference-data
- reinforcement-learning
configs:
- config_name: sft
data_files:
- split: train
path: data/checkpoint_924/sft.jsonl
- config_name: dpo
data_files:
- split: train
path: data/checkpoint_924/dpo.jsonl
- config_name: grpo
data_files:
- split: train
path: data/checkpoint_924/grpo.jsonl
---
# RLRefine Dataset
[中文说明](#中文说明) | [English](#english)
## 中文说明
RLRefine Dataset 是用于中文电商评论结构化关键词抽取的合成后训练数据集。数据通过
LLM-assisted 合成流水线生成,围绕同一批任务 Prompt 派生出 SFT、DPO 和 GRPO 三种
训练格式。该数据集由 [RLRefine](https://github.com/xinyuran/RLRefine) 项目产出。
本仓库保留 RLRefine `checkpoint-924` 后训练流程所使用的数据表示。发布文件保持原始训练
分布,没有去重、重排或重新生成,不应作为独立评测集使用。
### 数据配置
| Config | 文件 | 行数 | 用途 |
|---|---|---:|---|
| `sft` | `data/checkpoint_924/sft.jsonl` | 3,696 | 监督微调示范数据 |
| `dpo` | `data/checkpoint_924/dpo.jsonl` | 3,696 | chosen/rejected 偏好对 |
| `grpo` | `data/checkpoint_924/grpo.jsonl` | 3,698 | GRPO prompt-only 数据 |
### 数据格式
#### SFT
每行包含一个 `messages` 数组,由 `system``user``assistant` 三条消息组成。assistant
回复包含任务分析与结构化 JSON 结果。
```json
{
"messages": [
{"role": "system", "content": "..."},
{"role": "user", "content": "..."},
{"role": "assistant", "content": "..."}
]
}
```
#### DPO
`messages` 中的 assistant 回复作为 chosen,`rejected_response` 保存低质量拒绝答案。两者
均包含任务分析和结构化结果。
```json
{
"messages": [
{"role": "system", "content": "..."},
{"role": "user", "content": "..."},
{"role": "assistant", "content": "..."}
],
"rejected_response": "..."
}
```
#### GRPO
每行只保留 `system``user` 消息。模型在训练时生成 completion,奖励由外部 Reward
函数计算。
```json
{
"messages": [
{"role": "system", "content": "..."},
{"role": "user", "content": "..."}
]
}
```
### 加载方式
```python
from datasets import load_dataset
sft = load_dataset("xinyuran/RLRefine-Dataset", "sft", split="train")
dpo = load_dataset("xinyuran/RLRefine-Dataset", "dpo", split="train")
grpo = load_dataset("xinyuran/RLRefine-Dataset", "grpo", split="train")
```
### 文件校验
| 文件 | SHA256 |
|---|---|
| `sft.jsonl` | `5c12f7ae57cef0939c4b427525d5466e7226b63fbe52d988955ec772ba63f15d` |
| `dpo.jsonl` | `8918ead692a6c9e5bb74b4a167aa19c1284943955c4e72ca19e81d508a52e2dc` |
| `grpo.jsonl` | `9f27d40861ca65a279a2c1c04a23f3bae041c4127797b0050c333edd7cb4078d` |
### 使用边界
- 数据聚焦中文电商评论关键词抽取,未验证其他领域或语言的效果。
- 数据与回复均为合成内容,可能包含重复 Prompt、不一致解释或其他生成误差。
- SFT、DPO 和 GRPO 数据复用相同或高度重叠的输入,不能互相作为独立测试集。
- 数据包含较长的任务分析文本,使用者应根据自己的模型模板与上下文预算决定是否保留。
- 本数据集不代表真实用户流量、真实客户需求或生产环境分布。
## English
RLRefine Dataset is a synthetic post-training dataset for structured keyword
extraction from Chinese e-commerce reviews. An LLM-assisted synthesis pipeline
derives SFT, DPO, and GRPO training formats from a shared set of task prompts.
The repository preserves the data representations used in the RLRefine
`checkpoint-924` post-training pipeline. Files retain the original training
distribution without deduplication, reordering, or regeneration and must not be
treated as independent evaluation sets.
### Configurations
| Config | File | Rows | Purpose |
|---|---|---:|---|
| `sft` | `data/checkpoint_924/sft.jsonl` | 3,696 | Supervised fine-tuning demonstrations |
| `dpo` | `data/checkpoint_924/dpo.jsonl` | 3,696 | Chosen/rejected preference pairs |
| `grpo` | `data/checkpoint_924/grpo.jsonl` | 3,698 | Prompt-only GRPO data |
The `sft` config stores system, user, and assistant messages. In `dpo`, the
assistant message is the chosen response and `rejected_response` contains the
rejected answer. The `grpo` config stores system and user messages only; an
external reward function scores generated completions during training.
Load an individual configuration with:
```python
from datasets import load_dataset
dataset = load_dataset("xinyuran/RLRefine-Dataset", "sft", split="train")
```
### Limitations
- The dataset focuses on Chinese e-commerce review keyword extraction; other
domains and languages have not been validated.
- Reviews and responses are synthetic and may contain duplicate prompts,
inconsistent rationales, or other generation artifacts.
- SFT, DPO, and GRPO reuse the same or substantially overlapping inputs and
cannot serve as independent evaluation sets for one another.
- Responses may contain long task-analysis text. Users should decide whether to
retain it based on their model template and context budget.
- The dataset does not represent real user traffic, customer requirements, or a
production distribution.
## License
Released under the [MIT License](LICENSE). The license applies only to material
for which the dataset publisher has the right to grant permission and does not
supersede applicable law or third-party terms.