Özer Cem KELAHMETKELAHMET
Articles · Research

CSPD: distilling RL experts into soft prompts you can stack on one frozen model

A UCSB-led paper distills reinforcement-learning experts for math, code, science and instructions into small soft prompts on a frozen backbone. Stacked together, they match multi-teacher distillation at 67.83 against 67.79 and serve 2.40 times faster than rank-4 LoRA.

Download Markdown
At a glance
Reading time
15 min
Sections
7
Code examples
2
Tables
3
Sources
7
Published
25 Nov 2026
In 30 seconds
What changed
Composable Soft-Prompt Distillation of RL Experts: Toward Continual Post-Training (20 November 2026, UC Santa Barbara and collaborators)
Why it matters
CSPD reframes continual post-training as an engineering problem of modules on a fixed base.
What to do
Try a prompt before a full distillation

Modern post-training produces specialists. A lab runs reinforcement learning (RL) on math and gets a math expert, runs it on code and gets a code expert, and so on. Then it has to fold all of them back into one model, and every time a new expert arrives, it has to fold them all again. That re-consolidation is slow, and it can quietly damage skills outside the target domains.

A paper posted to arXiv on 20 November 2026 proposes a different arrangement. Keep the original pre-RL model frozen. Distil each RL expert into its own soft prompt: 256 trainable vectors that sit in front of the input. To combine experts, simply concatenate their prompts. The authors call the method Composable Soft-Prompt Distillation (CSPD) and report that one prompt recovers at least 90% of an RL expert's gain in 22 of 23 settings, that four stacked prompts match multi-teacher distillation, and that serving stays within 1.5% of the bare backbone's throughput. If it holds up, post-training starts to look less like retraining a model and more like installing modules.

What happened

Composable Soft-Prompt Distillation of RL Experts: Toward Continual Post-Training (20 November 2026, UC Santa Barbara and collaborators)

Zhen Zhang and 27 co-authors posted arXiv paper 2611.27376 on 20 November 2026. The Hugging Face paper page lists the UCSB AI group at the University of California, Santa Barbara as the submitting organisation; the author list also spans CMU, UC Santa Cruz, Northwestern, NVIDIA, UIUC, UCLA, Princeton, Columbia, Apple, LMSYS and others. The code is on GitHub (UCSB-AI/CSPD) and the trained prompts, teacher data and training trajectories are released as the Apache-2.0 dataset ucsbai/cspd (1.88 GB).

The paper compares CSPD with the two standard ways to consolidate experts: weight merging (task arithmetic and TIES) and multi-teacher on-policy distillation (MOPD), plus LoRA-based distillation. The four-domain experiment uses the M2RL experts on a Qwen3-4B student; the single-expert experiment covers 23 teacher-student pairs from public RL releases such as MiMo-7B, DeepSWE-Preview and Nemotron-Cascade-8B.

How CSPD works

A useful analogy is a frozen piano with interchangeable sheet music. The piano (the backbone weights) never changes. Each expert is a page of notes placed on the stand. To play two pieces, you put both pages up. Weight merging, by contrast, is like retuning the piano every time a new piece arrives.

Step 1: a soft prompt per expert

A soft prompt is a short matrix of learned embeddings, P of shape 256 × d, where d is the model's hidden size. It is a close relative of prefix tuning, placed in the system message before the user's tokens, and processed like any other input. Only P is trained; every backbone weight stays frozen. For a Qwen3-4B backbone (hidden size 2,560), each prompt is 256 × 2,560 = 655,360 parameters, about 1.31 MB in bfloat16. Four experts add 2.6M parameters to a 4B model.

Step 2: distil the RL expert into the prompt

The repository describes the training objective as a response-only language-modelling loss on offline teacher responses. In plain words: sample answers from the RL expert, keep the ones a verifier marks correct, and train the prompt so the frozen student, with the prompt in front, assigns high probability to those answers. For the four-domain run, the released data holds 46,297 teacher responses: 11,508 for math, 7,968 for code, 12,642 for science and 14,179 for instruction following. The released domain prompts are step-200 checkpoints.

The loss for one example is ordinary next-token cross-entropy over the response tokens y given the question x, with the student weights θ frozen and only P trainable:

L(P) = − Σ over t of log p_θ( y_t | P, x, y_<t )

Step 3: make prompts robust to stacking

A prompt trained alone has always sat right next to the question. Once stacked, it will sit behind other prompts. The authors handle this with prefix-robust training: on half of the training examples they insert a 128 to 256 token prefix taken from other questions in the same domain before the prompt. The prefix is excluded from the loss and omitted at inference. It teaches each prompt to work even when something else comes first.

