遇见数据集

nemotron-nano-rl-code-19k

收藏
魔搭社区2026-08-16 更新2026-08-16 收录
官方服务:

资源简介:

# Nemotron Nano RL Code 19K ## Dataset summary Nemotron Nano RL Code 19K is a Python-only competitive-programming dataset for reinforcement learning from verifiable rewards (RLVR). Each row contains a single user prompt, an empty `label`, unit-test inputs and expected outputs for automatic verification, source metadata, and an upstream profiling `pass_rate`. This repository packages the code records associated with NVIDIA's [Nemotron-3-Nano-RL-Training-Blend](https://huggingface.co/datasets/nvidia/Nemotron-3-Nano-RL-Training-Blend). The blend identifies [nvidia/Nemotron-RL-coding-competitive_coding](https://huggingface.co/datasets/nvidia/Nemotron-RL-coding-competitive_coding) as its competitive-coding component and states that `tacos` and `apps` samples are excluded. The local records use the dataset identifier `nano_v3_sft_profiled_comp_coding_50tests`. All 19,169 prompts explicitly request Python and require the final solution in a fenced `python` code block. Reference solutions are not included; correctness is intended to be determined by executing the candidate program against the provided input/output tests. ## Data structure Each JSONL record has the following shape: ```text prompt: list[{ role: "user", content: string }] label: string # empty in every row metadata: { data_type: "nemotron_code", num_tokens: int, verifier_metadata: { unit_tests: { inputs: list[string], outputs: list[string] } }, hash_id: string, dataset: "nano_v3_sft_profiled_comp_coding_50tests", source: string, agent_ref: { type: "responses_api_agents", name: "code_gen_simple_agent" }, pass_rate: float } ``` `inputs[i]` is paired with `outputs[i]`. The verifier should run a candidate solution with the input string on standard input and compare its standard output with the corresponding expected-output string using the evaluator's chosen normalization rules. `num_tokens` is upstream metadata. The tokenizer used to produce it is not identified in this file. `pass_rate` is also upstream profiling metadata; the observed values lie on a grid from 0.000 through 0.875 in steps of 0.125. The exact generation and evaluator configuration used to calculate it is not encoded in the records. ## Dataset statistics ### Records and duplicates | Statistic | Value | |---|---:| | Rows | 19,169 | | Unique `hash_id` values | 10,688 | | Unique prompts | 10,688 | | Unique complete rows | 10,688 | | Extra exact-duplicate rows | 8,481 (44.24% of all rows) | | Unique rows occurring once | 2,207 | | Unique rows occurring twice | 8,481 | Every repeated `hash_id` corresponds to an exact duplicate of the entire JSONL record, and no record occurs more than twice. Duplicates are intentionally preserved from the supplied file. They change sampling weights: deduplicate by `hash_id` if that weighting is not desired, and group by `hash_id` before creating train/evaluation splits to avoid leakage. ### Source distribution | `metadata.source` | Rows | Share | |---|---:|---:| | `codeforces` | 15,105 | 78.80% | | `aizu` | 1,985 | 10.36% | | `atcoder` | 1,036 | 5.40% | | `hackerearth` | 575 | 3.00% | | `codechef` | 468 | 2.44% | The upstream component card says its questions and tests are collected from [DeepMind CodeContests](https://huggingface.co/datasets/deepmind/code_contests) and [Open-R1 Codeforces](https://huggingface.co/datasets/open-r1/codeforces). The `source` value in this release is a platform-level label, not a stable URL or original problem identifier. ### Unit tests | Statistic | Value | |---|---:| | Total input/output pairs | 573,839 | | Tests per row, minimum | 1 | | Tests per row, median | 40 | | Tests per row, mean | 29.94 | | Tests per row, maximum | 50 | | Rows with exactly 50 tests | 8,862 (46.23%) | | Rows with mismatched input/output counts | 0 | | Non-string test values | 0 | Some test payloads are unusually large. The largest row contains approximately 4.74 million input characters and 310.02 million expected-output characters across its tests. Stream the dataset and enforce resource limits when loading or evaluating it. ### Prompt and profiling metadata | Statistic | `prompt[0].content` characters | `metadata.num_tokens` | `metadata.pass_rate` | |---|---:|---:|---:| | Minimum | 314 | 78 | 0.000 | | Median | 2,237 | 651 | 0.125 | | Mean | 2,348.13 | 695.10 | 0.3095 | | 95th percentile | 4,000.6 | 1,217 | 0.875 | | Maximum | 10,808 | 6,204 | 0.875 | Pass-rate distribution: | `pass_rate` | Rows | Share | |---:|---:|---:| | 0.000 | 7,702 | 40.18% | | 0.125 | 1,936 | 10.10% | | 0.250 | 1,494 | 7.79% | | 0.375 | 1,374 | 7.17% | | 0.500 | 1,288 | 6.72% | | 0.625 | 1,350 | 7.04% | | 0.750 | 1,666 | 8.69% | | 0.875 | 2,359 | 12.31% | The upstream blend describes `pass_rate` as a curriculum signal, with higher-pass-rate samples treated as easier. Do not assume that the current JSONL row order is sorted by difficulty. ## Loading the dataset Load the dataset directly with ModelScope: ```python from modelscope.msdatasets import MsDataset dataset = MsDataset.load( "wflying000/nemotron-nano-rl-code-19k", subset_name="default", split="train", ) first = dataset[0] print(first["metadata"]["source"]) ``` For duplicate-aware splitting: ```python group_id = row["metadata"]["hash_id"] ``` Assign every row with the same `group_id` to the same split. ## Intended uses - RLVR or other execution-based post-training for Python code generation. - Training or evaluating unit-test verifiers and code-generation agents. - Difficulty-aware sampling using the supplied profiling metadata. - Research on competitive-programming problem solving. ## Limitations and safety - There is only a `train` split; no independent validation or test split is provided. - `label` is empty for every record, so the dataset does not provide reference solutions or chain-of-thought targets. - The unit tests may be incomplete and should not be treated as proofs of program correctness. - Exact duplicates materially affect sampling frequency and can leak across naïvely constructed splits. - The dataset is heavily concentrated on `codeforces` and may not represent general software engineering. - Prompts require Python only; results should not be generalized to other languages without evaluation. - The provenance fields do not contain stable original-problem URLs, and this repackaging has not independently audited problem-level rights, personal information, or benchmark contamination. - Candidate programs are untrusted code. Execute them only in an isolated sandbox with network access disabled and strict time, memory, output, process, and filesystem limits. Test inputs and expected outputs should also be treated as untrusted data. ## Licensing and attribution The machine-readable license for the immediate [Nemotron-3-Nano-RL-Training-Blend](https://huggingface.co/datasets/nvidia/Nemotron-3-Nano-RL-Training-Blend) is the ODC Attribution License (`odc-by`), which is reflected in this repository's metadata. There is an upstream inconsistency that downstream users should review: the machine-readable metadata for [nvidia/Nemotron-RL-coding-competitive_coding](https://huggingface.co/datasets/nvidia/Nemotron-RL-coding-competitive_coding) currently declares `cc-by-sa-4.0`, while that component card's prose names CC BY 4.0. Source datasets and individual problems may impose additional attribution or share-alike requirements. This card does not resolve those differences and is not legal advice. Before redistribution or commercial use, review the current upstream cards and the terms of the original sources. Please attribute NVIDIA and the original component datasets, and cite [NVIDIA NeMo Gym](https://github.com/NVIDIA-NeMo/Gym) where appropriate. ## Changes in this release - Repackaged the supplied code subset as one JSONL training split. - Preserved prompts, labels, metadata, test cases, ordering, and exact duplicates without content modification. - Added this Dataset Card with file-integrity, schema, source, test-count, pass-rate, and duplicate statistics.

提供机构:
maas
创建时间:
2026-08-12
二维码
社区交流群
二维码
科研交流群
商业服务