license:cc-by-4.0 size_categories:n<1K format:parquet modality:tabular modality:text library:datasets library:pandas library:mlcroissant library:polars region:us
---
license: cc-by-4.0
dataset_info:
  features:
  - name: problem
    dtype: string
  - name: official_solution
    dtype: string
  - name: official_answer
    dtype: string
  - name: greedy_solution
    dtype: string
  - name: greedy_answer
    dtype: string
  - name: best_of_n_answer
    dtype: string
  - name: weighted_best_of_n_answer
    dtype: string
  - name: best_score
    dtype: float64
  - name: subject
    dtype: string
  - name: level
    dtype: int64
  - name: unique_id
    dtype: string
  splits:
  - name: train
    num_bytes: 42565
    num_examples: 20
  download_size: 39881
  dataset_size: 42565
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
---

# Best-of-N Math Solutions Dataset

This dataset is a collection of 20 math problems from the [MATH-500](https://huggingface.co/datasets/HuggingFaceH4/MATH-500) dataset at levels 1-3. For each problem, we provide:

- **Greedy solution**: A chain-of-thought solution generated by [`Qwen/Qwen2.5-1.5B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct) using **greedy decoding** (`temperature=0.0`).
- **Best-of-N solutions**: 16 sampled solutions scored by the [`Skywork/Skywork-o1-Open-PRM-Qwen-2.5-1.5B`](https://huggingface.co/Skywork/Skywork-o1-Open-PRM-Qwen-2.5-1.5B) **Process Reward Model** (PRM). We include:
  - The best single final-step solution (raw highest reward).
  - The “weighted best-of-N answer” by grouping solutions with the same final numeric answer and summing their reward model scores.

## Dataset Structure

Each row in the dataset has the following columns:

1. **problem**: The original math problem text from MATH-500.  
2. **official_solution**: The official solution from MATH-500.  
3. **official_answer**: The ground truth numeric answer.  
4. **greedy_solution**: The chain-of-thought for the greedy decoding.  
5. **greedy_answer**: The final numeric answer extracted from the greedy solution’s `\boxed{...}`.  
6. **best_of_n_answer**: The single solution that received the highest final-step reward.  
7. **weighted_best_of_n_answer**: The numeric answer selected by grouping identical final answers across the 16 solutions and summing their PRM scores.  
8. **best_score**: The reward score of the single best solution, after applying sigmoid.  
9. **subject**: The MATH-500 problem’s subject.  
10. **level**: The MATH-500 problem’s difficulty level (1,2,3).  
11. **unique_id**: The unique identifier from MATH-500.
