HyperAIHyperAI

Command Palette

Search for a command to run...

Modelltraining
LLM

P²-MOPD: Beschleunigung der Multi-Teacher-On-Policy-Destillation durch Parameter-Priors

Zusammenfassung

Die Multi-Teacher-On-Policy-Destillation konsolidiert Expertenfähigkeiten, indem sie vom Schüler generierte Trajektorien überwacht, während die Task-Arithmetik eine trainingsfreie Alternative durch lineare Parameterkombinationen bietet. Wir betrachten die Linearkombination aus Schülerund Expertenparametern als ein einziges differenzierbares Modell und schlagen P²-MOPD vor, das die Mischungskoeffizienten und die Schülergewichte gemeinsam unter demselben On-Policy-Destillationsziel optimiert. Anders als die Task-Arithmetik, die für jede Wahl der Fusionskoeffizienten innerhalb der linearen Hülle der eingefrorenen Schülerund Expertenparameter bleibt, hält P²-MOPD den Schüler trainierbar, sodass die Experten als Parameter-Priors wirken, ohne ihn auf diese Hülle zu beschränken. Über vier Domänen hinweg und bei Modellgrößen von 1,7B und 4B erreicht P²-MOPD aus derselben Initialisierung eine schnellere und ausgewogenere Wiederherstellung als MOPD und übertrifft dessen endgültige durchschnittliche Wiederherstellung bereits nach der Hälfte der Trainingsschritte. Am Ende des Trainings erreicht unser 1,7B-Modell eine durchschnittliche Wiederherstellung von 94,7 %, gegenüber 80,9 % bei MOPD. Der Code ist unter https://github.com/SinuoWang/P2-MOPD verfügbar.

One-sentence Summary

The authors propose P²-MOPD, a method that jointly optimizes mixing coefficients and trainable student weights under an on-policy distillation objective, treating frozen experts as parameter priors rather than confining the model to their span; across four domains at 1.7B and 4B scales, it reaches 94.7% average recovery versus 80.9% for MOPD.

Key Contributions

  • P²-MOPD treats a linear combination of trainable student parameters and frozen expert parameters as a single differentiable model and jointly optimizes the mixing coefficients and student weights under the multi-teacher on-policy distillation objective.
  • Across four domains at 1.7B and 4B scales, P²-MOPD surpasses the final average recovery of MOPD in half the training steps, with the 1.7B model reaching 94.7% average recovery versus 80.9% for MOPD and worst-domain recovery rising from below 50% to nearly 90%.
  • Learnable expert mixing coefficients make the lagging expert direction reachable, trainable student weights allow adaptation beyond the frozen task-vector span, and the learned coefficients consistently identify the teacher that the student most needs.

Introduction

Frontier large language models are increasingly consolidated from domain-specific experts using multi-teacher on-policy distillation, where each expert supervises the student’s own responses. This approach is effective but computationally heavy and often recovers domains unevenly, sometimes leaving a lagging domain behind or eroding an existing capability. Training-free model merging such as task arithmetic is cheaper and partially recovers expert abilities, but it offers no quality guarantee and often leaves a large performance gap. The authors propose Parameter-Prior MOPD, which treats a linear combination of the trainable student and frozen experts as one differentiable model and jointly trains the student weights and expert mixing coefficients under the on-policy distillation objective. This keeps expert parameters as a learnable prior throughout training, improving both training speed and worst-domain recovery.

Method

The authors propose P^2-MOPD, which reparameterizes the multi-teacher on-policy distillation student as a combination of trainable student weights and a learnable linear combination of frozen expert weights. This approach allows the model to jointly optimize the student weights and the mixing coefficients under the on-policy distillation objective. The experts guide the student in two distinct ways: their logits supervise the student behavior, while their weights serve as parameter priors.

Refer to the framework diagram below for an overview of the architecture and training flow.

In this framework, the student module weights are parameterized module-wise. For a specific module mmm, the weight matrix is defined as:

