Hugging Face adds MOPD to TRL: three experts teach one model on 4 H200 GPUs
Training one model on math, code and instruction following at the same time is hard: improving one area makes another slip. MOPD trains a separate expert for each domain, and the general student model learns from all of them. Hugging Face has added the method to its TRL library. The SmolLM3-3B student learns from three experts on a machine with four H200 GPUs. If you already have narrow RL models, you can merge them into one.
AI-processed from Habr AI; edited by Hamidun News
If you have tried to teach one neural network math, programming, tool use and instruction following all at once, you know the problem: you lift one area, and another quietly drops. In a single reinforcement learning (RL) training cycle, the domains pull the model in different directions, and each one gets only a small share of every batch. The Multi-Teacher On-Policy Distillation (MOPD) method gets around this problem, and in 2026 it keeps appearing in technical reports. Now Hugging Face has built it into the TRL library, so you can run the approach yourself.
How MOPD works, in plain terms
Imagine a student who has to pass math, programming and Russian. If they study everything at once, each subject gets little time, and cramming one pushes out the others. MOPD proposes hiring a tutor for each subject. The student solves problems, and checks each of their own answers with the tutor who knows that topic.
Technically, the scheme has three stages:
- General supervised fine-tuning (SFT). One model gets the basics of all domains on a mixed dataset. This is the shared starting point.
- Specialized models. Separate models are created from the resulting checkpoint, and each is further trained with reinforcement learning for its own domain: math, code, instruction following, agentic tasks.
- Knowledge merging. The student, again taken from the post-SFT checkpoint, generates answers to prompts from all domains. Each prompt is scored only by the expert for that domain, token by token.
The method has two key features. First, the student learns from its own answers, not from ready-made teacher texts. With standard SFT, the model sees only perfect continuations, but in practice it has to continue its own text, and one early mistake leads it into a situation it never saw during training. Second, the signal arrives for each token, not as a single reward for the whole answer. Usually the reverse KL divergence is used: it shows how much the teacher disagrees with each chosen token. The teacher itself generates nothing.
Who is already using the method
Xiaomi first described the method under the name MOPD in January, in its report on MiMo-V2-Flash. Since then, DeepSeek, Moonshot, NVIDIA, Liquid AI, Mistral and others have used it. DeepSeek-V4 replaced the mixed RL from V3.2 with more than ten specialized teachers. In Kimi K3, nine experts are split by domain and reasoning level. In Mistral Large 4, three teachers differ only in reasoning level: high, medium and low. NVIDIA's Nemotron 3 Ultra has more than ten teachers, and its MOPD runs in two stages: after the first, new teachers are trained on the merged model and the procedure is repeated.
NVIDIA has also published five of its experts on Hugging Face: for STEM, competitive programming, instruction following, general reasoning and dialogue. This is unusual, because most labs publish only the final model.
Labs differ in how much information they take from the teacher. Nemotron 3 Ultra and MiMo-V2-Flash consider only the probability of the token the student chose. Open-MOPD compares the 16 most probable tokens. DeepSeek-V4 and Mistral Large 4 use the distribution over the entire vocabulary: a single token gave gradients with high variance and unstable training.
How to run it in TRL
Support is implemented in AsyncDistillationTrainer. For each expert, you start a vLLM server, pass each teacher's URL to the trainer, and add a teacher_id column to the dataset, which determines which expert receives each prompt. Generation, scoring and training run asynchronously, so the student keeps generating answers in parallel with training.
In the example, the student is SmolLM3-3B after SFT, and the teachers are three experts from Open-MOPD, trained from it with GRPO: for math, code and instructions. The prompts are mixed in a 40/40/20 ratio, because about half of the set relates to instructions. Everything fits on one machine with four H200 GPUs:
- GPU 0: the student's vLLM server;
- GPU 1: the math and instruction teachers;
- GPU 2: the code teacher, which needs its own GPU because its prompts are the longest;
- GPU 3: the training process.
Launching on HF Jobs takes one command with the h200x4 flag and the launcher.py script: it starts the servers, waits until they are ready, and starts training.
Limitations
With beta=1.0, the TRL example considers only the probability of the chosen token, so it does not reproduce the 16-token Open-MOPD approach. All teachers must use the same tokenizer as the student, because the comparison happens token by token. The experts must be prepared in advance, and they must be trained from the same base, which means separate RL runs. The synchronous DistillationTrainer is still in progress (issue #7215).
The practical takeaway: if you already have several narrow RL models on a common base, MOPD lets you combine their knowledge into one model without painfully balancing data proportions in a shared RL loop.
- Nov 30, 2026Mistral Releases Clipstral: Image Search That Beats Qwen3 — 80.2% vs. 77.5%
- Nov 30, 2026Hugging Face Doubled the Speed of Pi Coding Agent: Same Score in 25 Minutes Instead of 60
- Nov 30, 2026Sber Releases Voice Model With 5.99% Word Error Rate and 90 MB Smart-Home AI
- Nov 30, 2026Mistral Releases Clipstral: Its Image Search Ranks the Correct Photo First in 80.2% of Cases
Key Questions Answered
How MOPD works, in plain terms?
Imagine a student who has to pass math, programming and Russian. If they study everything at once, each subject gets little time, and cramming one pushes out the others. MOPD proposes hiring a tutor for each subject. The student solves problems, and checks each of their own answers with the tutor who knows that topic. Technically, the scheme has three stages: General supervised fine-tuning (SFT). One model gets the basics of all domains on a mixed dataset. This is the shared starting point. Specialized models.
Who is already using the method?
Xiaomi first described the method under the name MOPD in January, in its report on MiMo-V2-Flash. Since then, DeepSeek, Moonshot, NVIDIA, Liquid AI, Mistral and others have used it. DeepSeek-V4 replaced the mixed RL from V3.2 with more than ten specialized teachers. In Kimi K3, nine experts are split by domain and reasoning level. In Mistral Large 4, three teachers differ only in reasoning level: high, medium and low.
How to run it in TRL?
Support is implemented in AsyncDistillationTrainer. For each expert, you start a vLLM server, pass each teacher's URL to the trainer, and add a teacher_id column to the dataset, which determines which expert receives each prompt. Generation, scoring and training run asynchronously, so the student keeps generating answers in parallel with training. In the example, the student is SmolLM3-3B after SFT, and the teachers are three experts from Open-MOPD, trained from it with GRPO: for math, code and instructions.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
