--- license: other language: - en tags: - midtraining - code - agentic - software-engineering - multi-agent task_categories: - text-generation configs: - config_name: default data_files: - split: train path: data/train-* dataset_info: features: - name: text dtype: string - name: source dtype: string splits: - name: train num_bytes: 1610042422 num_examples: 727337 download_size: 806246956 dataset_size: 1610042422 --- # CooperData v3 — Midtraining Blend (Qwen3.5-9B cooperative SWE agents) All-token **midtraining** mixture that bridges `Qwen/Qwen3.5-9B` (instruct) toward the cooperative multi-agent SWE-coding SFT distribution. **One document per row** (`text`, tagged by `source`) — NOT packed — so `trl.SFTTrainer(packing=False)` tokenizes per-doc and the Gated-DeltaNet recurrence stays per-document. **~390M tokens.** ## Composition | source | tokens | share | |---|---|---| | `web` | 210.0M | 54% | | `math` | 55.0M | 14% | | `instruct` | 25.0M | 6% | | `coop` | 80.0M | 21% | | `agentic` | 20.0M | 5% | - **General (~81%)** — anti-forgetting bulk + the distant domains (code/math) midtraining helps most: `web`/`math`/`instruct` = [allenai/dolmino-mix-1124](https://huggingface.co/datasets/allenai/dolmino-mix-1124) (`dclm`/`math`/`flan`), OLMo-2's curated midtraining mix. - **Bridge (~19%, coop-dominant)** — agentic data resembling the SFT target: - `coop`: our cooperative multi-agent SWE trajectories (mini-swe-agent, **structured tool-calling**), rendered with the model's **real** chat template → native ``/`` (matches the `qwen3_coder` serving parser). This also carries the "good collaborator" signal — the agents coordinate as colleagues on a shared codebase. - `agentic`: [ricdomolm/mini-coder-trajs-400k](https://huggingface.co/datasets/ricdomolm/mini-coder-trajs-400k), verified rollouts (bash-in-content style — midtrain *exposure* only; the SFT stage uses coop tool-calling exclusively). ## Methodology Grounded in ["Midtraining Bridges Pretraining and Posttraining Distributions" (2510.14865)](https://arxiv.org/abs/2510.14865): because specialized data is introduced *late* (a finished instruct model), the conservative-weight finding (high specialized weight late → catastrophic forgetting) dictates a **general-dominant** mix (~81% general / ~19% bridge). Heavy agentic specialization is left to SFT. ## Loss / usage All-token (full LM loss), `packing=False`: ```python from trl import SFTTrainer, SFTConfig from datasets import load_dataset ds = load_dataset("CooperBench/cooperdata-v3-midtrain-blend", split="train") SFTTrainer(model="Qwen/Qwen3.5-9B", train_dataset=ds, args=SFTConfig(dataset_text_field="text", packing=False, max_length=8192)) ``` Inherits the licenses of its constituent datasets.