Step 4: compose by concatenation

To serve several experts, concatenate the prompts in a fixed order with no separators and no joint training. The paper's main order is MCSI (math, code, science, instruction following), with the last module next to the question. Adding a new expert later means training one new prompt against the same frozen backbone and appending it. Nothing already deployed has to change.

How it differs from the alternatives

Approach What changes Cost when a new expert arrives Serving shape
Weight merging (task arithmetic, TIES) Backbone weights Re-merge all experts One dense model
Multi-teacher on-policy distillation (MOPD) Backbone weights Re-distil with all teachers One dense model
LoRA distillation plus merge Low-rank weight deltas Train one adapter, re-merge Model plus adapters
CSPD Input embeddings only Train one prompt, append Frozen model plus cached prefix

What the paper measured

One prompt per expert

The recovery metric measures how much of the teacher's RL gain the prompted student keeps:

Recovery = 100 × (student with prompt − student) / (teacher − student)

Worked example with the MiMo-7B math pair: the SFT student scores 63.77, the RL teacher 73.18 and the student with a soft prompt 72.25. The gain the teacher achieved is 73.18 − 63.77 = 9.41 points; the prompt recovers 72.25 − 63.77 = 8.48 of them; 8.48 / 9.41 = 0.901, so about 90.1% (the paper prints 90.15, computed from unrounded scores).

Across all 23 settings, the only one below 90% is MiMo-7B on code, at 88.08%. Many exceed 100%, meaning the prompted student beats its own teacher. Selected rows:

Domain Pre-RL student to RL expert Student Teacher Student plus prompt Recovery
Math MiMo-7B-SFT to MiMo-7B-RL 63.77 73.18 72.25 90.15%
Math Qwen3-Swallow-30B-A3B SFT to RL 72.91 86.25 86.23 99.79%
Code MiMo-7B-SFT to MiMo-7B-RL 50.17 52.87 52.55 88.08%
Code Nemotron-Cascade-8B SFT to CodeRL 55.73 69.39 69.56 101.21%
SWE-bench Verified Qwen3-32B to DeepSWE-Preview 24.90 44.05 45.65 108.36%
SWE-bench Verified Qwen3.5-35B-A3B to Lego-RL-35B-A3B 64.00 70.40 72.25 128.91%
Terminal-Bench 2.1 Qwen3.5-9B to TMax-9B 20.22 28.09 29.96 123.81%

Read the high percentages with care. When the teacher's gain is small, as in Terminal-Bench 2.1 with Qwen3.6-27B (43.45 to 46.07, a 2.62-point gain), a small absolute improvement produces a large ratio; that row reports 200%. One SWE-bench row also gives the prompted student the teacher's predicted bug locations, which the authors mark separately.

Four experts on one Qwen3-4B

The composition test uses the M2RL-SFT Qwen3-4B student and four experts, evaluated on AIME24, LiveCodeBench v5, GPQA-Diamond and IFBench.

Method AIME24 LCB v5 GPQA-D IFBench Average
Student, no prompt 55.94 58.61 44.38 42.71 50.41
Individual experts, oracle routing 81.77 66.92 50.44 67.33 66.61
Task arithmetic merge 78.85 64.52 54.14 71.58 67.27
TIES merge 81.25 65.42 57.07 66.12 67.47
MOPD 83.28 66.24 55.21 66.42 67.79
LoRA distil plus TIES 81.41 64.00 56.66 62.67 66.19
CSPD without prefix-robust training 76.98 64.15 51.89 65.00 64.50
CSPD (MCSI order) 80.47 64.67 57.77 68.42 67.83

CSPD's 67.83 average edges MOPD's 67.79, a difference far too small to call a win; the honest reading is parity. Without prefix-robust training it drops to 64.50, which shows that step matters. The reverse order (ISCM) scores 67.72, so order sensitivity is small in this setup.

The authors also report the average as prompts are added one at a time. It rises at every step:

In-domain average as soft prompts are stacked on Qwen3-4B
50556065700 prompts1234CSPD average · 0 prompts: 50.4CSPD average · 1: 61CSPD average · 2: 61.7CSPD average · 3: 63.7CSPD average · 4: 67.8number of composed expert promptsaverage score
Figure 1. Source: CSPD paper (arXiv 2611.27376), as summarised on its alphaXiv overview

Individual domains do not improve at every step, but the overall mean does. The authors also compare independent training of each prompt against a progressive scheme and find independent training better at each stage: 61.67 against 56.44 after adding science, 63.67 against 58.28 after code, and 67.83 against 65.17 after math.

Out-of-domain behaviour

