A 256-vector prompt recovers 90% of RL-expert gains in 22 of 23 settings

Composable Soft-Prompt Distillation of RL Experts: Toward Continual Post-Training

Zhen Zhang, Changyi Yang, Xuehai He, Chengzhi Liu, Yutong Yin, Ziyue Liu, Zhuoran Yin, Yangmin Li, Zhihan Liu, Jisen Li, Mingyu Jin, Chuhan Li, Zhaotian Weng, Ruoyu He, Wenyao Gao, Jiaxin Deng, Chenwei Wu, Hui Shen, Wenhao Chai, Chenyang Zhao, Zhuofan Ying, Kieran Liu, Andrew Chen, Pony Ma, Zhaoran Wang, Alkesh Patel, Zhe Gan, Xin Eric Wang

cs.LG, cs.CL

2026-11-20

A 256-vector soft prompt on a frozen model recovers at least 90% of an RL expert's gain in 22 of 23 settings. Four concatenated prompts score 67.83, matching MOPD at 67.79.

What problem this solves

RL post-training is usually done one domain at a time. Math, code, and agent tasks each come with their own data, verifier, and environment, so the standard pipeline trains experts from one base and then consolidates them. New experts keep arriving, so consolidation is repeated work. A useful update would touch only the new expert and leave older skills where they are.

Existing methods store experts in parameters. Joint multi-task RL reruns every domain when one domain is added. Sequential RL can overwrite earlier gains. Task Arithmetic and TIES add parameter deltas, and those deltas interfere. MOPD trains a student on its own samples against every teacher at once, so one new teacher means retraining the student on the full set. Routers are hard to train, must be refit when the expert set changes, cannot mix several experts inside one request, and need a full copy of the model per expert. Merging LoRA per request skips the router and adds adapter math at every layer on every decoding step. One fixed mixture is also applied to every request, which is where out-of-domain scores slip.

Method

CSPD puts each expert in the input. The backbone is the pre-RL model and stays frozen. Each expert is distilled into its own soft prompt: 256 vectors in the embedding space, written into the system message ahead of the question.

Supervision is sequence-level distillation. Responses are sampled on that expert's questions, verifier failures are dropped, and only the prompt is trained, with length-normalized negative log-likelihood on response tokens. Experts never see each other, so distillations can run in parallel. Training uses Muon for 200 updates and keeps the final checkpoint.

A prompt is trained alone and later sits behind other prompts. On half the examples a random prefix of 128 to 256 tokens, drawn from other questions in the same domain, is placed in front of it. The prefix is outside the loss and is not used at inference. That is prefix-robust training. It stops the prompt from relying on an empty left context.

At inference the chosen prompts are concatenated in the system message. There is no joint training and no coefficient or router to fit. Adding an expert trains its prompt. Removing one deletes that span. Different combinations share a batch on the same backbone. The prompt is computed once at prefill. Decode steps only attend to its cached keys and values, so the extra cost is a longer context.

Results

On 23 public pre-RL / post-RL pairs spanning math, LiveCodeBench, SWE-bench Verified, and Terminal-Bench 2.1, with dense and MoE models from 7B to 35B, a 256-vector prompt recovers at least 90% of the teacher's gain in 22 settings and matches or beats the teacher in 15. On agent tasks it beats the teacher in five of six. DeepSWE moves SWE-bench Verified from 24.90% to 45.65%, with the teacher at 44.05%. The weak case is MiMo-7B code, at 88.08% recovery: the original RL data are unavailable, so distillation uses AReaL questions. On a GPT-OSS math sweep, 32 vectors recover 90.0% and 256 vectors recover 93.1%. Training on responses that are only 69% correct still recovers 90.5%, against 96.1% for correct-only data.

The multi-expert setup follows M2RL. The frozen student is M2RL-SFT, from Qwen3-4B, with RL teachers for instruction following, science, code, and math. AIME24, LiveCodeBench v5, GPQA-Diamond, and IFBench use K of 64/8/16/8. The student averages 50.41. Oracle routing to the four experts averages 66.61.

MethodFour-task avgRecovery
Student, no prompt50.410%
Per-domain experts, oracle routing66.61100%
Full-weight TA, λ=1.067.27104.1%
Full-weight TIES67.47105.2%
MOPD67.79107.2%
LoRA distill + TA, λ=0.565.5093.1%
LoRA distill + TIES66.1997.3%
Single-domain soft prompts, used alone65.3892.4%
CSPD without prefix-robust training64.5087.0%
CSPD, order ISCM67.72106.8%
CSPD, order MCSI67.83107.5%

