How a 9B Model Distilled from a Larger Model and Adjusted Its Refusal Behavior to Top a Leaderboard

    This article breaks down how a roughly 9B-parameter model reached the top of a model aggregation platform through two separate modifications: capability distillation from a much larger model and a weight-level adjustment that reduced its tendency to refuse requests. It explains how reasoning traces were generated and cleaned for supervised fine-tuning, the key trade-offs in sequence length, learning rate, and data mix, and the role of lightweight reinforcement learning. It then covers how refusal-related activation directions were located and weakened in the middle layers, why layers 9 to 24 were chosen, and how to evaluate capability and behavior separately using accuracy, over-refusal rate, and out-of-bounds rate. It closes with compliance boundaries and a reproducible workflow.

    1. The Technical Story Behind the Result: What a 9B Model Actually Went Through

    A model with roughly 9 billion parameters reaching the top of a model aggregation platform looks like a small-model upset. In practice, it is the result of two stacked modifications. The first is capability distillation: transferring a much larger model’s problem-solving process on math and STEM questions into the small model. The second is behavior adjustment: modifying the weights of some layers to lower the model’s refusal tendency, without retraining its core capabilities.

    Separating the two steps makes the engineering meaning clear:

    • Capability transfer answers “can it solve the problem.” It depends on high-quality reasoning trace data and supervised fine-tuning.
    • Behavior alignment answers “is it willing to answer.” It depends on observing internal activations and applying local weight corrections.
    • Decoupling the two keeps iteration costs low: the capability side and the behavior side can be validated and rolled back independently.

    One point deserves emphasis: behavior adjustment is not the same as loosening safety boundaries. Compliance, privacy, and high-risk content should still be handled by a separate input/output moderation pipeline, not by changing model weights.

    2. Step One: Supervised Fine-Tuning on Reasoning Traces

    2.1 Data Sources and Generation Strategy

    The original approach had a model with roughly 1.6 trillion total parameters generate about 250,000 math and STEM samples in batch, using a reasoning mode that prioritized output quality. The value of these samples is not the final answer but the complete process: where to start, how to decompose the problem, how each step is derived, and how the result is checked.

    Key engineering points during generation:

    1. Difficulty stratification: bucket samples by subject and difficulty so easy questions do not drown out the signal from hard ones.
    2. Process completeness: keep the thinking, trial and error, and backtracking, not just the “clean solution.”
    3. Deduplication and decontamination: compare against evaluation sets by similarity to prevent data leakage and inflated scores.
    4. Verifiable answers: route numeric and expression answers through automated checking where possible, and drop self-contradictory samples.

    2.2 Key Trade-offs in Supervised Fine-Tuning

    Supervised fine-tuning on an open-source base model of roughly 9B parameters using these traces is essentially behavior cloning: teaching the model to organize solution steps the way a large model does. Three things matter in practice:

    • Sequence length and truncation strategy: reasoning traces are long, so the truncation point determines whether the model learns a complete derivation or half a line of thought.
    • Learning rate and epochs: small models have limited capacity, and overfitting degrades them into reciting templates, which hurts generalization.
    • Data mix: when STEM data dominates, keep a small share of general dialogue and instruction data to avoid collapsing general capability.

    Illustrative training configuration (structure only, not specific product parameters):

    1. {
    2. "stage": "sft",
    3. "max_seq_len": 8192,
    4. "epochs": 2,
    5. "lr": 1e-5,
    6. "data_mix": {"stem_reasoning": 0.9, "general_instruct": 0.1}
    7. }

    2.3 Where Lightweight Reinforcement Learning Fits

    After supervised fine-tuning, a round of lightweight reinforcement learning (for example, sequence-level policy optimization methods) runs next. The goal is not to inject new knowledge but to raise the share of effective reasoning on questions where correctness can be verified, and to compress ineffective verbosity. The practical focus is reward design: use answer correctness as the main reward, with a length penalty and format constraints as supplements, so the model does not learn that “talking more means a higher score.”

    3. Step Two: Locating and Weakening the Refusal Signal

    3.1 The Core Idea of Activation Contrast Analysis

    The behavior adjustment stage works by comparing the model’s internal activation distributions across different prompt types, finding the signal direction most correlated with refusal, and then applying small corrections to the weights of some layers to weaken that signal’s influence on the output. It can be understood as locating a “refusal axis” in the representation space and then applying a low-magnitude orthogonalization or projection removal.

    3.2 Choosing the Layer Range

    The public configuration limits the adjustment to layers 9 through 24. The reasoning: layers that are too shallow carry general language and lexical features, so changing them easily damages basic capability; layers that are too deep are tightly coupled with the final stance, so changing them easily causes output breakdown; middle layers are better suited to adjusting behavioral tendencies.

    3.3 Pseudocode Illustration

    1. # Illustrative flow only, not a specific implementation
    2. acts_harmless = collect_activations(model, benign_prompts, layers=range(8, 24))
    3. acts_refusal = collect_activations(model, refusal_prompts, layers=range(8, 24))
    4. direction = compute_refusal_direction(acts_refusal, acts_harmless) # refusal signal direction
    5. for layer in range(8, 24):
    6. W = model.layers[layer].weight
    7. W_proj = project_out(W, direction, alpha=0.3) # small-magnitude weakening
    8. model.layers[layer].weight = W_proj

    Here alpha controls the correction strength: too small has no effect, too large causes capability regression and incoherent output.

    4. Evaluation: Two Metric Groups Must Be Read Separately

    • Capability side: accuracy on math and STEM benchmarks, stability of long-chain reasoning, and reasoning cost (generation length, latency, memory usage).
    • Behavior side: change in refusal count, over-refusal rate (flagging normal requests as refusals), and out-of-bounds rate (answering when it should not).

    Both the over-refusal rate and the out-of-bounds rate must be monitored at the same time; looking only at a drop in refusals leads to the wrong conclusion. It is also worth adding a general capability regression set to confirm the behavior adjustment did not cut general dialogue capability along with it.

    5. Risk and Compliance Boundaries

    1. Weight-level behavior modification is hard to control, so it needs input/output moderation, log auditing, and alerting alongside it.
    2. Distillation requires attention to the authorization of the original outputs and to data compliance, with data lineage records retained.
    3. Run red-team testing before launch, covering inducement and role-play bypass patterns.
    4. Version the model and its configuration so a one-step rollback to the pre-adjustment weights is possible.

    6. Reproducible Workflow Checklist

    1. Generate and clean reasoning traces, completing difficulty stratification and decontamination.
    2. Supervised fine-tune the base small model, keeping the general data mix.
    3. Run lightweight reinforcement learning with rewards centered on verifiable correctness.
    4. Collect contrast activations, locate the refusal direction, and apply small corrections limited to the middle layers.
    5. Evaluate on two tracks: capability metrics, plus refusal/over-refusal/out-of-bounds, plus general regression.
    6. Roll out gradually with monitoring, alerting, and a rollback mechanism in place.

    In compute-constrained settings, this combination of “strong model generates traces, small model distills, local behavior correction” can achieve structured reasoning performance close to a large model at relatively low cost. Pairing it with general-purpose cloud container platforms, object storage, and monitoring and alerting capabilities for data and version management makes the engineering side more stable.