SuperAPI AI Directory

Phi-4-reasoning - Microsoft's Phi-4 reasoning model series

Author: AI小集 · Original source: AI工具集

What is Phi-4-reasoning

Phi-4-reasoning is a 14-billion-parameter reasoning model launched by Microsoft, designed for complex reasoning tasks. It was trained through supervised fine-tuning (SFT) using high-quality reasoning demonstration data generated by OpenAI's o3-mini model. The model can generate detailed reasoning chains and effectively utilize computational resources during inference. Phi-4-reasoning performs excellently on multiple benchmarks, surpassing models with larger parameter scales, such as DeepSeek-R1-Distill-Llama-70B. It has outstanding performance in multiple domains including mathematical reasoning, scientific questions, programming, and algorithmic problem-solving. Phi-4-reasoning-plus is a version further optimized on this basis through reinforcement learning, with stronger reasoning capabilities. Phi-4-mini-reasoning is a compact 3.8-billion-parameter reasoning model designed for resource-constrained environments, such as mobile devices or edge computing scenarios. It was fine-tuned using synthetic data generated by the DeepSeek-R1 model.

Phi-4-reasoning

Main features of Phi-4-reasoning

  • Powerful complex reasoning capabilities: Phi-4-reasoning can handle complex tasks that require multi-step decomposition and internal reflection, and performs excellently in fields such as mathematical reasoning, scientific problem-solving, programming, and algorithmic problem-solving.
  • Generation of detailed reasoning chains: The model is trained through supervised fine-tuning (SFT) and can generate detailed reasoning chains, effectively utilizing computational resources during the inference stage and improving the accuracy and efficiency of reasoning.
  • Efficient use of computational resources: Through inference-time scaling, Phi-4-reasoning can dynamically allocate more computational resources during the reasoning process, further improving reasoning capabilities.
  • Education and tutoring applications: Phi-4-reasoning covers a diverse range of mathematics problems from middle school to doctoral level, and is suitable for embedded tutoring and low-latency scenarios in the education field.
  • Lightweight deployment: Phi-4-mini-reasoning is the compact version of the series, designed for resource-constrained environments and suitable for deployment on mobile devices or in edge computing scenarios.
  • Multi-domain adaptability: In addition to mathematical and scientific reasoning, Phi-4-reasoning also performs excellently in general capability tests, including long-input context question answering, instruction following, programming, knowledge and language understanding, etc.

Technical principles of Phi-4-reasoning

  • Supervised fine-tuning (SFT): Phi-4-reasoning is trained on the basis of the Phi-4 model. By reallocating two placeholders as "think" and "end think" tokens to accommodate additional reasoning tokens, the maximum token length supported by the model is extended from 16K to 32K. The training data includes synthetically generated long chain-of-thought reasoning traces and high-quality answers, covering fields such as mathematics, programming, and safety. During the training process of about 16K steps, the model gradually learned to use the "think" token, improving its reasoning ability during training.
  • Reinforcement learning (RL): Phi-4-reasoning-plus is a version whose reasoning ability is further enhanced through outcome-based reinforcement learning. Reinforcement learning focuses on mathematical reasoning, using 72,401 mathematics problems as the seed dataset. The reward function is designed to incentivize correctness, penalize undesirable behaviors such as repetition and excessive length, and encourage appropriate response formats.
  • Data methodology: Phi-4-reasoning's training data methodology emphasizes the curation of high-quality data, including synthetically generated creative designs and filtered organic data. The construction of the seed database begins by collecting questions from various web resources, which are then filtered through an LLM evaluation and filtering pipeline, prioritizing prompts that require complex multi-step reasoning. This training data undergoes comprehensive decontamination to avoid contamination of commonly used reasoning benchmarks.

Phi-4-reasoning Project Address

Application Scenarios of Phi-4-reasoning

  • Education and Research: Phi-4-reasoning and Phi-4-mini-reasoning are very well suited for the education field, capable of solving diverse mathematics and science problems ranging from middle school to doctoral level.
  • Complex Business Decision Support: Phi-4-reasoning-plus further enhances reasoning capabilities through reinforcement learning, making it suitable for critical business decision support systems that require high accuracy. It can handle complex multi-step tasks and provide precise solutions for complex business problems.
  • Programming and Algorithmic Problem Solving: In programming and algorithmic problem solving, Phi-4-reasoning performs excellently, capable of generating detailed reasoning chains and solutions. It is suitable for code assistance and algorithm optimization tasks in development environments.
  • Lightweight Deployment and Mobile Devices: Phi-4-mini-reasoning is a compact reasoning model designed specifically for environments with limited computational resources, such as mobile devices and edge computing scenarios.
  • Core Engine for Agentic Applications: The Phi-4-reasoning series models can serve as the core engine for agentic applications, handling complex multifaceted tasks.