MCSI (math, code, science, instruction following) is the default. Four prompts trained without seeing each other reach 67.83, level with MOPD at 67.79. Recovery treats the oracle average of 66.61 as 100%, so a ratio above 100% means beating that router, not winning every task against its own expert. CSPD is above TIES, TA, and LoRA merged from the same distillation data. GPQA-Diamond rises from 49.24 with its own prompt to 57.77. IFBench rises from 66.71 to 68.42. AIME24 slips from 80.89 to 80.47. The reverse order, ISCM, scores 67.72. Dropping prefix-robust training drops the average to 64.50. MOPD is stronger on AIME24 and LiveCodeBench. CSPD is stronger on GPQA-Diamond and IFBench.

Prepending prompts as instruction following, science, code, then math moves the average through 50.41, 60.99, 61.67, 63.67, and 67.83. Adding code drops IFBench from 66.71 to 64.58. Adding math brings it back to 68.42. Removing math costs 4.16 points on average and 6.54 on GPQA-Diamond, while LiveCodeBench rises 1.87. Removing instruction following costs 12.88 on IFBench.

Independent training beats Progressive Prompts, which fits each new prompt in front of the frozen earlier ones, at every stage: 61.67 vs. 56.44, 63.67 vs. 58.28, and 67.83 vs. 65.17. Progressive Prompts pushes IFBench to 52.71, 50.88, and 61.42. Against TIES on the same arrival order, independent prompts finish at 67.83 vs. 67.47. TIES with only the instruction expert drops LiveCodeBench from the student's 58.61 to 52.69.

Means on six held-out benchmarks (XSTest, TruthfulQA, BFCL, TriviaQA, BBEH, FinQA) are 50.3 for the student, 53.5 for MOPD, 54.1 for TIES, 53.8 for LoRA with TA, and 56.6 for CSPD, which leads four of the six. BFCL is 55.6 vs. 49.4 for MOPD. BBEH moves from 11.1 to 25.8, with TIES at 25.6. TruthfulQA stays highest for the student, 64.6 vs. 64.2, while MOPD falls to 61.0.

Serving GPT-OSS-20B in BF16 with SGLang on one B200, each request reads 20,480 tokens and writes 512. Across seven concurrency levels, soft-prompt throughput stays within 1.5% of the bare backbone. At 32 concurrent requests with a distinct adapter each, soft prompts run at 715.4 output tokens/s, the backbone at 721.3, and rank-4 LoRA at 298.5, a 2.40x gap. P95 time to first token falls from 39.21 seconds for LoRA to 17.26, next to the backbone's 16.89. With one request in flight the throughput gap is 4.12x. EAGLE-3 acceptance length moves from 2.34 to 2.28, and DFlash from 2.96 to 2.82.

The GPT-OSS math prompt closes 86.8% of the teacher-student KL gap. The tokens it raises most are ?, But, and Check. The tokens it lowers most are paragraph breaks, So, and Thus. Written instructions with the same intent close at most 2.1%, and raising reasoning effort closes none. If only response tokens may attend to the prompt, 80% of the gain remains. If only input tokens may, 33% remains. Across six models, 84% to 100% of the vectors still have their initialization token as the nearest word, yet in five models the median cosine to that token is 0.25 to 0.34.

Why it matters

Rewriting weights for every new expert ties cost and forgetting to the size of the library. CSPD keeps learning inside one prompt and leaves mixing to concatenation at inference. Four domains match MOPD in-domain, and the held-out mean is higher. At 32-way concurrency, output throughput is 2.40x rank-4 LoRA and close to the bare backbone.

The fit is specific. The RL teacher already exists, the backbone should stay fixed, and a skill should be attachable or removable on its own. Prompts from different users can share a batch. RL still has to be run first. The prompt only carries behavior the teacher already has. Matching weight-space consolidation on four domains and one 4B student does not show that a library can grow without bound.

Limitations

The composition study uses one backbone, four domains, and one seed. Whether the average keeps rising with more experts, and how much domain relatedness matters, is unmeasured. Individual tasks dip as experts are added. Each prompt spends 256 context positions, so attention and KV cache grow with the library. Prompts are tied to one backbone, a new backbone needs a fresh distillation, and there is no supervision without an RL teacher.

Some numbers were selected on the evaluation benchmarks, including single-expert checkpoints and the TA coefficients. Small teacher gains inflate recovery. TMax-27B's 200% on Terminal-Bench is student 43.45, teacher 46.07, prompted student 48.69. DeepSWE's gain over its teacher sits on a teacher improvement of about 20 points. Nemotron's 92.27% on SWE-bench gives the prompted student the teacher's predicted bug locations, so that number is not a pure prompt result. A frozen backbone also does not lock in safety behavior. XSTest only checks refusal on the tested requests.

Terms

Source

What people are saying

Related papers

All paper explainers