| --- |
| license: apache-2.0 |
| language: |
| - en |
| pretty_name: OpenEuroLLM Code RLVR |
| task_categories: |
| - text-generation |
| tags: |
| - code |
| - reinforcement-learning |
| - rlvr |
| - synthetic |
| - verifiable |
| - open-r1 |
| - openeurollm |
| size_categories: |
| - 100K<n<1M |
| --- |
| |
| # OpenEuroLLM Code RLVR |
|
|
| `oellm-code-rlvr` is a deterministic corpus of 100,000 Python programming prompts for reinforcement learning with verifiable rewards. Every task uses standard input/output, includes two model-visible examples, and has 10–13 hidden tests in the Open R1 `verification_info` format. |
|
|
| The corpus is procedural and Apache-2.0 licensed. It does not copy Codeforces, LeetCode, LiveCodeBench, HumanEval, MBPP, APPS, or other benchmark text. |
|
|
| ## Design |
|
|
| The release follows these code-RLVR practices: |
|
|
| - executable, deterministic hidden tests and binary pass/fail rewards; |
| - model-visible examples separated from hidden reward cases; |
| - offline sandbox execution with explicit time and memory budgets; |
| - mutation testing to reject rows whose tests do not catch at least two of three family-specific faulty strategies; |
| - deterministic regeneration, stable content hashes, and train/validation/test assignment; |
| - balanced generator-family coverage and a broad initial difficulty distribution; |
| - benchmark isolation rather than training on common evaluation sets; |
| - source, license, generator, verifier, and contamination-group metadata on every row. |
|
|
| These choices are informed by [Open R1's executable code reward and dataset contract](https://github.com/huggingface/open-r1#%EF%B8%8F-training-with-a-code-interpreter), [DRIVE's code-RLVR curation and hard-focus curriculum](https://arxiv.org/abs/2511.06307), [LiveCodeBench's contamination-aware evaluation](https://arxiv.org/abs/2403.07974), and [OpenCodeReasoning's finding that instruction diversity must not be sacrificed during filtering](https://arxiv.org/abs/2504.01943). |
|
|
| ## Contents |
|
|
| The 12 equally represented families cover: |
|
|
| - array filtering, affine transforms, sliding windows, and frequency ranking; |
| - prefix sums and range queries; |
| - interval merging and sweep-line reasoning; |
| - indexed string transforms and overlapping pattern matching; |
| - grid neighbourhoods and weighted shortest paths; |
| - graph reachability with constraints; |
| - coin-change dynamic programming; |
| - transformed longest increasing subsequences. |
|
|
| Difficulty labels range from 1 to 5. They reflect generator structure and input bounds, not empirical model pass rates. |
|
|
| ## Loading |
|
|
| ```python |
| from datasets import load_dataset |
| |
| dataset = load_dataset("birgermoell/oellm-code-rlvr") |
| ``` |
|
|
| Only `messages` should be passed to the policy. `verification_info`, `ground_truth`, public/hidden tests, and `reference_solution` are trainer/verifier metadata and must not appear in the model context. |
|
|
| Open R1 consumes the nested verifier field directly: |
|
|
| ```python |
| row["verification_info"] == { |
| "language": "python", |
| "test_cases": [ |
| {"input": "...", "output": "...", "type": "stdin_stdout"}, |
| # additional hidden cases |
| ], |
| } |
| ``` |
|
|
| `ground_truth` contains the same hidden cases as canonical JSON for pipelines that expect a scalar ground-truth column. |
|
|
| ## Suggested rollout curriculum |
|
|
| 1. Begin with uniform sampling across families and approximately eight rollouts per prompt. |
| 2. Measure pass rates for the exact target checkpoint; discard always-solved and never-solved tasks from the main update stream while retaining them for diagnostics. |
| 3. Sample the learnable frontier heavily, while preserving family and difficulty coverage. |
| 4. Use a second hard-focus stage with more rollouts per prompt for difficult but occasionally solved tasks. |
| 5. Keep current LiveCodeBench, Codeforces weekly contests, HumanEval, MBPP, and any project evaluation set out of training and model-driven difficulty calibration. |
|
|
| The stored difficulty is only a prior. A model-specific rollout calibration table should be treated as the authoritative curriculum. |
|
|
| ## Verification and safety |
|
|
| Generated code is untrusted. Execute completions in an isolated sandbox with no network, a read-only base image, bounded CPU/RAM/process count/output, and a hard timeout. A normal wrong answer, syntax error, or failing test receives reward zero; sandbox launch failures, missing tests, timeout, and OOM should additionally be recorded as infrastructure/error categories. |
|
|
| The included reference programs are for reproducibility and verifier QA. They are not intended as policy inputs. |
|
|
| Rebuild and validate locally: |
|
|
| ```bash |
| python -m oellm_code_rlvr.generate --output release --rows 100000 |
| python -m oellm_code_rlvr.validate release --full --execute-modulus 1009 |
| ``` |
|
|
| ## Quality gates |
|
|
| For each release: |
|
|
| - all IDs and prompts are unique; |
| - every row regenerates byte-for-byte from its seed; |
| - every reference solution parses as Python; |
| - every test has normalized newline-terminated input and output; |
| - all family-specific mutation scores are at least 0.67; |
| - a deterministic execution sample runs the reference solution against every public and hidden test; |
| - Parquet file sizes, row counts, and SHA-256 hashes are recorded in `manifest.json`. |
|
|
| ## Limitations |
|
|
| This is a focused first release, not a complete coding curriculum. It contains Python/English stdin/stdout synthesis tasks rather than repository-level repair, API use, systems programming, proofs of correctness, or multilingual prompts. Procedural variants can share algorithmic structure even though their visible specifications and examples are unique. Hidden tests substantially improve reward quality but cannot prove program correctness. Empirical rollout calibration and adversarial test expansion remain necessary before a large training run. |
|
|
| ## Citation |
|
|
| ```bibtex |
| @dataset{oellm_code_rlvr_2026, |
| title = {OpenEuroLLM Code RLVR}, |
| author = {Moell, Birger}, |
| year = {2026}, |
| url = {https://huggingface.co/datasets/birgermoell/oellm-code-rlvr} |
| } |
| ``` |
|
|