Quick answer: Phi-4 is Microsoft's December 2024 14B-parameter language model, scoring 70.4% on MMLU-Pro, 75.4% on Arena Hard, 82.6% on HumanEval, and 27.4% on BigCodeBench. Under Apache 2.0 license with open weights, it delivers GPT-4-class knowledge at a 14B parameter scale. The model uses a 16K-token context window.
Where Phi-4 leads
Where it lags
Best for: Edge deployment, resource-constrained inference, self-hosting on consumer GPUs, and tasks requiring GPT-4-class knowledge at 14B scale.
Phi-4 is Microsoft's December 2024 small language model, the fourth generation of the Phi series. Microsoft's Phi research focuses on demonstrating that high-quality training data — rather than raw parameter count — can yield outsized capability in small models. Phi-4 at 14B achieves MMLU-Pro scores competitive with much larger open-weight models.
The model is trained primarily on synthetic data: carefully curated textbook-quality content, code, and reasoning problems. This approach produces a model that excels at the academic knowledge and reasoning tasks covered by MMLU-Pro and Arena Hard, with 70.4% and 75.4% scores respectively placing it well above other models in its size class.
Phi-4's 16K context window is its most significant limitation relative to peers: Qwen3 32B offers 131K context at similar size, and Llama 4 Scout offers 10M. For tasks requiring long context, alternative open-weight models are recommended. For tasks fitting within 16K tokens, Phi-4 offers exceptional capability at 14B.
| Field | Value |
|---|---|
| Organization | Microsoft |
| Parameters | 14B (dense) |
| Context window | 16,384 tokens |
| License | Apache 2.0 |
| HuggingFace | microsoft/phi-4 |
| Release date | December 12, 2024 |
| Knowledge cutoff | June 2024 |
| Modality | Text only |
| Architecture | Dense transformer |
Phi-4 is available as open weights under Apache 2.0 — free to self-host. Available via Azure AI Foundry and third-party providers.
Phi-4 has a 16,384-token context window — approximately 12 pages of text. This is significantly smaller than most 2025-era models; for tasks requiring longer context, consider Qwen3 32B (131K) or Llama 4 Maverick (1M).
| Benchmark | Score | Source | Date |
|---|---|---|---|
| MMLU-Pro | 70.4% | Benchgen evaluation | 2025-07 |
| Arena Hard | 75.4% | Benchgen evaluation | 2025-07 |
| HumanEval | 82.6% | Benchgen evaluation | 2025-07 |
| BigCodeBench | 27.4% | Benchgen evaluation | 2025-07 |
| Model | MMLU-Pro | HumanEval | Context | License |
|---|---|---|---|---|
| Phi-4 | 70.4% | 82.6% | 16K | Apache 2.0 |
| Qwen3 32B | — | — | 131K | Apache 2.0 |
| Llama 4 Scout | 74.3% | — | 10M | Llama 4 |
| Hermes 3 70B | 47.2% | — | — | Llama 3.1 |
Phi-4's 70.4% MMLU-Pro at 14B is a standout result — Llama 4 Scout at 74.3% requires 17B active MoE parameters with a much larger infrastructure footprint. For tasks within 16K context, Phi-4 is the highest-knowledge-per-parameter open-weight model in its class.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "microsoft/phi-4"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
inputs = tokenizer("Explain Newton's third law:", return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))Specs from Microsoft's official Phi-4 release (December 2024) and Benchgen evaluations. Last updated 2026-07-24.
This model isn’t on any benchmark leaderboard yet.