A key worry with merging and joint distillation is collateral damage. The paper tests six held-out benchmarks.

Mean over six held-out benchmarks
0204060StudentTIES mergeMOPDLoRA distil + CSPDmean score · Student: 50.350.3mean score · TIES merge: 54.154.1mean score · MOPD: 53.553.5mean score · LoRA distil + TA: 53.853.8mean score · CSPD: 56.656.6mean score
Figure 2. Source: CSPD repository README, Table 3 (XSTest, TruthfulQA, BFCL, TriviaQA, BBEH, FinQA)

CSPD has the best mean (56.6) and the best score on four of six benchmarks: XSTest 88.2, BFCL 55.6, BBEH 25.8 and FinQA 72.5. It is not the best on TruthfulQA, where the unprompted student leads (64.6 against 64.2), or TriviaQA, where TIES leads by a hair (33.6 against 33.5). MOPD lowers TruthfulQA from 64.6 to 61.0, the clearest example of collateral damage in the table.

Serving cost

On one NVIDIA B200 with GPT-OSS-20B and 32 concurrent requests, the soft-prompted model produced 715.4 output tokens per second against 721.3 for the bare backbone, a 0.8% drop (715.4 / 721.3 = 0.9918). Rank-4 LoRA reached 298.5 tokens per second, so the soft prompt is 715.4 / 298.5 = 2.40 times faster. P95 time to first token fell from 39.21 s with LoRA to 17.26 s. The reason is structural: a soft prompt is just a prefix whose keys and values can be computed once and cached, while LoRA adds extra matrix multiplications to every layer on every token.

The prefix still has a cost. For Qwen3-4B, each token of cache needs 2 (keys and values) × 36 layers × 8 KV heads × 128 dimensions × 2 bytes = 147,456 bytes. Four 256-vector prompts are 1,024 positions, so about 144 MiB of cache. With prefix caching, that is paid once and shared across requests, not per request.

hidden, layers, kv_heads, head_dim, nbytes = 2560, 36, 8, 128, 2
prompt_len, n_experts = 256, 4
print("params per prompt:", prompt_len * hidden)              # 655360
kv_per_token = 2 * layers * kv_heads * head_dim * nbytes       # 147456 bytes
print("prefix KV MiB:", kv_per_token * prompt_len * n_experts / 2**20)  # 144.0

Use cases and examples

A lab adding a new skill every month. A team that has already shipped three expert prompts on a frozen 4B model wants to add a fourth skill. With CSPD, it trains one prompt on roughly 8,000 to 14,000 verified teacher responses (the range of the released domain sets) and appends it. In the paper's run, adding the fourth prompt steps the average from 63.7 to 67.8 without retraining anything already deployed.

A platform serving many customer variants. A provider hosting one base model for many tenants can store each tenant's specialisation as a 1.31 MB prompt instead of a separate merged checkpoint. Because the backbone is shared and prompts are cached prefixes, the B200 test suggests throughput close to the bare model, unlike LoRA at 298.5 against 721.3 tokens per second.

A coding-agent team distilling an RL agent. The DeepSWE-Preview row shows a Qwen3-32B student with a soft prompt reaching 45.65 on SWE-bench Verified against 44.05 for the RL teacher. A team with a pre-RL checkpoint and an RL-tuned agent could try a prompt first before committing to full-weight distillation.

A safety team worried about regressions. Because the backbone never changes, removing a prompt restores the original model exactly. If a new expert harms refusal behaviour, rollback is deleting one prompt from the concatenation, which is simpler than unmerging weights.

What it means in practice

CSPD reframes continual post-training as an engineering problem of modules on a fixed base. That has three practical effects. First, cost: each new expert needs one small training run, not a re-consolidation of everything. Second, safety and auditing: a frozen backbone with removable modules is easier to reason about than repeatedly rewritten weights. Third, serving: cached prefixes are friendlier to high-throughput inference than per-layer adapters.

The catch is that the backbone sets the ceiling. A soft prompt can only steer what the frozen model already represents. The results suggest that RL gains are largely reachable this way, which is consistent with the view that much of RL post-training (for example GRPO-style training) elicits existing ability rather than adding new knowledge. But a capability the base model lacks entirely is unlikely to fit in 256 vectors.

