--- license: mit language: - en tags: - math - reasoning - verl - reinforcement-learning - math-reasoning size_categories: - 10K ![Dataset](https://img.shields.io/badge/Dataset-95496_samples-blue) ![Size](https://img.shields.io/badge/Size-10.5_MB-green) ![Format](https://img.shields.io/badge/Format-VERL-orange) ![License](https://img.shields.io/badge/License-mit-red) ## 📊 Dataset Summary This dataset contains 95,496 mathematical reasoning problems in VERL format, processed from zwhe99/DeepMath-103K. **Key Features:** - **95,496 high-quality math problems** - Converted to VERL format for reward modeling - Verified ground truth answers - Ready for reinforcement learning training --- ## 🔗 Source Dataset ### Original Repository - **Repository**: [zwhe99/DeepMath-103K](https://huggingface.co/datasets/zwhe99/DeepMath-103K) - **License**: MIT - **Paper**: [DeepMath: Deep Learning for Mathematical Reasoning](https://arxiv.org/abs/2504.11456) - **Authors**: Zhenwen He et al. ### Dataset Description DeepMath-103K is a curated collection of 103,000 mathematical problems covering various difficulty levels and mathematical domains. The dataset emphasizes step-by-step reasoning and verification. --- ## 🔄 Preprocessing Pipeline This dataset has been preprocessed and converted to the VERL (Verification and Reinforcement Learning) format for use in mathematical reasoning tasks with reward modeling. ### Cleaning Methodology **Standard Processing:** - URL filtering (samples containing URLs removed) - Format normalization to VERL schema - Basic text cleaning and validation ### Deduplication **Intra-dataset Deduplication:** - **Method**: SHA-256 hash-based with text normalization - **Before deduplication**: 103,000 samples - **After deduplication**: 95,496 samples - **Reduction**: 7.3% **Inter-dataset Deduplication** (v3.0): - **Priority level**: 4 - **Cross-dataset duplicates removed**: 5,000 --- ## 💡 Preprocessing Examples ### Example 1: Standard Processing (No Cleaning Preset) **Before Cleaning:** ``` Calculate the derivative of $f(x) = x^2 + 3x + 2$ with respect to $x$. ``` **After Cleaning:** ``` Calculate the derivative of $f(x) = x^2 + 3x + 2$ with respect to $x$. ``` **Changes Applied:** - ✓ Format normalization to VERL schema - ✓ URL filtering (samples with URLs removed) - ✓ Basic text validation - ✓ No artifact removal applied --- ## 📐 VERL Schema This dataset follows the standardized VERL (Verification and Reinforcement Learning) format: ```json { "data_source": "openai/gsm8k", "prompt": [ { "content": "Calculate the sum of all odd numbers from 1 to 99.", "role": "user" } ], "ability": "math", "reward_model": { "style": "rule", "ground_truth": "\boxed{2500}", "hash": "sha256:abc123..." }, "extra_info": { "split": "train" } } ``` ### Field Descriptions | Field | Type | Description | |-------|------|-------------| | `data_source` | `string` | Original dataset identifier (e.g., `openai/gsm8k`, `numina_aime`) | | `prompt` | `list[dict]` | User query in chat format with role and content | | `ability` | `string` | Task type (always `"math"` for this dataset) | | `reward_model.style` | `string` | Reward computation method (`"rule"` for rule-based verification) | | `reward_model.ground_truth` | `string` | Expected answer for verification (often in `\boxed{}` format) | | `reward_model.hash` | `string` | SHA-256 hash of prompt content for deduplication | | `extra_info.split` | `string` | Original split identifier (`"train"`, `"test"`, etc.) | --- ## 📈 Dataset Statistics ### Sample Distribution - **Total Samples**: 95,496 - **Dataset Size**: 10.5 MB - **Average Problem Length**: N/A characters ### Data Sources Distribution of problems by original data source: | Source | Count | Percentage | |--------|-------|------------| | Mixed Sources | 95,496 | 100% | *Note: Detailed source distribution statistics will be added in future updates.* --- ## 🚀 Usage ### Loading the Dataset ```python from datasets import load_dataset # Load the full dataset dataset = load_dataset("sungyub/deepmath-103k-verl") # Load with streaming (recommended for large datasets) dataset = load_dataset("sungyub/deepmath-103k-verl", streaming=True) # Preview first few examples for example in dataset['train'].take(5): print(example['prompt'][0]['content']) # User question print(example['reward_model']['ground_truth']) # Answer print("---") ``` ### Using with VERL ```python from datatrove.utils.reward_score import compute_score # Compute reward score for a generated solution score = compute_score( data_source=example['data_source'], solution_str=generated_solution, ground_truth=example['reward_model']['ground_truth'], format_type="auto" # Auto-detect XML or GPT OSS format ) print(f"Reward score: {score}") ``` ### Integration with DataTrove ```python from datatrove.pipeline.readers import ParquetReader from datatrove.pipeline.filters import LambdaFilter from datatrove.executor import LocalPipelineExecutor pipeline = [ ParquetReader("sungyub/deepmath-103k-verl", text_key="prompt"), LambdaFilter(lambda doc: len(doc.text) > 100), # Filter short problems # Add more processing steps... ] executor = LocalPipelineExecutor(pipeline=pipeline, tasks=4) executor.run() ``` --- ## 📚 Citation ### Original Dataset ```bibtex @article{he2025deepmath, title = {DeepMath: Deep Learning for Mathematical Reasoning}, author = {He, Zhenwen and others}, journal = {arXiv preprint arXiv:2504.11456}, year = {2025}, url = {https://arxiv.org/abs/2504.11456} } ``` ### This Processed Version ```bibtex @dataset{sungyub_math_verl_deepmath-103k-verl, author = {Sungyub Kim}, title = DeepMath-103K VERL, year = {2025}, publisher = {Hugging Face}, howpublished = {\url{https://huggingface.co/datasets/sungyub/deepmath-103k-verl}} } ``` --- ## ⚖️ License - **This processed dataset**: mit - **Original dataset**: MIT --- ## 🙏 Acknowledgments This dataset was processed using the [DataTrove](https://github.com/huggingface/datatrove) library. **Credits:** - Original dataset authors: Zhenwen He et al. - Processing and VERL conversion: Sungyub Kim - MathDatasetCleaner implementation: DataTrove contributors **Special thanks to:** Zhenwen He and collaborators for the DeepMath dataset --- ## 📝 Version History ### v1.0.0 (Initial Release) - Processed 95,496 samples from zwhe99/DeepMath-103K - Converted to VERL format - Standard processing applied - Ready for reinforcement learning training --- ## 🔗 Related Resources - **Unified Collection**: [sungyub/math-verl-unified](https://huggingface.co/datasets/sungyub/math-verl-unified) - All 9 math datasets with inter-dataset deduplication - **DataTrove Documentation**: [https://github.com/huggingface/datatrove](https://github.com/huggingface/datatrove) - **VERL Format Specification**: See VERL Schema section above ---
**Questions or issues?** Open an issue on the [DataTrove GitHub repository](https://github.com/huggingface/datatrove/issues)