9B Model Distillation Practice: From Reasoning Migration to Refusal Behavior Optimization

    This article explores the practice of distilling a 9B-level model, focusing on migrating reasoning capabilities through a four-stage approach: constructing high-quality STEM data, supervised fine-tuning (SFT), lightweight reinforcement learning (RL), and adjusting refusal behavior. We analyze how shifting from "imitating answers" to "learning the problem-solving process" helps small models establish stable reasoning patterns, along with engineering best practices and result interpretation.

    In recent years, large model distillation has gradually evolved from “letting small models imitate answers” to “letting small models learn problem-solving processes.” Compared to retaining only the final result, process data—which includes problem analysis, step decomposition, formula derivation, and conclusion verification—is more beneficial for small models to establish stable reasoning patterns. A public experiment showed that a 9B-level model modified through a two-stage approach gained significant attention in the model community. Its technical route is highly representative: first, using an ultra-large teacher model to generate STEM reasoning samples, then applying supervised fine-tuning (SFT) and reinforcement learning (RL) to a medium-sized base model, and finally adjusting the weights to optimize refusal behavior.

    I. Overall Technical Route

    This practice can be abstracted into four stages:

    1. Construct high-quality mathematics and STEM reasoning data;
    2. Use SFT to migrate reasoning capabilities to the 9B-level model;
    3. Further optimize answer quality through lightweight RL;
    4. Adjust the model’s refusal tendency to reduce unnecessary refusals within compliance boundaries.

    Its core is not simply compressing model parameters, but transforming the teacher model’s “problem-solving behavior” into learnable data, and then gradually changing the student model’s behavior distribution through multiple rounds of training.

    The final model can be represented as:

    1. Base Model
    2. └─ SFT: Learning the problem-solving process
    3. └─ RL: Optimizing reasoning results
    4. └─ Behavior Adjustment: Reducing over-refusal

    The advantage of this phased approach is that the objectives are relatively clear. SFT is responsible for establishing the capability foundation, RL for improving output quality, and behavior adjustment for correcting usability at the interaction level. If all objectives are mixed into a single training phase, capability, safety, and formatting goals can easily interfere with each other.

    II. Stage 1: Knowledge Distillation Using Process Data

    1. Why Distill the “Process” Instead of Just the “Answer”

    Traditional knowledge distillation usually focuses on the teacher model’s final output—for example, inputting a math problem and directly using the teacher model’s answer to train the student model. However, for complex problems, the final answer does not fully represent the solution path.

    A more valuable reasoning sample typically includes the following:

    • Identifying the category of the problem;
    • Extracting known conditions and implicit constraints;
    • Selecting applicable theorems, formulas, or algorithms;
    • Breaking down complex tasks into multiple sub-problems;
    • Demonstrating intermediate calculations and derivation processes;
    • Performing sanity checks on the results;
    • Providing the final answer and necessary explanations.

    These steps explicitly manifest the teacher model’s implicit problem-solving strategies. Even if the student model cannot fully reproduce the teacher model’s internal reasoning, it can gradually form a relatively stable problem-solving process by imitating the explicit external process.

    2. Data Scale Does Not Equal Data Quality

    The case utilized approximately 250,000 mathematics and STEM samples. While this data scale covers a wide range of problem types, data quality remains the decisive factor for training effectiveness.

    During the actual data construction process, the following issues should be prioritized:

    Problem Coverage.
    Data should not be concentrated in a single discipline or difficulty range. Samples can be organized by basic mathematics, algebra, geometry, probability, physics, chemistry, and engineering calculations, while covering conceptual questions, computational problems, proofs, and comprehensive application questions.

    Reasoning Integrity.
    If a sample only contains conclusions without key intermediate steps, the student model may only learn surface-level patterns. Conversely, if the process is too verbose and contains a lot of irrelevant content, it will also increase training noise.

    Answer Consistency.
    A problem may have multiple solutions, but the final conclusion should remain consistent. For numerical problems, units, precision, and signs need to be checked; for proofs, every reasoning step must be verified.

    Difficulty Distribution.
    Training data cannot consist entirely of high-difficulty samples. A reasonable approach is to start with basic problems and gradually introduce multi-step reasoning and cross-knowledge-point problems, forming a curriculum-like data distribution from shallow to deep.

    Error Sample Filtering.
    The teacher model may also make calculation errors, circular arguments, or logical leaps. If not verified, these errors will be inherited by the student model. Therefore, after data generation, filtering is usually required through rule checks, programmatic verification, or multiple cross-reviews.

    III. Stage 2: Supervised Fine-Tuning for Learning Problem-Solving Paradigms

    After obtaining the reasoning data, the next step is to perform SFT on the 9B-level base model. The training objective can be simply represented as:

    1. Input: Question, context, and necessary constraints
    2. Output: Analysis process, derivation steps, and final answer

    From an optimization perspective, the model needs to maximize the conditional probability of the target response sequence:

    1. P(Response | Question, Context)

    The value of SFT is mainly reflected in three aspects.

    1. Establishing a Stable Output Structure

    The model can learn to answer in the order of “analyze the problem — list conditions — solve step-by-step — check results — provide conclusion.” A fixed structure helps reduce output randomness and makes it easier for users to understand and verify.

    2. Improving the Reasoning Efficiency of Small Models

    Large models can often complete complex derivations through long contexts, but small models are limited by parameter size and context processing capabilities. If the training data includes well-organized, high-quality processes, the student model can directly learn problem-solving templates for common questions, reducing exploration costs.

    3. Transferring the Teacher Model’s Expression Habits

    Distillation is not just about transferring knowledge, but also expression methods. For example, the teacher model might be accustomed to defining variables first, then establishing equations, or performing boundary checks before giving conclusions. After training with sufficient samples, these behavioral patterns may become the student model’s default strategies.

    However, SFT does not mean the model already possesses reliable reasoning capabilities. It may have only learned an expression format that “looks like reasoning.” Therefore, subsequent evaluations must distinguish between language fluency, process integrity, and conclusion accuracy, and should not judge model quality solely based on whether the response is detailed.

    IV. Stage 3: Lightweight RL for Result Optimization

    Following SFT, the case continued to employ lightweight RL. The goal of this stage is not to retrain all capabilities, but to optimize result quality based on existing reasoning capabilities.

    For mathematics and STEM tasks, the following types of rewards can be designed:

    • Whether the final answer is correct;
    • Whether the derivation process satisfies the problem constraints;
    • Whether the calculation results are consistent with programmatic verification;
    • Whether there are obvious self-contradictions;
    • Whether the specified output format is followed;
    • Whether there is meaningless repetition and redundancy.

    An important role of RL is to correct the “imitation bias” in supervised data. SFT focuses more on token-by-token generation, while RL can start from the overall result and encourage the model to generate ultimately more reliable answers.

    However, this stage also carries risks. If the reward function only focuses on the final answer, the model might skip necessary processes or even obtain high scores through speculative means; if long answers are over-rewarded, it may lead to verbose and repetitive outputs. Therefore, reward design should simultaneously consider correctness, verifiability, conciseness, and format compliance.

    V. Stage 4: Adjusting Model Refusal Behavior

    After completing the STEM-specific training, another team adjusted the model’s refusal behavior on this basis. The key here is not to retrain the entire model, but to analyze the differences in the model’s internal activations under different prompts, look for signals related to refusal tendencies, and then modify the weights of certain layers.

    This method can be summarized as:

    1. Prepare prompts that are allowed to be answered vs. prone to refusal
    2. ↓
    3. Compare changes in internal model activations
    4. ↓
    5. Locate potentially relevant layers and directions
    6. ↓
    7. Make small weight adjustments within a specified range
    8. ↓
    9. Re-evaluate refusal rate and answer quality

    In the case, the adjustment range was limited to several middle layers of the model, rather than modifying all parameters. The theoretical basis for this is that different layers may assume different functions: lower layers mostly process morphology and local patterns, middle layers may participate in semantics, task recognition, and behavioral decision-making, and higher layers are closer to final expression. Adjusting the middle layers offers the opportunity to change behavioral tendencies while reducing damage to basic language capabilities.

    It must be emphasized that reducing the refusal rate does not mean removing safety limits. A reasonable goal should be to reduce “false refusals,” not to make the model answer all questions unconditionally. During evaluation, at least the following should be observed simultaneously:

    • The refusal rate for general knowledge questions;
    • The completion rate for legitimate math and STEM tasks;
    • The refusal stability for high-risk requests;
    • Whether answer quality has degraded;
    • The magnitude of change between the output distribution and the original model.

    VI. How to Interpret Experimental Results

    Public records show that the distilled model achieved a minor accuracy improvement in some STEM evaluations, with the proportion of outputs formatted as required approaching 97%. Such results indicate that reasoning data and specialized training may improve the model’s performance on specific tasks, but this does not directly imply that the model is stronger across all domains.

    Reasons include:

    1. Training data is mainly concentrated in mathematics and STEM;
    2. The test set may share similarities with the training distribution;
    3. Minor improvements may be affected by evaluation randomness;
    4. A single metric cannot reflect factuality, robustness, and safety;
    5. The model may become stronger in certain problem types while regressing in other tasks.

    In the refusal behavior test, the model refused all 100 prompts before adjustment, but only refused 3 after adjustment. This result intuitively reflects the behavioral change, but it still requires further confirmation of the type, risk level, and representativeness of the test prompts. If the test set primarily consists of ordinary questions, the drop in refusal rate may indicate a reduction in false refusals; if it contains high-risk requests, a careful assessment is needed to determine whether safety boundaries have been weakened.

    Additionally, the KL divergence reported was approximately 0.0422, which can be used to describe the difference in output probability distribution before and after adjustment. A smaller KL divergence usually means the overall output distribution changes are limited, but it cannot independently prove that the model’s behavior has not significantly changed. Behavioral changes on a few key prompts may not significantly alter the global average distribution. Therefore, distribution metrics should be used in conjunction with per-sample behavioral evaluations.

    VII. Reusable Engineering Best Practices

    If enterprises or development teams wish to reproduce a similar process, they can follow these principles.

    1. Define Task Boundaries First

    Clarify whether the model primarily serves math Q&A, research assistance, educational scenarios, or general dialogue. The clearer the task boundaries, the easier it is to control data construction and evaluation.

    2. Build a Data Quality Pipeline

    It is recommended to split data processing into steps such as generation, deduplication, format validation, answer verification, difficulty stratification, and manual spot-checking, while retaining version records for each processing run.

    3. Use Multi-dimensional Evaluation

    Do not just look at accuracy. At least the following should be recorded simultaneously:

    • Final answer accuracy;
    • Reasoning step completeness;
    • Format compliance rate;
    • Average output length;
    • Reasoning time and resource overhead;
    • False refusal rate for normal questions;
    • Refusal rate for risk questions;
    • Capability regression before and after training.

    4. Control the Magnitude of Weight Adjustments

    Behavioral adjustments should try to use small-scale, rollbackable modifications, and retain the original weights. After each adjustment, a general capability regression test is required to prevent the model from experiencing factuality degradation, format loss, or safety boundary drift while refusal behavior improves.

    5. Distinguish Between “More Willing to Answer” and “More Reliable”

    Lowering the refusal rate is only an improvement in an interaction metric, which does not mean the response content is necessarily correct. For high-risk domains, mechanisms for citation verification, result validation, manual review, or external tool verification should be added.

    Conclusion

    This 9B-level model modification case reflects an important path for current small model optimization: completing capability distillation through high-quality reasoning data, using RL to improve result quality, and finally improving specific behaviors through local weight adjustments. Its value lies not in simply replicating a specific model, but in demonstrating how to split “knowledge capability,” “reasoning process,” and “interaction behavior” into different optimization targets.

    For developers, the methodology is what truly deserves reference: define objectives first, then construct verifiable data; establish basic capabilities first, then perform behavioral tuning; finally, jointly judge the effectiveness through accuracy, refusal rate, distribution changes, and safety regression tests. Only in this way can a 9B-level model achieve better professional task performance under limited resources while remaining controllable, explainable, and maintainable.