File size: 3,275 Bytes
76b61ae | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | ---
license: cc-by-4.0
task_categories:
- text-generation
language:
- en
tags:
- code
- rlvr
- reinforcement-learning
- mbpp
- verl
size_categories:
- n<1K
configs:
- config_name: default
data_files:
- split: train
path: data/train.parquet
- split: test
path: data/test.parquet
- split: heldout_mbpp_test
path: data/heldout_mbpp_test.parquet
---
# MBPP for code RL (deduplicated against MBPP+)
MBPP prepared for RLVR training in [verl](https://github.com/volcengine/verl),
with **two independent hold-outs** so both MBPP+ and MBPP's own canonical test
split stay reportable after training on this data.
| split | rows | contents |
|---|---|---|
| `train` | 320 | MBPP canonical train + validation + prompt, minus everything in MBPP+ |
| `test` | 378 | exactly the problems in [`evalplus/mbppplus`](https://huggingface.co/datasets/evalplus/mbppplus) |
| `heldout_mbpp_test` | 276 | MBPP's canonical test split (task_id 11-510) that is *not* in MBPP+ |
## Why 320 and not 974
MBPP `full` is 974 problems across four canonical splits (prompt 10, test 500,
validation 90, train 374). Two things are removed from the training pool:
1. **Everything in MBPP+** (378 problems). MBPP+ is derived from MBPP-sanitized
and consumes 378 of that config's 427 problems.
2. **MBPP's canonical test split.** Deduplicating against MBPP+ alone would
leave 596 training problems, but 276 of those are canonical MBPP test — fine
if MBPP+ is your only benchmark, fatal if you ever want standard MBPP numbers.
Deduplicating MBPP-**sanitized** against MBPP+ leaves only **49** problems,
which is why the sanitized config alone is not viable for training. Each problem
here uses its *sanitized* text and corrected tests where one exists (427 of 974
do) while keeping the other 547 — sanitized quality at usable size.
Leakage is asserted at build time: no train `task_id` appears in MBPP+, and no
train row comes from a withheld split.
## Format
verl RLHF layout: `data_source`, `prompt`, `ability`, `reward_model`, `extra_info`.
`reward_model.ground_truth` is a **JSON string**:
```json
{"assert_case": ["assert floor_Min(10,20,30) == 15", "..."]}
```
The verifier dispatches on the *keys* of that dict, so one reward path handles
MBPP asserts and competitive-programming stdin/stdout with no dataset-specific
routing. Setup imports (`test_setup_code` / `test_imports`) are folded into each
assert string, because every test runs as a standalone script:
`solution + "\n" + assert_case[i]`.
The prompt is a two-turn chat whose system message matches the math/kk runs of
the same study, so prompt format is not a confound across tasks:
```
system: Please reason step by step and put your final solution in a single ```python code block.
user: <task> + half the tests as an interface hint + fenced-block instruction
```
Half the tests (`floor(N/2)`) are shown so the model can infer the function name
and signature; **all** tests are used for reward.
## Validation
All 974 MBPP reference solutions score 1.0 through the verifier.
## Sources
- [`google-research-datasets/mbpp`](https://huggingface.co/datasets/google-research-datasets/mbpp) (configs `full` and `sanitized`)
- [`evalplus/mbppplus`](https://huggingface.co/datasets/evalplus/mbppplus)
|