Phi-4-reasoning
A 14B open-weight reasoning model fine-tuned from Phi-4
Phi-4-reasoning is a 14-billion-parameter reasoning model built by Microsoft Research and released on 30 April 2025. Fine-tuned from Phi-4 with curated chain-of-thought data and reinforcement learning, it targets maths, science and coding tasks and is offered as open weights for research and application use.
- 14B parameters, dense decoder-only Transformer based on Phi-4
- Released 30 April 2025 by Microsoft Research
- Fine-tuned on 16B tokens, about 8.3B unique, in 2.5 days
- 32k-token context window
- Microsoft reports it beats DeepSeek-R1-Distill-Llama-70B on reasoning tasks
What it is
Phi-4-reasoning is a 14-billion-parameter language model from Microsoft Research, released on 30 April 2025. It is a dense decoder-only Transformer derived from Phi-4 and tuned for complex reasoning. The model writes out a reasoning chain before giving a final answer, so it can spend more effort at inference time on hard problems. Microsoft positions it for maths, science, coding, algorithmic problem solving, planning and spatial understanding, mainly in English, and for settings where memory, compute or latency are tight. A stronger sibling, Phi-4-reasoning-plus, adds a reinforcement learning stage and longer reasoning traces.
How it came about
Work on the model ran from January to April 2025, according to its model card. Microsoft Research published the technical report on 30 April 2025, the same day the weights were released. The report lists 23 authors, including Marah Abdin, Sahaj Agarwal and Ahmed Awadallah. The team built it by fine-tuning Phi-4 on prompts chosen to be 'teachable', meaning pitched at the right level of difficulty and variety, plus reasoning demonstrations produced by o3-mini.
Inside the model
The architecture matches Phi-4: a dense decoder-only Transformer with 14 billion parameters and a 32k-token context window. Training used supervised fine-tuning on chain-of-thought traces, mixing synthetic prompts with filtered public web data in maths, science and coding, plus data for truthfulness, safety and Responsible AI. The run consumed 16B tokens, roughly 8.3B of them unique, over 2.5 days. Phi-4-reasoning-plus then received a short outcome-based reinforcement learning phase. Outputs split into a reasoning block and a summarised solution block, and the model card prescribes a fixed ChatML system prompt and sampling settings.
What it can do
Microsoft reports that both variants beat much larger open-weight models such as DeepSeek-R1-Distill-Llama-70B across reasoning tasks and come close to the full DeepSeek-R1. Evaluations covered maths olympiad sets (AIME 2022 to 2025, OmniMath), graduate science (GPQA-Diamond), competitive coding (LiveCodeBench, HumanEvalPlus), algorithmic problems (3SAT, TSP), spatial tasks (Maze, SpatialMap), retrieval (Kitab), instruction following (IFEval, ArenaHard) and general understanding (MMLU-Pro). Improvements carried over to general-purpose benchmarks. The report also flags weaknesses in how reasoning models are currently assessed.
How to use it
Weights are published openly on Hugging Face as microsoft/Phi-4-reasoning. The model runs through transformers, vLLM, Ollama, llama.cpp and other Phi-4-compatible frameworks. Microsoft recommends temperature 0.8, top_k 50, top_p 0.95 and sampling enabled, with up to 32,768 new tokens for long chains of thought. It is a static model, trained offline on data with a March 2025 cutoff.
Safety and testing
Safety work used supervised fine-tuning with open-source and synthetic prompts answered under Microsoft safety guidelines, covering topics such as clarity, ethics, disclaimers and confidentiality of chain-of-thought. Before release the team ran quantitative tests with open-source safety benchmarks and internal adversarial conversation tools, and worked with Microsoft's independent AI Red Team on both ordinary and adversarial use, including single-turn and multi-turn exchanges.
Why it matters
The technical report argues that careful curation of fine-tuning data helps reasoning models just as it helps general ones, and that reinforcement learning can amplify those gains. It also points to gaps in current ways of measuring the performance and robustness of reasoning systems.
Questions people ask about Phi-4-reasoning
What is Phi-4-reasoning?
It is a 14-billion-parameter reasoning model from Microsoft Research, released on 30 April 2025. Built by fine-tuning Phi-4 on curated chain-of-thought data, it writes out its reasoning before answering, and targets maths, science and coding problems.
How is it different from Phi-4?
It keeps Phi-4's architecture and size but adds supervised fine-tuning on reasoning demonstrations and curated prompts. A plus variant adds a short outcome-based reinforcement learning phase, producing longer reasoning traces and, Microsoft says, higher performance.
How do I run it?
The weights are on Hugging Face and work with transformers, vLLM, Ollama and llama.cpp. Microsoft prescribes a fixed ChatML system prompt, temperature 0.8, top_k 50, top_p 0.95, and up to 32,768 new tokens for long chains of thought.
What is it good at?
Microsoft evaluated it on maths olympiad questions, graduate science, competitive coding, algorithmic problems, spatial tasks and instruction following, reporting results above larger open-weight models and near the full DeepSeek-R1. The model card states it is designed and tested for maths reasoning only.
Good reading and sources
There is no English Wikipedia article on Phi-4-reasoning yet, so the facts on this page come from the sources listed above: arxiv.org/abs/2504.21318, huggingface.co/microsoft/Phi-4-reasoning. Some are the subject's own pages, so its claims about itself are reported as its claims. EveryLLM wrote the text in its own words, with AI assistance, and compares it with the sources to make sure no passage is copied.
It may contain mistakes, and figures change over time. Nothing here is investment or buying advice. If something is wrong, tell us. Last refreshed 2026-11-14.