Distilling a 9B Model: Reasoning Data, SFT, and Refusal Behavior Tuning
This article breaks down how a roughly 9 billion parameter open-source model climbed the leaderboard through two改造 steps: capability distillation and refusal behavior adjustment. It walks through the full engineering pipeline, including how to generate and filter process-level reasoning samples, how supervised fine-tuning teaches a 9B base model to organize its reasoning, why a lightweight reinforcement learning pass adds marginal gains, and how activation analysis plus local weight edits reduce refusals. It also explains how to read accuracy, format-following rate, refusal rate, and KL divergence together, and lists practical deployment advice along with a clear safety warning about weakening refusal mechanisms.
1. Background: Two Modifications Behind a Small Model’s Rise
A small model with roughly 9 billion parameters recently ranked near the top of an open-source model leaderboard. Its capability did not appear out of nowhere. It went through two key modifications:
The first was capability distillation, which transferred a much larger model’s problem-solving process on math and science questions into the small model. The second was behavior adjustment, which lowered the model’s refusal rate on specific prompts without changing its core capability.
Separating these two steps reveals a clear engineering chain:
- Use a much larger model to generate high-quality problem-solving samples in bulk.
- Supervised fine-tune an open-source small model on those samples.
- Add a round of lightweight reinforcement learning to stabilize reasoning format and correctness.
- Use internal activation analysis to locate refusal-related signals, then fine-tune weights in selected layers.
One point deserves emphasis: this entire chain centers on math and science reasoning and introduces no coding data. Its capability boundary should therefore be understood as specialized enhancement for science reasoning, not a broad across-the-board improvement over general models.
2. Step One: Generating and Filtering Reasoning Samples
The raw material for distillation is process data, not simple question-answer pairs. Process data means each sample contains not only the final conclusion but also the intermediate steps: where to start, how to break the problem down, and how each step is derived.
Sample generation usually focuses on three things:
- Sampling scale: hundreds of thousands of samples is a common range; too small a scale fails to cover the distribution of question types.
- Sampling strategy: high reasoning-effort modes improve the completeness of derivations but significantly increase generation cost.
- Filtering rules: samples with wrong answers, skipped steps, messy formatting, or excessive duplication need to be removed.
A simplified sample structure looks like this:
{"prompt": "Original text of a science or engineering problem","reasoning_trace": ["Step 1: identify the known quantities", "Step 2: establish the relationship", "Step 3: substitute and solve"],"final_answer": "Resulting expression","meta": {"subject": "math", "difficulty": "medium"}}
In practice, it is advisable to deduplicate samples and stratify them by difficulty, while keeping the proportions across subjects and difficulty levels reasonable. Otherwise the small model easily overfits to high-frequency question types and still breaks down on long-chain reasoning.
3. Step Two: Supervised Fine-Tuning Teaches a 9B Model the Problem-Solving Process
The goal of supervised fine-tuning is to make the roughly 9 billion parameter open-source base model imitate the derivation process described above. The key here is not memorizing answers but learning how reasoning is organized: what to do first, what comes next, and where to verify.
Several variables need control in practice:
- Learning rate and epochs: small models have limited capacity, and too many epochs quickly overfit to the sample wording.
- Sequence length: reasoning chains are long, and truncation directly breaks the completeness of intermediate steps.
- Data mixture: retaining some general-purpose corpus prevents the model from only being able to answer specific question types.
Success at this stage is usually judged by two metrics: whether accuracy on science evaluations improves, and whether the rate of “outputting in the required format” improves. An ideal result is a small accuracy gain combined with a format-following rate close to around 97%, which shows the model not only answers more accurately but also follows instructions better.
4. Step Three: The Marginal Gains of Lightweight Reinforcement Learning
Adding a round of lightweight reinforcement learning after supervised fine-tuning is a common industry practice. Its role is not to instill new knowledge but to make preference-level corrections to the existing policy, so the model picks the more stable, more concise, and more format-compliant option among multiple feasible solutions.
“Lightweight” here means few training steps, a simple reward signal, and coverage limited to science reasoning scenarios. The benefit is that gains and risks stay controllable. Once reward design in the reinforcement learning stage is crude, output degradation “for the sake of the score” can easily occur, for example a correct answer with an empty process.
5. Step Four: Locating Refusal Behavior and Adjusting Local Weights
The second modification addresses refusals. Its technical approach is activation analysis plus local weight modification:
- Collect the model’s internal activations when processing different types of prompts.
- Compare them to find the signal direction strongly correlated with refusal tendency.
- Modify weights in some intermediate layers to weaken that signal’s influence on the final output.
- Use KL divergence to measure how much the output probability distribution shifts before and after the adjustment.
In the public configuration, the adjustment range is limited to layers 9 through 24 of the model. This is a local intervention in the intermediate layers, not a full model retrain. Evaluation shows that on the same set of 100 prompts, the model refused all of them before adjustment and refused only 3 after adjustment, with a reported KL divergence of 0.0422, indicating the distribution shift was kept within a small range.
A risk warning must be given here: refusal mechanisms often carry safety alignment functions, and deliberately weakening them may introduce content safety risks. Any such adjustment should be carried out within a compliance framework and paired with stricter input filtering, output review, and red teaming.
6. Reading the Evaluation: Three Metrics Together
- Accuracy: reflects whether capability truly improved and needs to be broken down by subject and difficulty.
- Format-following rate: reflects whether instruction constraints are stable; close to 97% is a good level.
- Refusal rate and KL divergence: the former measures the magnitude of behavior change, the latter measures the size of side effects.
Looking at a single metric alone easily leads to wrong conclusions. For example, a sharp drop in refusal rate combined with a spike in KL divergence means the model’s overall behavior has been significantly disturbed and its stability is questionable.
7. Engineering Deployment Advice
- Define the capability boundary: the gains of a specialized distillation model concentrate in specific subjects, and general tasks still need a general model as a fallback.
- Keep an evaluation baseline: run the same test set before and after each modification to avoid “it feels stronger.”
- Control inference cost: high reasoning-effort sampling and long-chain outputs both drive up cost, so trade-offs between quality and cost are necessary.
- Safety first: any adjustment involving refusal behavior must have review and monitoring alerts in place, with logs and metrics that are observable and traceable.
- Version management: record data mixtures, hyperparameters, and layer ranges to keep experiments reproducible.
8. Conclusion
This route of “a large model generates process data → small model supervised fine-tuning → lightweight reinforcement learning → activation analysis and local weight adjustment” demonstrates a viable paradigm for a small model to acquire specialized capability. Its value lies not in creating the illusion of an “all-capable small model” but in trading controllable cost for stable gains in specific scenarios. For developers, what truly needs to be mastered is the trade-off logic and evaluation methods at each stage, along with the engineering discipline of advancing experiments under safety and compliance constraints.
