Reasoning Distillation: How a 9B Model Learns the Thinking Style of Much Larger Models
This article explains reasoning distillation, the technique of transferring a large model's step-by-step reasoning traces into a compact model in the 10-billion-parameter range. It covers the core teacher-student paradigm, why data quality and verifiability matter far more than raw data volume, how supervised fine-tuning is configured in practice, which capabilities improve as a result, the evaluation traps to avoid, and why a low deployment barrier makes distilled small models a practical choice.
1. The Question: Are Small Models Destined to Be Weak at Reasoning?
For the past few years, the main line of the large-model race has been “bigger”: more parameters, more data, more compute. That curve, however, is becoming expensive with diminishing returns. A natural question follows: can a model under roughly ten billion parameters achieve step-by-step reasoning that comes close to that of a much larger model?
The answer tends to be yes. What matters is not how big the model is, but what kind of “thinking style” it has learned. A 9B-scale model trained only to “memorize answers” will still be brittle on unfamiliar problems. If it instead learns how to decompose a complex problem into a chain of reasoning steps, its performance moves noticeably closer to that of teacher models an order of magnitude larger.
This is precisely the core proposition of reasoning distillation: transfer the traces a large model leaves behind while it thinks to a small model.
2. The Core Idea: From Memorizing Answers to Imitating Reasoning
Conventional knowledge distillation usually performs “output alignment” — the small model learns the large model’s probability distribution over standard answers. Reasoning distillation goes a step further: what gets aligned is not just the final answer, but the entire process of arriving at it.
Imagine a math teacher model facing a problem. Instead of stating a number outright, it first analyzes the conditions, sets up the equations, solves them step by step, and finally verifies the result. This process is called a reasoning trace. When we collect a large number of such high-quality traces and have the student (the small model) imitate them sentence by sentence, what the student learns is not “what the answer to this problem is,” but “how to think when facing this type of problem.”
The analogy to human learning is direct:
- Memorizing answers by rote: works on the original problem, gets stuck the moment the numbers change;
- Imitating solution steps: understands the logic of each step and can transfer it to new problems.
Reasoning distillation aims for the latter. The teacher-student paradigm can be summarized in the pseudocode below:
# General paradigm of reasoning distillation (illustrative code)for prompt in reasoning_prompts:trace = teacher_model.generate(prompt, temperature=0.7) # teacher produces step-by-step reasoninganswer = extract_final_answer(trace)if verify(trace, answer): # check whether the reasoning chain is correctdataset.append({"prompt": prompt, "trace": trace, "answer": answer})# Supervised fine-tuning of the student model on high-quality tracestrain_sft(student_model, dataset)
There is nothing spectacular in this code. All the difficulty is concentrated on one point: how to guarantee trace quality.
3. Data Is the Deciding Factor: Building High-Quality Reasoning Traces
The effectiveness of reasoning distillation depends almost entirely on the quality of the training data. The “hundreds of millions of tokens of high-quality reasoning data” mentioned in the source material is valuable not for its volume, but because every reasoning step holds up to scrutiny.
Building this kind of data usually means passing three gates:
Verifiability
For tasks with definite answers, such as math and logic, the final result of a reasoning chain can be checked automatically in a programmatic way. Only samples where both the “reasoning process” and the “final answer” are correct deserve a place in the training set. This is the most effective gate for filtering noise.Diversity and difficulty distribution
If the data consists entirely of easy problems, the small model learns nothing but routines. The data needs to cover multiple difficulty levels from basic to fairly hard, so the model sees enough problems that “require a few detours” before genuine decomposition ability emerges.Deduplication and debiasing
A large number of near-duplicate traces pushes the model to overfit to a particular phrasing style and weakens generalization. Deduplication should therefore happen at the semantic level, and the proportions of different reasoning strategies (algebraic manipulation, drawing diagrams, backward reasoning, and so on) need to be balanced.
An example of a practical data-cleaning pipeline:
def build_distillation_dataset(raw_traces):cleaned = []seen = set()for t in raw_traces:if not step_checker(t.steps): # 1. validate individual stepscontinueif not answer_verifier(t.answer): # 2. verify the final answercontinuekey = semantic_hash(t.prompt) # 3. semantic-level deduplicationif key in seen:continueseen.add(key)cleaned.append(t)return balance_by_difficulty(cleaned) # 4. rebalance by difficulty
4. Training Method: Supervised Fine-Tuning Is the Main Battleground
The mainstream path for putting reasoning distillation into practice is Supervised Fine-Tuning (SFT): starting from a pretrained small model and continuing training on reasoning trace data.
A few key engineering considerations:
- Sequence length: reasoning traces are often far longer than ordinary question-answer pairs, so the training context window must be large enough to hold the full “analysis — derivation — conclusion” three-part structure. Otherwise long reasoning gets truncated and actually hurts results.
- Loss masking: loss is usually computed only on the “reasoning trace + answer” portion, while the prompt portion is masked, so the model concentrates on learning “how to think.”
- Learning rate and epochs: fine-tuning calls for a smaller learning rate and fewer epochs, to avoid overfitting the small model to the reasoning style in the training data at the expense of generalization.
- Preserving general capability: focusing too heavily on reasoning data can degrade the model on tasks such as casual chat and general knowledge. In practice, a portion of general instruction data is mixed in for “capability rebalancing.”
sft_config = {"max_seq_len": 8192, # room for long reasoning traces"learning_rate": 1e-5, # small learning rate for stable convergence"epochs": 2, # avoid overfitting to the reasoning style"mask_prompt_loss": True, # compute loss only on reasoning and answer"general_data_ratio": 0.15 # mix in general data to keep things balanced}
5. Capability Gains Across Multiple Dimensions
The gains from reasoning distillation are not limited to a single exam score. They extend along several dimensions:
- Math and logical reasoning: the most direct beneficiary. The model learns to set up equations, derive step by step, and verify results, typically producing a substantial accuracy improvement on competition-level math problems.
- Knowledge reasoning: for questions that require multi-hop connections (chaining several facts into a conclusion), step-by-step thinking significantly reduces errors caused by skipped steps.
- Tool use: the model can recognize during reasoning that “this step needs an external calculation or lookup,” and then emit structured tool-call instructions, handing complex computation to the outside environment while it focuses on orchestration.
- Long-context handling: with a context window of a million tokens retained, the model can perform cross-paragraph information integration and reasoning over very long documents.
- Agent development: these capabilities combined are enough to let a small model serve as the “brain” of an AI Agent — planning tasks, calling tools, and adjusting strategy based on feedback to complete multi-step automated workflows under constrained resources.
6. Evaluation: Don’t Be Fooled by a Single Metric
Evaluating reasoning distillation requires particular care. Some common pitfalls:
- Looking only at final-answer accuracy: the model may “guess the answer right with a broken reasoning process.” The correctness and consistency of the reasoning chain should be evaluated at the same time.
- Test set contamination: if test questions leak into the training traces, scores will be inflated. The evaluation set and the training set must be strictly separated.
- Overfitting to a single benchmark: chasing scores on one category of math problem may damage other capabilities. Cross-validate across multiple benchmarks covering math, logic, and general knowledge.
- Stability: sampling the same question several times and checking whether the reasoning chains converge on a consistent answer is an important signal for telling “actually thinks” apart from “gets lucky.”
7. Deployment: A Low Barrier Is What Makes It Real
The value of reasoning distillation is only realized when the model can actually be put to work. A major advantage of small models is exactly this: a low deployment barrier.
- Runs on a single card: a model within the 10-billion-parameter range, reasonably quantized, can serve inference on a single high-performance consumer GPU — no need to assemble an expensive distributed cluster.
- Complementary general-purpose cloud capabilities: on the cloud side, general-purpose building blocks can close the engineering loop — object storage for training data and model weights, a container platform for elastic deployment and autoscaling, monitoring and alerting to track inference latency and throughput, and a logging service to accumulate call traces for troubleshooting.
- Online notebook for quick validation: many platforms offer interactive development instances with preconfigured environments, so a developer can spin up an inference environment in the browser, verify how the small model reasons, and push the cost from “download to first experience” as low as possible.
It is worth stressing that the specific instance types, GPU models, and pricing methods available should follow what each platform actually provides; none of these should be assumed in advance.
8. Conclusion: Parameter Efficiency Is the Next Stop for AI
Back to the original question — are small models destined to be weak at intelligence? Reasoning distillation answers: what determines the level of intelligence is not just the parameter count, but more importantly the way of thinking the model has been taught.
The significance of this technical path is that it shifts the focus of the AI race from “stacking unlimited parameters” to “getting more value out of a limited number of parameters.” Once high-quality reasoning traces can be produced systematically, and once the distill — fine-tune — evaluate — deploy pipeline is connected end to end, a 9B model can carry capabilities that once belonged to large models, in math, reasoning, tool use, and even agent orchestration.
For developers and enterprises, this points to a more pragmatic choice: rather than blindly chasing the largest model, distill a large model’s way of thinking into a smaller, cheaper, easier-to-deploy one. Small parameters can hold big ambitions too.
