cspd / README.md
namezz's picture
List seventeen single-expert prompts
7d43dcf verified
|
Raw History Blame Contribute Delete
5.11 kB
---
license: apache-2.0
pretty_name: CSPD soft prompts and training data
tags:
- soft-prompt
- distillation
- reinforcement-learning
- model-composition
---
# Composable Soft-Prompt Distillation: prompts and training data
Artifacts for [**Composable Soft-Prompt Distillation of RL Experts: Toward Continual Post-Training**](https://arxiv.org/abs/2611.27376).
[Paper (arXiv:2611.27376)](https://arxiv.org/abs/2611.27376) · [Code (GitHub)](https://github.com/UCSB-AI/CSPD)
## Contents
| Path | Description |
| --- | --- |
| `prompts/m2rl/{M,C,S,I}.pt` | The four 256 × 2,560 domain soft prompts (math, code, science, instruction following) on `Jackwang111/M2RL-SFT`, step 200. `torch.load(path)["prompt"]`. Composing them in the order MCSI gives the CSPD row of Table 2. |
| `data/m2rl/{math,code,science,if}/` | The packed teacher responses used to train these prompts: `tokens.uint32` (little-endian token stream), `index.json` (offset, length, prompt length, supervised tokens and soft-prompt position per response) and `manifest.json`. Responses come from the corresponding M2RL RL experts and are verified correct; math, science and IF keep one response per question, code up to two. |
| `prompts/single/<domain>/<name>.safetensors` | Single-expert prompts for seventeen Table 1 settings, at the checkpoint reported in the paper. Each file holds one 256 × hidden FP32 tensor: `safetensors.torch.load_file(path)`, key `prompt_embeddings` (`soft_prompt` for `agent/skyrl-agent-7b` and `agent/tmax-9b`). Math and code prompts have a matching config in `configs/<domain>/`; agent prompts are trained with `experiments/agents`. |
| `trajectories/<pair>/` | Prompt checkpoints every 20 updates for six single-expert pairs (`math-gptoss`, `math-mimo`, `math-poro`, `code-nemotron`, `code-mellum`, `code-areal8`), with `pair.json` and `steps.csv` (score per checkpoint), used by the mechanism analysis (`experiments/interp`). `code-areal8/lora/checkpoints/update-000164/` is the rank-1 LoRA of the speculative-decoding study. |
| Single-expert prompt | Config | Update | Recovery (Table 1) |
| --- | --- | ---: | ---: |
| `math/mimo-7b` | `configs/math/mimo-7b.yaml` | 140 | 90.15% |
| `math/poro-2-8b` | `configs/math/poro-2-8b.yaml` | 160 | 135.47% |
| `code/nemotron-cascade-8b` | `configs/code/nemotron-cascade-8b.yaml` | 184 | 101.21% |
| `code/mellum2-12b-a2p5b` | `configs/code/mellum2-12b-a2p5b.yaml` | 138 | 110.34% |
| `code/areal-boba2-8b` | `configs/code/areal-boba2-8b.yaml` | 164 | 120.83% |
| `math/qwen3-swallow-8b` | `configs/math/qwen3-swallow-8b.yaml` | 600 | 96.22% |
| `math/qwen3-swallow-30b-a3b` | `configs/math/qwen3-swallow-30b-a3b.yaml` | 500 | 99.79% |
| `math/eurus-2-7b` | `configs/math/eurus-2-7b.yaml` | 200 | 102.07% |
| `math/klear-reasoner-8b` | `configs/math/klear-reasoner-8b.yaml` | 80 | 139.02% |
| `code/mimo-7b` | `configs/code/mimo-7b.yaml` | 160 | 88.08% |
| `code/klear-reasoner-8b` | `configs/code/klear-reasoner-8b.yaml` | 208 | 101.83% |
| `code/areal-boba2-14b` | `configs/code/areal-boba2-14b.yaml` | 100 | 102.38% |
| `code/olmo3-7b` | `configs/code/olmo3-7b.yaml` | 180 | 143.44% |
| `agent/nemotron-cascade-8b-swe` | `experiments/agents/nemotron-swe` (SWE-bench Verified) | 140 | 92.27% |
| `agent/skyrl-agent-7b` | `experiments/agents/multiturn` (SWE-bench Verified) | 70 | 157.14% |
| `agent/tmax-9b` | `experiments/agents/multiturn` (Terminal-Bench 2.1) | 260 | 123.81% |
| `agent/tmax-27b` | `experiments/agents/multiturn` (Terminal-Bench 2.1) | 40 | 200.00% |
| Domain | Teacher | Responses |
| --- | --- | ---: |
| Math (M) | `Jackwang111/M2RL-RL_Math` | 11,508 |
| Code (C) | `Jackwang111/M2RL-RL_Coding` | 7,968 |
| Science (S) | `Jackwang111/M2RL-RL_Science` | 12,642 |
| Instruction following (I) | `Jackwang111/M2RL-RL_IF` | 14,179 |
## Use
```bash
git clone https://github.com/UCSB-AI/CSPD && cd CSPD
python experiments/m2rl/compose.py --paper-order MCSI --output artifacts/MCSI.safetensors
python experiments/m2rl/eval/generate.py --bench ifbench --prompt artifacts/MCSI.safetensors --output runs/MCSI/ifbench.jsonl
python experiments/m2rl/eval/score.py --bench ifbench --responses runs/MCSI/ifbench.jsonl
# retrain a domain prompt from the released data
torchrun --nproc-per-node 4 experiments/m2rl/train_sp.py --data data/m2rl/if --output runs/m2rl/if
```
The training questions come from the public M2RL training sets; benchmark questions are not included.
## Citation
```bibtex
@article{zhang2026cspd,
title = {Composable Soft-Prompt Distillation of RL Experts: Toward Continual Post-Training},
author = {Zhang, Zhen and Yang, Changyi and He, Xuehai and Liu, Chengzhi and Yin, Yutong and Liu, Ziyue and Yin, Zhuoran and Li, Yangmin and Liu, Zhihan and Li, Jisen and Jin, Mingyu and Li, Chuhan and Weng, Zhaotian and He, Ruoyu and Gao, Wenyao and Deng, Jiaxin and Wu, Chenwei and Shen, Hui and Chai, Wenhao and Zhao, Chenyang and Ying, Zhuofan and Liu, Kieran and Chen, Andrew and Ma, Pony and Wang, Zhaoran and Patel, Alkesh and Gan, Zhe and Wang, Xin Eric},
journal = {arXiv preprint arXiv:2611.27376},
year = {2026}
}
```