This dataset was converted from
https://github.com/openai/prm800k using the following script.
import json
import os
from datasets import Dataset, DatasetDict
def generate_data(data_path: str):
with open(data_path, "r", encoding="utf-8") as f:
for line in f:
data = json.loads(line)
yield {
"problem": data["problem"],
"answer": data["answer"],
}
def main():
trainset = Dataset.from_generator(generate_data… See the full description on the dataset page:
https://huggingface.co/datasets/yanzihan1/math12k.