From caaa1b95a45f1f9b160eaaf9577bd0bea7560344 Mon Sep 17 00:00:00 2001 From: Brian Yu Date: Fri, 5 Sep 2025 12:35:36 -0700 Subject: [PATCH] copy over Signed-off-by: Brian Yu --- .../configs/bytedtsinghua_dapo17k.yaml | 38 ++++++++++++++++++ .../library_judge_math/configs/dapo17k.yaml | 39 +++++++++++++++++++ ...me24_bytedtsinghua_validation_metrics.json | 36 +++++++++++++++++ .../dapo17k_bytedtsinghua_train_metrics.json | 36 +++++++++++++++++ .../data/dapo17k_train_metrics.json | 36 +++++++++++++++++ .../prepare_bytedtsinghua_dapo17k_aime24.py | 37 ++++++++++++++++++ .../library_judge_math/prepare_dapo17k.py | 32 +++++++++++++++ 7 files changed, 254 insertions(+) create mode 100644 resources_servers/library_judge_math/configs/bytedtsinghua_dapo17k.yaml create mode 100644 resources_servers/library_judge_math/configs/dapo17k.yaml create mode 100644 resources_servers/library_judge_math/data/aime24_bytedtsinghua_validation_metrics.json create mode 100644 resources_servers/library_judge_math/data/dapo17k_bytedtsinghua_train_metrics.json create mode 100644 resources_servers/library_judge_math/data/dapo17k_train_metrics.json create mode 100644 resources_servers/library_judge_math/prepare_bytedtsinghua_dapo17k_aime24.py create mode 100644 resources_servers/library_judge_math/prepare_dapo17k.py diff --git a/resources_servers/library_judge_math/configs/bytedtsinghua_dapo17k.yaml b/resources_servers/library_judge_math/configs/bytedtsinghua_dapo17k.yaml new file mode 100644 index 0000000000..e7a01a9388 --- /dev/null +++ b/resources_servers/library_judge_math/configs/bytedtsinghua_dapo17k.yaml @@ -0,0 +1,38 @@ +library_judge_math: + resources_servers: + library_judge_math: + entrypoint: app.py + judge_model_server: + type: responses_api_models + name: ??? + judge_responses_create_params: { + input: [] + } + should_use_judge: false +library_judge_math_simple_agent: + responses_api_agents: + simple_agent: + entrypoint: app.py + resources_server: + type: resources_servers + name: library_judge_math + model_server: + type: responses_api_models + name: openai_model + datasets: + - name: train + type: train + jsonl_fpath: resources_servers/library_judge_math/data/dapo17k_bytedtsinghua_train.jsonl + gitlab_identifier: + dataset_name: bytedtsinghua_dapo17k + version: 0.0.1 + artifact_fpath: dapo17k_bytedtsinghua_train.jsonl + license: Apache 2.0 + - name: validation + type: validation + jsonl_fpath: resources_servers/library_judge_math/data/aime24_bytedtsinghua_validation.jsonl + gitlab_identifier: + dataset_name: bytedtsinghua_dapo17k + version: 0.0.1 + artifact_fpath: aime24_bytedtsinghua_validation.jsonl + license: Apache 2.0 diff --git a/resources_servers/library_judge_math/configs/dapo17k.yaml b/resources_servers/library_judge_math/configs/dapo17k.yaml new file mode 100644 index 0000000000..c917756bfb --- /dev/null +++ b/resources_servers/library_judge_math/configs/dapo17k.yaml @@ -0,0 +1,39 @@ +library_judge_math: + resources_servers: + library_judge_math: + entrypoint: app.py + judge_model_server: + type: responses_api_models + name: ??? + judge_responses_create_params: { + input: [] + } + should_use_judge: false +library_judge_math_simple_agent: + responses_api_agents: + simple_agent: + entrypoint: app.py + resources_server: + type: resources_servers + name: library_judge_math + model_server: + type: responses_api_models + name: openai_model + datasets: + - name: train + type: train + jsonl_fpath: resources_servers/library_judge_math/data/dapo17k_train.jsonl + # From YouJiacheng/DAPO-Math-17k-dedup + gitlab_identifier: + dataset_name: dapo17k + version: 0.0.1 + artifact_fpath: dapo17k_train.jsonl + license: Apache 2.0 + - name: validation + type: validation + jsonl_fpath: resources_servers/library_judge_math/data/aime24_validation.jsonl + gitlab_identifier: + dataset_name: aime24 + version: 0.0.1 + artifact_fpath: aime24.jsonl + license: Apache 2.0 diff --git a/resources_servers/library_judge_math/data/aime24_bytedtsinghua_validation_metrics.json b/resources_servers/library_judge_math/data/aime24_bytedtsinghua_validation_metrics.json new file mode 100644 index 0000000000..a19f9c3f73 --- /dev/null +++ b/resources_servers/library_judge_math/data/aime24_bytedtsinghua_validation_metrics.json @@ -0,0 +1,36 @@ +{ + "name": "validation", + "type": "validation", + "jsonl_fpath": "resources_servers/library_judge_math/data/aime24_bytedtsinghua_validation.jsonl", + "gitlab_identifier": { + "dataset_name": "bytedtsinghua_dapo17k", + "version": "0.0.1", + "artifact_fpath": "aime24_bytedtsinghua_validation.jsonl" + }, + "license": "Apache 2.0", + "Number of examples": 960, + "Number of tools": { + "Total # non-null values": 0, + "Average": 0.0, + "Min": 0.0, + "Max": 0.0 + }, + "Json-dumped number of words (proxy for token count)": { + "Total # non-null values": 960, + "Average": 93.16666666666667, + "Min": 56.0, + "Max": 132.0 + }, + "Number of turns": { + "Total # non-null values": 960, + "Average": 1.0, + "Min": 1.0, + "Max": 1.0 + }, + "Temperature": { + "Total # non-null values": 0, + "Average": 0.0, + "Min": 0.0, + "Max": 0.0 + } +} \ No newline at end of file diff --git a/resources_servers/library_judge_math/data/dapo17k_bytedtsinghua_train_metrics.json b/resources_servers/library_judge_math/data/dapo17k_bytedtsinghua_train_metrics.json new file mode 100644 index 0000000000..fee039d486 --- /dev/null +++ b/resources_servers/library_judge_math/data/dapo17k_bytedtsinghua_train_metrics.json @@ -0,0 +1,36 @@ +{ + "name": "train", + "type": "train", + "jsonl_fpath": "resources_servers/library_judge_math/data/dapo17k_bytedtsinghua_train.jsonl", + "gitlab_identifier": { + "dataset_name": "bytedtsinghua_dapo17k", + "version": "0.0.1", + "artifact_fpath": "dapo17k_bytedtsinghua_train.jsonl" + }, + "license": "Apache 2.0", + "Number of examples": 1791700, + "Number of tools": { + "Total # non-null values": 0, + "Average": 0.0, + "Min": 0.0, + "Max": 0.0 + }, + "Json-dumped number of words (proxy for token count)": { + "Total # non-null values": 1791700, + "Average": 82.37656973823742, + "Min": 42.0, + "Max": 319.0 + }, + "Number of turns": { + "Total # non-null values": 1791700, + "Average": 1.0, + "Min": 1.0, + "Max": 1.0 + }, + "Temperature": { + "Total # non-null values": 0, + "Average": 0.0, + "Min": 0.0, + "Max": 0.0 + } +} \ No newline at end of file diff --git a/resources_servers/library_judge_math/data/dapo17k_train_metrics.json b/resources_servers/library_judge_math/data/dapo17k_train_metrics.json new file mode 100644 index 0000000000..7f4e6b0f08 --- /dev/null +++ b/resources_servers/library_judge_math/data/dapo17k_train_metrics.json @@ -0,0 +1,36 @@ +{ + "name": "train", + "type": "train", + "jsonl_fpath": "resources_servers/library_judge_math/data/dapo17k_train.jsonl", + "gitlab_identifier": { + "dataset_name": "dapo17k", + "version": "0.0.1", + "artifact_fpath": "dapo17k_train.jsonl" + }, + "license": "Apache 2.0", + "Number of examples": 17398, + "Number of tools": { + "Total # non-null values": 0, + "Average": 0.0, + "Min": 0.0, + "Max": 0.0 + }, + "Json-dumped number of words (proxy for token count)": { + "Total # non-null values": 17398, + "Average": 85.63058972295666, + "Min": 45.0, + "Max": 322.0 + }, + "Number of turns": { + "Total # non-null values": 17398, + "Average": 1.0, + "Min": 1.0, + "Max": 1.0 + }, + "Temperature": { + "Total # non-null values": 0, + "Average": 0.0, + "Min": 0.0, + "Max": 0.0 + } +} \ No newline at end of file diff --git a/resources_servers/library_judge_math/prepare_bytedtsinghua_dapo17k_aime24.py b/resources_servers/library_judge_math/prepare_bytedtsinghua_dapo17k_aime24.py new file mode 100644 index 0000000000..5f77624b77 --- /dev/null +++ b/resources_servers/library_judge_math/prepare_bytedtsinghua_dapo17k_aime24.py @@ -0,0 +1,37 @@ +# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from typing import Any + +from datasets import load_dataset + + +def format_dapo(data: dict[str, str | float | int]) -> dict[str, list[Any] | str]: + return { + "responses_create_params": { + "input": data["prompt"][0]["content"], + }, + "question": data["prompt"][0]["content"], + "expected_answer": data["reward_model"]["ground_truth"], + } + + +train_ds = load_dataset("BytedTsinghua-SIA/DAPO-Math-17k", split="train") +val_ds = load_dataset("BytedTsinghua-SIA/AIME-2024", split="train") + +# Format the examples, removing original columns +train_formatted = train_ds.map(format_dapo, remove_columns=train_ds.column_names) +val_formatted = val_ds.map(format_dapo, remove_columns=val_ds.column_names) + +train_formatted.to_json("data/dapo17k_bytedtsinghua_train.jsonl") +val_formatted.to_json("data/aime24_bytedtsinghua_validation.jsonl") diff --git a/resources_servers/library_judge_math/prepare_dapo17k.py b/resources_servers/library_judge_math/prepare_dapo17k.py new file mode 100644 index 0000000000..90a86aa994 --- /dev/null +++ b/resources_servers/library_judge_math/prepare_dapo17k.py @@ -0,0 +1,32 @@ +# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import json + +from datasets import load_dataset + + +train_ds = load_dataset("YouJiacheng/DAPO-Math-17k-dedup", split="train") + +rows = [] +for example in train_ds: + row = { + "responses_create_params": {"input": example["prompt"]}, + "question": example["prompt"][0]["content"], + "expected_answer": example["reward_model"]["ground_truth"], + } + rows.append(json.dumps(row) + "\n") + + +with open("data/dapo17k_train.jsonl", "w") as f: + f.writelines(rows)