---
title: MathR
canonical_url: "https://www.modelscope.cn/datasets/modelscope/MathR"
md_url: "https://www.modelscope.cn/datasets/modelscope/MathR.md"
repository: modelscope/MathR
last_updated: 2025-02-12
license: "Apache License 2.0"
storage_size: "117 MB"
domain:
  - text
tasks:
  - fill_mask
languages:
  - en
downloads: 1089
stars: 3
---

# MathR

> MathR - modelscope 在 ModelScope 开源的数据集。⚠️ 本数据集以及对应的评测效果，尚在完善中，当前进度请见介绍说明。敬请期待。 ⚠️ 同时也请关注我们的GitHub开源项目r-chain 的进展，欢迎Star🌟支持。

modelscope/MathR 是 ModelScope 魔搭社区上的fill_mask数据集，涉及 text 领域，存储大小 117 MB，采用 Apache License 2.0 许可。

- **Repository**: modelscope/MathR
- **License**: Apache License 2.0
- **Tasks**: fill_mask
- **Domain**: text
- **Storage size**: 117 MB
- **Downloads**: 1089
- **Stars**: 3
- **Last updated**: 2025-02-12

Source: https://www.modelscope.cn/datasets/modelscope/MathR

---

#### ⚠️ 本数据集以及对应的评测效果，尚在完善中，当前进度请见介绍说明。敬请期待。 ⚠️
同时也请关注我们的GitHub开源项目[r-chain](https://github.com/modelscope/r-chain.git) 的进展，欢迎Star🌟支持。

### Intro

受包括[DeepSeek-R1系列模型](https://pre.modelscope.cn/collections/DeepSeek-R1-c8e86ac66ed943)在内的推理模型启发，我们在 Math 任务上一步步复现了 DeepSeek-R1 蒸馏模型的过程。本数据集从 [NuminaMath-COT 数据集](https://www.modelscope.cn/datasets/AI-MO/NuminaMath-CoT)的数学问题出发，使用 R1 生成所有问题的 reasoning trace 和 answer， 并对生成的结果与 GroundTruth 进行对比与过滤。进一步，我们在 `Qwen2.5-7B-Instruct` 模型上验证了蒸馏数据的 SFT 效果。相关的数据、模型、数据生成代码、训练代码和评测代码完全开源在 [r-chain](https://github.com/modelscope/r-chain.git)。

#### 数据生成
所有数学问题来源于 [NuminaMath-COT](https://www.modelscope.cn/datasets/AI-MO/NuminaMath-CoT)，我们按照数据来源的难度从难到易顺序生成所有数据。

基于 [DeepSeek-R1](https://www.modelscope.cn/models/deepseek-ai/DeepSeek-R1) 生成的数据分布和进度：[MathR](https://modelscope.cn/datasets/modelscope/MathR)

| 数据来源       | 样本总量   | 生成进度 |
| -------------- | ---------- | ------- |
| aops_forum     | 30201      | ⏳        |
| amc_aime       | 4072       | ✅       |
| cn_k12         | 276591     | ⏳       |
| gsm8k          | 7345       | ⏳       |
| math           | 7478       | ⏳       |
| olympiads      | 150581     | ⏳       |
| orca_math      | 153334     | ⏳       |
| synthetic_amc  | 62111      | ⏳       |
| synthetic_math | 167895     | ⏳       |


基于 [DeepSeek-R1-Distill-Qwen-32B](https://www.modelscope.cn/models/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B) 生成的数据分布和进度：[MathR-32B-Distill](https://modelscope.cn/datasets/modelscope/MathR-32B-Distill)

| 数据来源       | 样本总量   | 生成进度 |
| -------------- | ---------- | -------- |
| aops_forum     | 30201      | ⏳        |
| amc_aime       | 4072       | ✅        |
| cn_k12         | 276591     | ⏳        |
| gsm8k          | 7345       | ⏳        |
| math           | 7478       | ⏳        |
| olympiads      | 150581     | ✅        |
| orca_math      | 153334     | ⏳        |
| synthetic_amc  | 62111      | ⏳        |
| synthetic_math | 167895     | ⏳        |


一共分成2个子数据集，subset_name分别是：default(原始数据集)、clean(过滤后)。
其中，clean数据集是在default数据集的基础上，根据match_score进行过滤，过滤条件是match_score大于0.8；


#### 字段解释

每条数据包含的字段包括：
- `id` (int): 唯一 id
- `source` (string): 原数据集NuminaMath的数据来源字段，如 `orca_math`、`synthetic_amc`、`synthetic_math` 等。
- `problem` (string): 数学问题
- `solution` (string): 参考答案
- `messages` (list): 与模型的对话信息，包括 `system`, `user` 和 `assistant` 对应的 `content`。
- `origin_messages` (list): `NuminaMath-COT`的原始对话信息，我们将其保留了下来。
- `model` (string): 蒸馏模型名称。
- `generation_config` (dict): 模型的生成配置。
- `usage` (dict): 模型调用信息，包括 token 总量等信息。
- `match_score` (float): 匹配分数，用于评估模型生成的答案与参考答案的匹配程度；目前版本默认使用rule-based方法进行匹配，后续版本增加基于judge-model的匹配方法。


#### 评测

使用[EvalScope](https://github.com/modelscope/evalscope)评测框架在数据[R1-Distill-Math-Test](https://modelscope.cn/datasets/modelscope/R1-Distill-Math-Test)上进行评测，点击[链接](https://modelscope.cn/datasets/modelscope/R1-Distill-Math-Test)可查看具体使用方法。
