Distilling a 9B Model: Process-Based Training and Refusal Tuning Explained
This article breaks down a practical pipeline for turning a 9B open-source base model into a capable, well-behaved small model through two改造 stages: capability transfer and behavior adjustment. It covers generating process-oriented distillation samples from a much larger model, supervised fine-tuning on full solution traces, a lightweight reinforcement learning pass for output consistency, and activation-level weight edits to reduce over-refusal. It also outlines an evaluation framework spanning capability, behavior, efficiency, and stability metrics, plus risk and rollout best practices. The goal is a cost-controlled, measurable, and rollback-friendly approach to small model deployment; no specific model or tool is benchmarked here.
1. Background: Two Modifications Behind a Small Model’s Rise
A small model with roughly 9 billion parameters has recently ranked near the top of popular leaderboards in the open-source model community. It was not trained from scratch. Instead, it went through two key modifications:
- Capability transfer — compressing a large model’s problem-solving process into the small model.
- Behavior adjustment — reducing an excessive refusal tendency without breaking reasoning ability.
The engineering value is straightforward: large models are expensive to run and limited in throughput, while a small model is easier to serve at high concurrency and low latency on the same hardware. Distilling the “reasoning approach” into a smaller model can yield usable STEM reasoning performance at a controllable cost.
Note that this article does not benchmark any specific model or tool. It abstracts a general method: sample construction, supervised fine-tuning, lightweight reinforcement learning, activation-level behavior tuning, and a matching evaluation system.
2. Stage 1: Generating “Process-Oriented” Samples with a Large Model
Traditional distillation often aligns only the final answer, but STEM reasoning depends heavily on intermediate steps. A more effective approach is to have a large model with roughly 1.6 trillion total parameters generate about 250,000 math and STEM samples in an “effect-first” reasoning mode.
What matters is not the problem statement itself but the complete solution trace, which typically contains four kinds of information:
- Entry judgment: what category the problem belongs to, and what is given versus what is the target;
- Problem decomposition: breaking a complex problem into sub-problems;
- Step-by-step derivation: formulas, variable substitutions, and boundary conditions at each step;
- Conclusion and verification: the final answer plus any necessary sanity checks.
Illustrative data structure (pseudocode):
sample = {"prompt": "problem text","solution_trace": ["entry judgment", "decomposition", "derivation 1", "derivation 2", "conclusion"],"final_answer": "..."}
On the engineering side, it is advisable to deduplicate samples, stratify them by difficulty, and validate their format, so the small model does not learn verbose, repetitive, or self-contradictory reasoning patterns.
3. Stage 2: Supervised Fine-Tuning to Teach a 9B Model the Reasoning Process
With the samples in hand, run supervised fine-tuning on an open-source base model of roughly 9 billion parameters. The goal at this stage is not to memorize answers but to learn how to organize reasoning.
Practical points:
- Data mix: keep it centered on STEM reasoning; avoid mixing in too many unrelated tasks, which can cause capability drift.
- Sequence length: reasoning traces are long, so the context window and truncation strategy need to be set sensibly.
- Training stability: use a relatively small learning rate with sufficient warmup to prevent the small model from overfitting the sample style.
- Output constraints: if the business requires structured output, the format constraints should be reflected explicitly in the samples.
After supervised fine-tuning, the small model has basic multi-step reasoning ability, but on harder problems it may still show “step skipping” or unstable conclusions.
4. Stage 3: Lightweight Reinforcement Learning for Reasoning Consistency
To further stabilize outputs, a lightweight reinforcement learning pass can be added after supervised fine-tuning. A common industry practice is to use “answer correctness + process compliance + format satisfaction” as the reward signal, nudging the model toward more reliable strategies among multiple candidate reasoning paths.
The value of lightweight reinforcement learning:
- reduces the chance of “solving it but writing the wrong steps”;
- increases the proportion of outputs that follow the required format;
- improves stability without a significant increase in inference cost.
According to public evaluation descriptions, distillation brought a small gain in STEM accuracy, and the proportion of “output as required” reached nearly 97%, indicating that process-oriented samples plus lightweight alignment can noticeably improve usability.
5. Stage 4: Activation-Level Tuning of Refusal Behavior
During safety alignment, small models often exhibit over-refusal, declining even ordinary academic questions. A more refined approach is to analyze the model’s internal activations, locate the signals associated with refusal, and then make small modifications to some layer weights to weaken the influence of those signals on the final output.
The general workflow:
- Build a contrast prompt set: one group that should be refused, one group that should be answered normally.
- Collect internal activations: compare the representations of the two prompt groups at intermediate layers.
- Locate relevant layers and directions: identify the activation directions strongly correlated with refusal.
- Local weight correction: adjust only a few intermediate layers, avoiding full-model changes.
- Distribution shift monitoring: use metrics such as KL divergence to measure how the output distribution changes before and after the modification.
In the public description, the adjustment range was set from layer 9 to layer 24, with a KL divergence of 0.0422, indicating a fairly local change with controllable distribution shift. In terms of effect, out of the same set of 100 prompts, the original distilled version refused all of them, while after adjustment only 3 were refused.
6. Evaluation System: Proving It Got Better Without Getting Worse
At minimum, cover four categories of metrics:
- Capability metrics: math/STEM accuracy, step correctness rate;
- Behavior metrics: refusal rate, out-of-bounds answer rate, format compliance rate;
- Efficiency metrics: time to first token, throughput, GPU memory usage;
- Stability metrics: output distribution shift (e.g., KL divergence), repetition degradation rate.
Illustrative evaluation table:
Model version Accuracy Refusals/100 Format compliance NotesBase 9B baseline baseline baseline not fine-tunedDistilled small gain 100 high over-refusalBehavior-adjusted roughly flat 3 high fewer refusals
7. Risks and Best Practices
- Data compliance: confirm the source and licensing of distillation samples to avoid contamination and copyright risk.
- Behavior boundaries: weakening refusal does not mean removing safety; keep blocking in place for high-risk scenarios.
- Version management: record data versions, training configuration, and the layer adjustment range to make rollback easy.
- Gradual rollout: validate refusal behavior and accuracy with a small traffic share first, then ramp up gradually.
- Observability: combine logging services with monitoring and alerting to track refusal rate and distribution drift.
8. Conclusion
The core idea of this path is “transfer capability first, then align behavior”: use process-oriented samples to teach the small model to reason, use lightweight reinforcement learning to stabilize outputs, and use activation-level local correction to address over-refusal. For engineering teams, it offers a cost-controlled, measurable, and rollback-friendly paradigm for putting small models into production.
