TL;DR
This paper introduces four new series of distilled reasoning and reward models, collectively called DistilQwen, designed to balance high reasoning accuracy with efficient inference for real-world applications. They achieve this through novel adaptive-thinking strategies and distilled reward models for enhanced reinforcement learning, demonstrating significant performance gains over existing models.
What Problem Does This Paper Address?
The increasing demand for large language models (LLMs) in real-world applications has created a critical need for models that are not only accurate in their reasoning but also fast and efficient during inference. Traditional LLMs often struggle with this trade-off, being either highly accurate but computationally expensive, or fast but less capable in complex reasoning tasks. Knowledge distillation (KD) has emerged as a promising solution to compress large, powerful "teacher" models into smaller, more efficient "student" models. However, existing KD methods for reasoning tasks often face challenges in effectively transferring complex reasoning chains (Chain-of-Thought or CoT) and may not adapt well to the diverse requirements of different industrial scenarios. This paper aims to bridge this gap by developing a suite of distilled models specifically tailored for industrial reasoning needs.
Methods
The authors extend the DistilQwen family with four new model series, built upon the Qwen models and distilled from powerful teacher models like DeepSeek-R1 and QwQ-32B. The core methodological contributions include:
- Slow-Thinking Models: Optimized for tasks demanding maximum accuracy, these models are trained using a curriculum learning approach that starts with medium-level CoT examples and progresses to more challenging ones.
- Adaptive-Thinking Models (Two Series: ThoughtX and ThoughtY): These models dynamically adjust their reasoning strategies based on input task complexity. This is achieved through a sophisticated CoT processor that generates and refines training data. Key components include:
- CoT Difficulty Scorer: Evaluates the complexity of generated CoTs, allowing models to prioritize learning from medium-difficulty examples.
- Reasoning Verbosity (RV) and Cognitive Difficulty (CD) Scorers: These novel scorers assess CoT quality by ensuring appropriate verbosity for challenging problems and matching the student model's cognitive capacity, preventing "over-thinking."
- Target-aware Dataset Sampler: Selects an optimal subset of CoTs for training based on the target student model.
- Distilled Reward Models: These models are trained using the RV and CD scores and are designed to enhance reinforcement learning (RL) for reasoning models. This approach circumvents the need for large teacher models during the resource-intensive RL training process. The paper proposes a reward function that combines these distilled scores with traditional accuracy and format rewards.
Datasets
The paper utilizes several datasets for training and evaluation:
- Training Data: CoT datasets are aggregated from platforms like Hugging Face and ModelScope, covering domains such as mathematics, code, and science. Specific datasets mentioned include OpenThoughts, DeepMath-103K, and OpenCodeReasoning. For adaptive-thinking models, a large corpus of over 2 million CoTs is sampled.
- Evaluation Benchmarks: The models are evaluated on challenging benchmarks that test deep reasoning abilities:
- AIME2024: A competition math dataset requiring multi-step reasoning.
- MATH500: A dataset of 500 difficult mathematical problems across various domains.
- GPQA Diamond: A benchmark for general-purpose reasoning and comprehension.
- LiveCodeBench V2: Evaluates programming and code generation skills.
Key Insights and Ideas
- Adaptive Reasoning is Key: The most significant insight is that dynamically adjusting reasoning strategies (length and depth) based on problem complexity leads to substantial improvements in both accuracy and efficiency, outperforming static "slow-thinking" models.
- Beyond Simple Distillation: Simply distilling CoTs isn't enough. Novel scoring mechanisms like Reasoning Verbosity and Cognitive Difficulty are crucial for creating high-quality training data that truly benefits student models, preventing issues like "over-thinking."
- Distilled Reward Models for RL: Using distilled RV and CD scores as reward signals for RL training is a practical and effective way to enhance reasoning capabilities without relying on computationally expensive teacher models during the RL phase.
- Industrial Integration Matters: The paper highlights the practical utility by integrating these models into Alibaba Cloud's PAI platform, demonstrating their readiness for real-world deployment and fine-tuning.
Key Results
- Significant Performance Gains: DistilQwen2.5-R1 models show marked improvements over baseline Qwen2.5 and OpenThinker models across all evaluated benchmarks. For instance, DistilQwen2.5-32B-R1 achieves 70.0% on AIME2024 and 93.8% on MATH500.
- Adaptive Models Excel: DistilQwen-ThoughtX and ThoughtY models demonstrate substantial improvements over their slow-thinking counterparts. DistilQwen-ThoughtY-32B reaches 90.0% on AIME2024 and 95.2% on MATH500.
- Efficiency Gains: While not explicitly quantified in terms of speedup percentages, the adaptive-thinking models' ability to adjust reasoning length implies efficiency gains by avoiding unnecessary computation on simpler problems.
- Reward Model Effectiveness: GRPO augmented with RV/CD distilled reward models consistently outperforms vanilla GRPO on mathematical reasoning tasks, showing the efficacy of the distilled reward signals.
Limitations and Future Work
- Benchmark Limitations: The authors acknowledge that the effectiveness of their models might vary in highly specific or dynamic real-world contexts not fully captured by current benchmarks.
- Bias Propagation: The reinforcement learning framework, relying on distilled knowledge, may propagate biases or errors from the teacher models.
- Data Volume for Adaptive Models: The superior performance of adaptive-thinking models is partly attributed to their training on significantly larger datasets (over 2 million CoTs) compared to slow-thinking models (around 100K). This implies that in low-data scenarios, the slow-thinking recipe might still be preferable.
- Future Work: The authors plan to continue developing RL-enhanced lightweight reasoning models and address the limitations of benchmark dependency and potential bias propagation. They also suggest future research could focus on improving model adaptability and precision in real-world applications.
Summary updated