Abstract
Recent advancements in Large Language Models (LLMs) have demonstrated the power of Chain-of-Thought (CoT) reasoning. However, achieving similar capabilities in Small Language Models (SLMs) remains a significant challenge due to parameter constraints. This paper introduces Phi-4-Mini-Reasoning, a 3.8-billion parameter model that utilizes a specialized four-stage training pipeline to achieve exceptional performance in mathematical reasoning. By integrating large-scale distillation, preference learning, and stabilized Reinforcement Learning (RL), Phi-4-Mini-Reasoning outperforms models with significantly higher parameter counts, such as DeepSeek-R1-Distill-Llama-8B, on benchmarks including AIME24 and MATH-500.
Introduction
While LLMs have become adept at complex problem-solving, SLMs typically lack the foundational capacity to generalize from sparse reasoning data. Naive fine-tuning often results in performance degradation because the model lacks the internal representations to absorb complex logic. This research addresses the systematic training requirements to unlock robust reasoning in resource-constrained models, moving beyond simple distillation to a comprehensive "continual training" approach.
Methodology: The Four-Stage Recipe
The researchers developed a multi-stage pipeline designed to progressively build and refine reasoning capabilities:
- Distillation as Mid-Training: The base model is exposed to 10 million reasoning rollouts generated by DeepSeek-R1. This large-scale phase ensures the model absorbs a wide variety of reasoning trajectories before specialized tuning.
- Supervised Fine-Tuning (SFT): The model is refined on a curated subset of high-quality, college-level mathematics problems to enhance generalization and precision.
- Rollout Preference Learning (DPO): Utilizing both correct and incorrect reasoning steps from the distillation phase, the model undergoes Direct Preference Optimization (DPO). This teaches the model to distinguish subtle logical nuances by learning from its own failures.
- RL with Verifiable Reward: The final stage employs Group-based Relative Policy Optimization (GRPO). To stabilize RL in a small model, the authors implemented prompt optimization (filtering for consistent response lengths), reward rebalancing, and temperature annealing to manage exploration.
Key Insights: Quantity and Stability
A primary finding is that SLMs require a different data strategy than their larger counterparts. While massive models can learn reasoning from a few thousand high-quality examples (the "LIMO" approach), SLMs require a massive "mid-training" phase with millions of examples to build internal representations.
Furthermore, RL stability is critical. High variance in response lengths can destabilize the learning process in small models. The stabilization techniques introduced—specifically prompt optimization and temperature annealing—are essential for maintaining gradient stability during the GRPO phase.
Results
Phi-4-Mini-Reasoning (3.8B) demonstrates superior performance across several prestigious benchmarks, often beating models twice its size:
- AIME24: The model achieved a score of 57.5%, significantly outperforming DeepSeek-R1-Distill-Qwen-7B (53.3%) and the DeepSeek-R1-Distill-Llama-8B baseline (43.3%).
- MATH-500: Accuracy reached 94.6%, surpassing the 8B-parameter Llama-distilled model (86.9%).
- GPQA Diamond: A score of 52.0% indicates that the model's reasoning capabilities extend beyond arithmetic into graduate-level scientific logic.
Conclusion
Phi-4-Mini-Reasoning proves that with a rigorous, multi-stage training recipe, small models can achieve reasoning capabilities previously reserved for much larger systems. The transition from "quality-only" to "quantity-then-quality" data strategies, combined with RL stabilization, provides a blueprint for future SLM development. Future work will explore the applicability of this recipe to non-mathematical domains such as coding and subjective reasoning.
Summary updated