Fine-Tuning a 9B Model with Distillation and Refusal Behavior Tuning
This article breaks down how a roughly 9B-parameter open-source model reached the top of a model aggregation platform through two rounds of modification: distillation from a larger model's reasoning trajectories, followed by targeted refusal behavior tuning. It covers the three-stage workflow—supervised fine-tuning on math and science trajectories, lightweight reinforcement learning, and activation-guided weight editing—along with reported experimental results and practical engineering best practices. Readers will learn how distillation, lightweight RL, and refusal tuning combine into a low-cost customization pattern for small models.
1. Background: How a Small-Parameter Model Reached the Top of the Leaderboard
A recently released open-source model with roughly 9 billion parameters topped a model aggregation platform, drawing widespread attention. Its capabilities did not come from pre-training from scratch. Instead, they resulted from two rounds of modification: first, a larger model generated high-quality problem-solving samples to transfer capabilities; second, the model’s refusal behavior was adjusted in a targeted way. This shows that when compute and data budgets are limited, distillation plus post-training remains an effective way for small models to quickly acquire specialized capabilities.
2. Stage One: Supervised Fine-Tuning on a Larger Model’s Problem-Solving Trajectories
In the original workflow, a larger model with roughly 1.6 trillion total parameters generated about 250,000 math and science samples under a high reasoning-effort mode. The value of this data lies not in the final answers, but in the complete record of the reasoning chain: where to start, how to break the problem down, how to derive the solution step by step, and how to reach the result.
The developers used these trajectory samples to run supervised fine-tuning on an open-source base model with roughly 9 billion parameters, teaching the small model to imitate the larger model’s problem-solving process. The model card indicates that both this stage and the next focused on math and science reasoning, with no coding data used.
An illustrative data organization is shown below:
{"prompt": "Find the extremum under the given constraints","trajectory": ["Identify the constraint type and the form of the objective function","Introduce auxiliary variables and simplify","Derive step by step and verify the boundaries"],"answer": "Final result"}
Key practice: trajectory data must be internally consistent and uniformly formatted, and cover different difficulty levels and problem types, so the small model does not learn only surface-level patterns.
3. Stage Two: Lightweight Reinforcement Learning to Consolidate Reasoning Strategies
After supervised fine-tuning, the workflow added a round of lightweight reinforcement learning using a sequence-level group relative policy optimization approach. This approach does not require training a separate value network. Instead, it estimates advantages from the relative quality of multiple sampled outputs for the same prompt, reducing memory usage and engineering complexity.
The goal of this stage was not to inject new knowledge, but to make the model more reliably select effective reasoning paths within its existing problem-solving distribution and reduce ineffective steps.
4. Stage Three: Targeted Refusal Behavior Tuning
The second round of modification was carried out by another publisher: starting from weights that had already undergone science-focused training, an activation-guided weight editing method was used to adjust refusal behavior. This method compares the model’s internal activations when processing different types of prompts, locates refusal-related signals, and then modifies the weights of selected layers to weaken their influence. The public configuration set the adjustment range to layers 9 through 24.
Illustrative pseudocode:
for layer in range(9, 25):w = model.layers[layer].weightw = w - strength * refusal_direction_projection(w)
Key constraint: this kind of editing is a “surgical” modification. General capabilities and refusal boundaries must be monitored at the same time to avoid introducing safety risks in the process of reducing refusals.
5. Interpreting the Experimental Results
- Science accuracy improved slightly, and the proportion of outputs in the required format reached nearly 97%;
- After weight adjustment, refusals among the same set of 100 prompts dropped from all prompts to 3;
- The KL divergence of the output probability distribution before and after adjustment was about 0.0422, indicating a limited overall behavior shift.
6. Engineering Takeaways and Best Practices
- Prioritize data quality: the completeness and consistency of trajectory data determine the upper limit of distillation.
- Validate in stages: run both capability and safety evaluations after each stage.
- Make small, incremental changes: use low strength and a narrow layer range for weight editing, and keep rollback points.
- Keep it compliant and controllable: set refusal boundaries based on the business scenario, and continuously observe behavior with logging services and monitoring alerts.
- Operationalize on a platform: use container platforms and object storage to manage training artifacts, and complete the training, evaluation, and release loop on cloud platforms such as Baidu AI Cloud.
Overall, distillation handles “acquiring capabilities,” lightweight reinforcement learning handles “stabilizing strategies,” and refusal tuning handles “aligning interaction experience.” Together, the three form a general pattern for low-cost small-model customization.
