--- 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: + 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)