What to do now

  1. Try a prompt before a full distillation. If you have a pre-RL checkpoint and an RL expert, train a 256-vector prompt on verified teacher responses and measure recovery with the formula above.
  2. Use prefix-robust training if you plan to stack. Insert 128 to 256 tokens of same-domain text before the prompt on half the examples; without it the paper's average fell from 67.83 to 64.50.
  3. Report absolute gains next to recovery percentages. Recovery above 100% on a 2-point teacher gain is weak evidence; show both numbers.
  4. Test held-out behaviour, not only target benchmarks. Include safety, factuality and tool-calling checks such as XSTest, TruthfulQA and BFCL.
  5. Benchmark serving with prefix caching on. Prefix caching works the same way as in the inference serving stack. The throughput advantage depends on caching the prompt's keys and values; measure it on your own engine and workload.
  6. Budget context positions. Each prompt uses 256 positions; ten experts would use 2,560 positions of context and cache.
  7. Version prompts like code. Store each prompt with its backbone hash, training data and step, since a prompt only works on the exact backbone it was trained for.
  8. Plan for re-distillation on backbone upgrades. Moving to a new base model means retraining every prompt.

Risks and open questions

The evidence comes from one composition setup. The four-domain result uses one 4B student and the M2RL experts. The authors state results are shown only for the tested four-domain setup, so it is unknown how well ten or twenty prompts compose.

Selection and seeds. The authors note that single-expert results use checkpoints selected on evaluation benchmarks and a single training seed. That can inflate recovery numbers, especially the ones above 100%.

Safety coverage is thin. The safety check is refusal behaviour on XSTest only. A frozen backbone does not by itself guarantee that general or safety behaviour is preserved when prompts are active.

Context cost grows linearly. Every expert adds 256 positions of attention and cache. That is cheap for four experts and may not be for forty.

Serving evidence is narrow. The throughput test covers one model, one GPU type and one workload. Engines differ in how well they cache and share prefixes.

Watch next: independent replications on other backbones, tests with many more stacked experts, comparisons against routing approaches that pick one prompt per query, and whether serving engines add first-class support for loading soft-prompt modules alongside LoRA.

Frequently asked questions

What is a soft prompt?

A soft prompt is a short sequence of learned embedding vectors placed before the input, instead of words. The model processes it like ordinary tokens, but the vectors are trained by gradient descent while the model's own weights stay frozen.

How is CSPD different from LoRA?

LoRA adds trainable low-rank matrices inside the model's layers, so every token pays extra compute. CSPD only adds input vectors, which can be computed once and cached. In the paper's B200 test, that made CSPD 2.40 times faster than rank-4 LoRA.

Does CSPD beat multi-teacher distillation?

It matches it. The four-expert composition averages 67.83 against 67.79 for MOPD, which is parity. CSPD's advantages are that new experts can be added without retraining and that its held-out mean is higher, 56.6 against 53.5.

Why can a student with a prompt beat its RL teacher?

Recovery above 100% means the prompted student scored higher than the teacher on that benchmark. It mostly happens when the teacher's gain is small, so a little extra improvement looks large as a ratio, and the authors note checkpoints were selected on evaluation benchmarks with a single seed.

Can I use the released prompts?

Yes. The ucsbai/cspd dataset includes the four 256 × 2,560 domain prompts and 17 single-expert prompts, and the repository has scripts to compose them and reproduce the tables. They only work with the exact backbones they were trained on.

Summary

Composable Soft-Prompt Distillation keeps a pre-RL model frozen, distils each RL expert into a 256-vector soft prompt trained on verified teacher answers, and combines experts by concatenation. The authors report at least 90% recovery of the teacher's gain in 22 of 23 math, code and agent settings, parity with multi-teacher distillation when four experts are stacked (67.83 against 67.79), the best held-out mean among the tested methods (56.6), and throughput within 1% of the bare backbone and 2.40 times rank-4 LoRA. The limits are a single four-domain composition study, benchmark-selected checkpoints, narrow safety and serving tests, and a context cost that grows with each expert. For teams doing repeated RL post-training, it is a practical recipe worth testing before the next full re-merge.

Sources

Cite this article

Kelahmet, Ö. C. (2026, November 25). CSPD: distilling RL experts into soft prompts you can stack on one frozen model. Özer Cem KELAHMET. https://www.ozercemkelahmet.com/articles/composable-soft-prompt-distillation-rl-experts

BibTeX
@online{kelahmet2026composable,
  author = {Kelahmet, {\"O}zer Cem},
  title  = {{CSPD: distilling RL experts into soft prompts you can stack on one frozen model}},
  year   = {2026},
  month  = {nov},
  url    = {https://www.ozercemkelahmet.com/articles/composable-soft-prompt-distillation-rl-experts}
}
Version historyfirst version
  1. Published

Factual corrections are listed here with what changed. Wording and formatting edits are not listed.

Last updated Nov 25, 2026
Type to search.
    ↑↓ navigate↵ open