How a 9B Model Tops the Charts: Distillation and Refusal Tuning in Practice
This article breaks down how a 9B-parameter model reached the top of a trending open-source leaderboard through a two-stage pipeline: process distillation from a much larger model, lightweight reinforcement learning, and targeted activation-level tuning of refusal behavior. It covers how the reasoning samples were constructed, how supervised fine-tuning and lightweight RL were staged, how refusal-related signals were weakened through small weight edits, and the evaluation, compliance, and reproducibility checklists needed to run this approach safely. Readers will learn a practical path for compute-constrained teams to gain strong reasoning ability while keeping capability and behavior changes decoupled.
1. Background: Why a Small Model Can Reach the Top
A model with only 9 billion parameters recently reached the top of the trending leaderboard on an open-source model aggregation community, sparking wide discussion. Its origin is not mysterious: its capability was not obtained from pre-training from scratch, but through two consecutive rounds of modification. The first round transferred the problem-solving process of a much larger model to a mid-sized model; the second round made targeted adjustments to the model’s refusal tendency. Understanding this pipeline is more valuable from an engineering perspective than focusing on the leaderboard rank, because it reveals a realistic path for compute-constrained teams to acquire strong reasoning ability.
It is worth emphasizing that leaderboard rankings are affected by many factors, including the choice of evaluation sets, prompt templates, sampling parameters, and the implementation of evaluation scripts. A single rank does not mean a comprehensive lead in general capability. In engineering practice, it is more important to ask whether the source of capability is traceable, whether the training stages are reproducible, and whether behavior adjustments have clear boundaries.
2. Pipeline Overview: Division of Work Across Two Stages
The whole pipeline can be abstracted into three stages with clear responsibilities that do not overlap:
- Capability injection: a much larger model generates structured problem-solving samples as the source of supervision signals.
- Capability consolidation: these samples are used to supervised fine-tune a mid-sized open-source base model, followed by a round of lightweight reinforcement learning to make the reasoning format and derivation habits more stable.
- Behavior tuning: without redoing pre-training, locate the internal activation signals related to refusal and reduce their influence through small-scale weight modifications.
The core idea of this division is decoupling “capability” from “behavior”: first transfer the reasoning capability in, then handle output boundaries separately, avoiding a single overly large change that causes capability regression.
3. Step 1: Constructing High-Quality Problem-Solving Samples
Sample quality determines the upper bound of transfer. The original approach had an ultra-large model with roughly 1.6 trillion total parameters generate about 250,000 math and science problem solutions in an “effect-first” mode. The key here is not the quantity but the information structure of the samples: each sample contains not only the final answer but also where to start, how to break down the problem, how each step is derived, and how the conclusion is substituted back for verification.
Reusable sample design points include:
- Layered coverage: sample by subject, problem type, and difficulty to avoid concentrating samples on a few template problems.
- Verifiable process: prioritize problems whose answers can be automatically checked, making it easier to filter out incorrect derivations later.
- Moderate derivation granularity: steps that are too coarse cannot teach the model “how to think,” while steps that are too fine introduce redundant noise.
- Deduplication and decontamination: apply similarity filtering against evaluation sets to reduce the risk of data leakage.
The sample organization logic is illustrated below (pseudocode, structure only):
sample = {"subject": "math|physics|chemistry","difficulty": "L1|L2|L3","question": "...","reasoning_steps": ["step1", "step2", "..."],"answer": "...","verification": "auto_check_passed"}
4. Step 2: Supervised Fine-Tuning and Lightweight Reinforcement Learning
With the samples in hand, they are used to supervised fine-tune an open-source base model of about 9 billion parameters, so the small model imitates the large model’s problem-solving process rather than only memorizing answers. The essence of this step is “process distillation”: the model learns the distribution of intermediate reasoning trajectories, so the output is more likely to show a stable step-by-step structure.
A round of lightweight reinforcement learning is then added. A common objective is to let the model reduce ineffective elaboration, stabilize formatting, and lower repetition while maintaining correctness. In engineering, this typically uses an algorithm family such as Group Relative Policy Optimization, which does not require training a separate value network and has lower memory overhead and implementation complexity, making it suitable for small and mid-sized teams. It should be noted that both stages in the original pipeline focused on math and science reasoning and did not introduce coding data, so its code capability should not be extrapolated.
A simplified pseudocode for the training stages:
# Stage 1: Process distillation (supervised fine-tuning)for batch in reasoning_dataset:loss = sft_loss(model, batch) # compute loss only on answer and reasoning segmentsloss.backward(); optimizer.step()# Stage 2: Lightweight reinforcement learning (format and correctness preferences)for prompt in rl_prompts:responses = model.sample(prompt, n=8)rewards = [rule_based_score(prompt, r) for r in responses]loss = grpo_style_objective(responses, rewards)loss.backward(); optimizer.step()
5. Step 3: Targeted Tuning of Refusal Behavior
The second round of modification targets refusal behavior. The idea is not to retrain, but to analyze differences in the model’s internal activations when handling different types of prompts, find the signal direction strongly correlated with refusal, and then make small modifications to the weights of some layers to weaken the influence of these signals on the final output. This type of method belongs to the category of activation analysis and weight editing. Its advantage is low cost and no need for large-scale data; its drawback is fuzzy boundaries and side effects that require strict evaluation.
The illustrative process:
1. Build a contrast prompt set: one type likely to trigger refusal, one answered normally2. Collect intermediate-layer activations and compute the mean difference direction3. Make small-step weight corrections along that direction in selected layers4. Regression testing: capability evaluation + safety evaluation + format consistency
6. Risks and Compliance Boundaries
Behavior tuning does not mean removing safety mechanisms. Any operation that weakens the refusal tendency must be paired with stricter safety evaluation and access control to ensure the model does not output illegal, harmful, or infringing content in real business scenarios. Compliance practices include: a clear whitelist of use cases, two-way review of inputs and outputs, retention of complete logs and traceable versions, and hard blocking for high-risk intents.
7. Reproducibility Engineering Checklist
- Data: sample sources, filtering rules, decontamination report, version numbers
- Training: base model version, hyperparameters, random seeds, stage checkpoints
- Evaluation: capability set, safety set, format consistency, regression baseline
- Deployment: canary strategy, monitoring and alerting, log service retention, rollback plan
If cloud resources are used, training tasks can be hosted on a container platform, data and weight versions managed with object storage, and task status and online metrics tracked with log and monitoring/alerting services, turning the experimental process into auditable engineering assets.
8. Conclusion
The essence of a small model reaching the top is a combination of process distillation, lightweight reinforcement learning, and activation-level behavior tuning. For developers, the truly transferable lessons are: decouple capability from behavior, make the sample structure solid, and put evaluation and compliance first. Baidu AI Cloud likewise emphasizes full-pipeline traceability and operability in model training and inference deployment, which is consistent with the practices above: first ensure the process is trustworthy, then talk about metric rankings.
