NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Phi-4 Technical Report

Marah I Abdin, Jyoti Aneja, Harkirat S. Behl, Sébastien Bubeck, Ronen Eldan, Suriya Gunasekar, Michael Harrison, Russell J. Hewett, Mojan Javaheripi, Piero Kauffmann, James R. Lee, Yin Tat Lee, Yuanzhi Li, Weishung Liu, Caio C. T. Mendes, Anh Nguyen, Eric Price, Gustavo de Rosa, Olli Saarikivi, Adil Salim, Shital Shah, Xin Wang, Rachel Ward, Yue Wu, Dingli Yu, Cyril Zhang, Yi ZhangarXiv 2024 · DOI

Abstract

Microsoft’s phi-4 is a 14-billion parameter model designed to challenge the convention that frontier-level reasoning requires massive parameter scaling. By prioritizing a "synthetic-first" training recipe and introducing a novel Pivotal Token Search technique for post-training, phi-4 demonstrates that meticulous data curation and targeted alignment can allow a small language model (SLM) to outperform much larger counterparts on graduate-level STEM and mathematics benchmarks.

Introduction

The prevailing strategy for improving Large Language Models (LLMs) has centered on increasing compute, parameters, and web-scraped data. However, this approach faces diminishing returns due to noisy organic data and potential test-set contamination. Phi-4 addresses these challenges by focusing on high-quality, structured synthetic data designed specifically to teach logic and problem-solving. This report details the methodology and performance of phi-4, which sets a new state-of-the-art for its size class.

Phi-4 achieves the highest average score compared to both large and small frontier models.

Methodology

Synthetic-Heavy Pretraining

Unlike traditional models that rely primarily on web crawls, phi-4’s training corpus is heavily weighted toward synthetic data. The development team utilized multi-agent prompting, self-revision workflows, and "instruction reversal" (generating prompts from code) to create a 400-billion-token synthetic dataset. This approach allows for "spoonfeeding" reasoning to the model through Chain-of-Thought (CoT) data that follows a strict, digestible logical progression.

Pivotal Token Search (PTS)

A significant technical innovation in phi-4 is Pivotal Token Search (PTS). While standard Direct Preference Optimization (DPO) compares entire responses, PTS identifies the specific "pivotal" token where a model’s reasoning deviates from the correct path—such as a single incorrect sign in a complex math equation. By training specifically on these high-stakes tokens, the model learns to avoid critical errors more efficiently than through global response-level feedback.

Training Data Composition

The model was trained on a 10-trillion-token corpus with the following mixture:

  • 40% Synthetic Data: Focused on reasoning and logic.
  • 30% Filtered Web/Web-Rewrites: Providing general knowledge.
  • 20% Code: Enhancing algorithmic thinking.
  • 10% High-Quality Acquired Sources: Books and academic papers.

Performance Evaluation

Phi-4 was evaluated against standard benchmarks and fresh, contamination-proof tests. As shown in the detailed performance table below, phi-4 frequently outperforms models many times its size.

Detailed benchmark results comparing phi-4 (14B) against other small and large models across reasoning, math, and coding tasks.

Key Results

  • STEM Reasoning: On the graduate-level GPQA benchmark, phi-4 achieved a score of 56.1, significantly surpassing its teacher model, GPT-4o (50.6).
  • Mathematics: On the MATH benchmark, it reached 80.4, nearly doubling the performance of its predecessor, phi-3-medium, and exceeding GPT-4o’s 74.6.
  • Contamination-Proof Testing: To verify generalization, the team tested phi-4 on the November 2024 AMC-10/12 math competition. Released after the training data was collected, phi-4 outperformed Llama-3.3-70B and Gemini Pro 1.5 on these fresh problems.
  • Coding: Phi-4 remains the top-performing open-weight model in its class for HumanEval and HumanEval+.

Discussion and Insights

The Reasoning vs. Knowledge Trade-off

The authors observed that while synthetic data is superior for teaching reasoning, it can increase the risk of hallucinations in knowledge-heavy tasks. To mitigate this, filtered web data was re-introduced to balance "brainpower" with factual memory. This suggests that the "spoonfeeding" hypothesis—where structured data acts as a curriculum—is highly effective for logic but requires grounding in organic data for breadth.

Limitations

Despite its reasoning prowess, phi-4’s 14B parameter count limits its "internal encyclopedia" compared to 400B+ models, leading to occasional factual hallucinations regarding obscure topics. Additionally, the model currently struggles with strict formatting constraints (instruction following) and can be overly verbose due to its heavy CoT training.

Conclusion

Phi-4 proves that a 14B model can achieve frontier-level reasoning through innovative training techniques like Pivotal Token Search and high-quality synthetic data curation. Future work will focus on refining instruction following and balancing synthetic reasoning with organic knowledge to further close the gap with the world's largest models.

Summary updated

BibTeX
@misc{abdin2024phi,
  author = {Marah I Abdin and Jyoti Aneja and Harkirat S. Behl and Sébastien Bubeck and Ronen Eldan and Suriya Gunasekar and Michael Harrison and Russell J. Hewett and Mojan Javaheripi and Piero Kauffmann and James R. Lee and Yin Tat Lee and Yuanzhi Li and Weishung Liu and Caio C. T. Mendes and Anh Nguyen and Eric Price and Gustavo de Rosa and Olli Saarikivi and Adil Salim and Shital Shah and Xin Wang and Rachel Ward and Yue Wu and Dingli Yu and Cyril Zhang and Yi Zhang},
  title = {{Phi-4 Technical Report}},
  year = {2024},
  eprint = {2412.08905},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.08905},
}
Figure