Wm(B,α)=Bm+∑k=1Kαk,mτk,mW_m(B, \alpha) = B_m + \sum_{k=1}^K \alpha_{k,m} \tau_{k,m}Wm​(B,α)=Bm​+k=1∑K​αk,m​τk,m​

where BmB_mBm​ represents the trainable full tensors, αk,m\alpha_{k,m}αk,m​ are the scalar mixing coefficients, and τk,m=Wm(k)−Wm(0)\tau_{k,m} = W_m^{(k)} - W_m^{(0)}τk,m​=Wm(k)​−Wm(0)​ are the frozen task vectors derived from the domain experts. Because BBB is unconstrained, this parameterization represents the exact same model class as a plain student, but it fundamentally alters the optimization trajectory by using the frozen experts as parameter priors.

During the training process, the student generates rollouts on prompts across all domains. The frozen teacher corresponding to each prompt domain scores the student tokens. The sampled tokens and the teacher logits are passed as detached data to compute the MOPD loss. This loss is then back-propagated through two distinct channels. The first channel updates the student weights directly. The second channel computes the gradient with respect to the mixing coefficients α\alphaα. By the chain rule, the gradient for the coefficients is the directional derivative of the loss along the frozen task vector:

∂Lt∂αk,m=⟨Gm,τk,m⟩\frac{\partial \mathcal{L}_t}{\partial \alpha_{k,m}} = \langle G_m, \tau_{k,m} \rangle∂αk,m​∂Lt​​=⟨Gm​,τk,m​⟩

where GmG_mGm​ is the ordinary gradient of the distillation loss with respect to the composed weight.

The optimizer maintains the materialized weights WWW in full precision and advances them using a two-channel update rule. The student weight channel applies an AdamW update to the materialized weights, while the coefficient channel updates the mixing coefficients using Adam, which in turn shifts the weights along the span of the task vectors. The per-step displacement of a module is the sum of these two components:

ΔWm=ΔmAdamW+∑kΔαk,mτk,m\Delta W_m = \Delta_m^{\text{AdamW}} + \sum_k \Delta \alpha_{k,m} \tau_{k,m}ΔWm​=ΔmAdamW​+k∑​Δαk,m​τk,m​

This dual-channel approach effectively acts as a preconditioner. The parameter prior amplifies the gradient component along the task vectors, allowing the student to efficiently recover domain-specific capabilities that standard weight-only updates might miss, while the unconstrained weight channel adapts the model outside the span of the task vectors.

Experiment

The experiments evaluate multi-domain policy distillation at Qwen3-4B and Qwen3-1.7B scales using four domain teachers, with evaluation on MedQA, CaseHOLD, FinQA, and IFBench, comparing P2-MOPD against MOPD variants and IM-MOPD on average recovery and worst-domain balance. The main results show that learnable task-vector coefficients accelerate recovery, improve final average and raw scores, and substantially close the lagging MedQA gap, with the effect traced to movement along the medical task-vector direction rather than extra capacity or domain conflict alone. Ablations confirm that the gains require both learnable coefficients and trainable student weights, hold across initializations and granularities, and add only modest wall-clock overhead while reaching fixed quality much earlier.

P2-MOPD achieves the strongest final performance among the trained methods, leading in average recovery and mean raw score at both scales. It is also more balanced, raising worst-domain recovery to roughly 88 or 89 percent while MOPD from the task-arithmetic start remains below half. The method reaches higher average recovery earlier in training, surpassing the final average of the baseline MOPD by the halfway checkpoint. P2-MOPD improves final average recovery over MOPD and IM-MOPD, with nonoverlapping seed ranges at both scales. Worst-domain recovery rises from about 47 and 32 for MOPD (TA init) to about 89 and 88 for P2-MOPD at the two scales. P2-MOPD cuts across-domain recovery variability from over 20 points to under 5 points. MOPD from the task-arithmetic start often leaves MedQA as the weakest domain, while P2-MOPD recovers it much more strongly.

