FinalMix3 / README.md
wetsoledrysoul's picture
Add files using upload-large-folder tool
45addd4 verified
|
Raw
History Blame Contribute Delete
7.69 kB
---
configs:
- config_name: default
data_files:
- split: train_no_aux
path: data/train_no_aux-*
- split: train_aux_cascade
path: data/train_aux_cascade-*
- split: train_aux_multitask
path: data/train_aux_multitask-*
- split: test
path: data/test-*
- split: validation
path: data/validation-*
pretty_name: FinalMix3
license: other
language:
- en
task_categories:
- text-generation
tags:
- code
- code-generation
- code-reasoning
- reinforcement-learning
- verl
size_categories:
- 10K<n<100K
---
# FinalMix3
A multi-task **code reinforcement-learning** mixture in the
[`verl`](https://github.com/volcengine/verl) RL prompt format: one code-generation
split plus a suite of auxiliary code-understanding tasks, so the same corpus drives
three training regimes.
It is [`OctoReasoner/FinalMix2`](https://huggingface.co/datasets/OctoReasoner/FinalMix2)
with three changes: every row now carries **one uniform prompt format**, the auxiliary
mix is **rebalanced by ability**, and four defects where a prompt contradicted the
grader that scores it are **repaired**. The rows themselves are otherwise the same
problems, with the same rule-verifiable rewards.
## Splits
| Split | Rows | Contents | Use |
|-------|-----:|----------|-----|
| `train_no_aux` | 9,693 | code generation only (9,693 rows) | RL on code generation alone |
| `train_aux_cascade` | 25,318 | all 15,625 auxiliary rows first, then the 9,693 code rows | cascade / curriculum RL (aux → code) |
| `train_aux_multitask` | 25,318 | the same rows, interleaved | mixed multi-task RL |
| `validation` | 481 | held-out code-generation problems | held-out code generation, for in-training validation |
| `test` | 175 | LiveCodeBench-v6 problems | LiveCodeBench-v6, repaired (see below) |
## Prompt format
Every row — code generation and auxiliary alike — is exactly two turns: a system turn
that is byte-identical across the whole dataset, and a user turn that opens with an
`[INSTRUCTION]` block naming the task and its answer format, and closes with a one-line
reminder of that format.
```
system: You are an expert coding professional. You are given a self-contained
code-related task instruction, ... Failure to follow this format will result
in immediate task failure. Do not output any other text after your final answer.
user: [INSTRUCTION]
Predict the big-O time complexity of the code below.
Reply in the format \boxed{X}, where X is the complexity in standard big-O
notation, e.g. \boxed{O(1)}, \boxed{O(n)}, ... Write exponents as **.
[/INSTRUCTION]
[CODE] ... [/CODE]
Remember to reply with your answer within \boxed{...}. Any other format will
be immediately rejected.
```
This replaces FinalMix2's 25 per-family system prompts and its two rival code-fencing
conventions. Answers are extracted last-wins (the last fenced python block, the last
`\boxed{...}`, or a JSON object with the named key), so reasoning before the answer is
free. The reminder's wording follows how each row is *graded*, not how it looks.
## Auxiliary tasks
15,625 rows across 24 abilities. FinalMix2 budgeted its auxiliary mix per
*source family* (14 of them) while `ability` (24 values) was never a stratification key,
so rare abilities inside large families were crushed — `code_io_output_from_input_mcq`
held **4 rows**. FinalMix3 rebalances with a floor of 400 and a cap of 1,200 per ability:
short abilities are topped back up from
[`OctoReasoner/CodeAuxTasks`](https://huggingface.co/datasets/OctoReasoner/CodeAuxTasks)
(candidates must clear the same length, language and near-duplicate gates the mix used),
and over-cap abilities are trimmed keeping the most distinctive rows. The spread across
abilities falls from 549x to 5.6x.
| ability | rows |
|---------|-----:|
| `code_io_input_from_output_mcq` | 1,200 |
| `code_from_space_complexity_mcq` | 1,200 |
| `coderpile_retrieval` | 1,200 |
| `pick_codes_similar_to_reference` | 1,200 |
| `predict_cwe_from_code_mcq` | 1,020 |
| `code_change_localization` | 836 |
| `code_from_time_complexity_mcq` | 829 |
| `code_cputime_ranking` | 817 |
| `variable_output_tracing` | 735 |
| `code_io_output_from_input_direct` | 707 |
| `code_memory_ranking` | 593 |
| `code_compile_status_prediction` | 583 |
| `localize_callable_from_cwe_mcq` | 552 |
| `localize_callable_from_cwe_direct` | 498 |
| `predict_cwe_from_code_catalog` | 400 |
| `code_io_input_output_pairs_mcq` | 400 |
| `time_complexity_from_code_mcq` | 400 |
| `code_io_input_from_output_direct` | 400 |
| `time_complexity_from_code_direct` | 400 |
| `space_complexity_from_code_mcq` | 400 |
| `space_complexity_from_code_direct` | 400 |
| `code_verifiable_instruction_following_generation` | 387 |
| `code_io_output_from_input_mcq` | 252 |
| `code_verifiable_instruction_following_edit` | 216 |
## Code split
| Source | Rows | Share |
|--------|-----:|------:|
| `code_primeintellect` | 5,241 | 54.1% |
| `code_contests_o` | 2,538 | 26.2% |
| `code_taco` | 1,721 | 17.8% |
| `code_lcbv5` | 193 | 2.0% |
## Repairs carried over FinalMix2
Each of these is a case where the shipped prompt or ground truth contradicted the grader,
so a correct answer could not score:
1. **`pick_codes_similar_to_reference`** asked for a *clustering* (`\boxed{(1, 2, 4), (3)}`)
while the gold is the flat list of positions equivalent to the reference and the scorer
compares the set of integers in the answer — obeying the prompt scored 0.
2. **`predict_cwe_from_code_mcq`** capped answers at option `E` while every row offers six
options; `F` was the single most common gold answer.
3. **Multi-letter CWE answers** are compared by string equality, so the required
alphabetical ordering is stated again (it had been dropped in an earlier rewrite).
4. **LiveCodeBench-v6 (`test`)**: 63 of 175 rows are functional problems whose ground truth
carried no `fn_name`, so the checker graded them as stdin/stdout and the `class Solution`
answer the prompt asks for scored 0 on every case. `fn_name` is now set from the starter
signature and the expected outputs are canonicalised to what the fn-call harness prints.
Scored end to end through the real reward path: 0/63 before, 63/63 after.
One row (`vartrace_2327`) was dropped: it asks for the final value of a variable it never
names, and unlike the 16 similar rows it cannot be reconstructed.
## Schema
Unchanged from FinalMix2:
| Field | Type | Notes |
|-------|------|-------|
| `data_source` | string | routes the reward function |
| `prompt` | list of `{role, content}` | system + user, as above |
| `ability` | string | task category |
| `reward_model` | struct `{style, extraction_method, ground_truth, key}` | scoring spec |
| `extra_info` | struct `{id, lower_pass_rate, upper_pass_rate}` | per-example metadata |
Code-generation rows are scored by executing the model's program against hidden tests in a
sandbox; auxiliary rows by rule-based extraction against `ground_truth`.
## Reproduction
```bash
python tasks/stratify_aux.py --src FinalMix2/data --out FinalMix2-strat/data \
--floor 400 --cap 1200
python tasks/unify_prompts.py --src FinalMix2-strat/data --out FinalMix3/data
python tasks/verify_unified_prompts.py --src FinalMix2-strat/data --out FinalMix3/data
```
The verifier checks every row: two turns with the byte-identical system prompt, one
`[INSTRUCTION]` block carrying the ability's defined text, a reminder matching how the row
is graded, the task content preserved verbatim from FinalMix2, and `data_source` /
`ability` / `reward_model` / `extra_info` and row order otherwise untouched.