P^2-MOPD achieves high final average recovery at both model scales and outperforms MOPD (TA init) overall. The improvement is concentrated in MedQA, which shifts from a lagging domain to recovery near the other domains. Domain recovery becomes more balanced, with only a small and variable FinQA dip at one scale. P^2-MOPD improves average recovery over MOPD (TA init) at both model scales, with a larger mean advantage at the smaller scale. MedQA shows the largest gain by far, while the only domain-level mean decrease is a small FinQA difference at 4B that sits within its variability.

The decisive intervention is whether the medical task-vector coefficient is learnable. With a learnable medical coefficient, medical QA recovery and average recovery rise sharply, and learning only that coefficient is sufficient for the best medical QA result. Without it, medical QA stays low or negative, and replacing task vectors with random directions also damages average recovery. A learnable medical coefficient sharply reduces medical KL and raises MedQA recovery compared with the baseline that does not learn it. Learning only the medical coefficient attains the highest MedQA recovery while keeping average recovery near the full method. Freezing the medical coefficient leaves MedQA recovery low, and random directions reduce both MedQA and average recovery. Using medical prompts alone helps only when the medical coefficient is learnable, confirming the coefficient is the critical factor.

At both 4B and 1.7B scales, P2-MOPD has a modestly higher per-step wall-clock cost than MOPD but reaches the fixed recovery target substantially faster. The advantage is larger at 4B, where its time to reach MOPD's final average recovery is at most 0.31x that of MOPD, compared with 0.55x at 1.7B. Within the same wall-clock budget, P2-MOPD also reaches higher average recovery than MOPD at both scales. P2-MOPD's per-step cost is higher than MOPD's, but the wall-clock cost of 100 steps is only 1.24x at 4B and 1.09x at 1.7B. Time to exceed MOPD's final average recovery is at most 0.31x at 4B and 0.55x at 1.7B, showing a larger speedup at the larger scale. Within the same wall-clock budget, P2-MOPD reaches higher average recovery than MOPD at both scales, with a larger recovery gain at 4B.

Freezing student weights and learning only mixing coefficients inside the task-vector span improves over the untrained task-arithmetic start but remains far below the full method. Training only student weights closes much of the average-recovery gap, yet worst-domain recovery stays relatively low, especially at the smaller scale. Updating both channels yields the best average and worst-domain recovery at both model scales. Coefficient-only training beats the untrained task-arithmetic start but stays well below the joint setting. Weight-only training recovers much of the average performance but leaves worst-domain recovery weaker than joint training. Updating both coefficients and weights achieves the highest recovery, with worst-domain results around 88 to 89.

The experiments evaluate P2-MOPD against MOPD-style baselines on final multi-domain recovery, domain balance, ablations, efficiency, and coefficient versus weight training modes. P2-MOPD consistently improves average and worst-domain recovery at both model scales, mainly by learning the medical task-vector coefficient, which substantially raises MedQA and reduces cross-domain variability. Coefficient-only training helps but underperforms joint training, and updating both mixing coefficients and student weights gives the best average and worst-domain recovery. Though P2-MOPD has a modestly higher per-step cost, it reaches a fixed recovery target much faster and attains higher recovery within the same wall-clock budget.


KI mit KI entwickeln

Von der Idee bis zum Launch – beschleunigen Sie Ihre KI-Entwicklung mit kostenlosem KI-Co-Coding, sofort einsatzbereiter Umgebung und bestem GPU-Preis.

KI-gestütztes kollaboratives Programmieren
Sofort einsatzbereite GPUs
Die besten Preise

HyperAI Newsletters

Abonnieren Sie unsere neuesten Updates
Wir werden die neuesten Updates der Woche in Ihren Posteingang liefern um neun Uhr jeden Montagmorgen
Unterstützt von MailChimp