Phi 4
by Microsoft · Dec 12, 2024
Phi 4 is an open-weight chat llm from Microsoft, released Dec 12, 2024. It has 15B parameters and a 16K-token context window. API pricing starts at $0.07 per million input tokens and $0.14 per million output tokens. It scores 129.2 on the Epoch Capabilities Index.
- Provider
- Microsoft
- Released
- Dec 12, 2024
- Type
- Chat LLM
- Parameters
- 15B
- Context window
- 16,384 tokens
- Max output
- 14,745 tokens
- Input
- text
- Output
- text
- Weights
- Open weights
- License
- mit
- Knowledge cutoff
- —
- Status
- Available via API
- Training compute
- 9.3e+23 FLOP
- HF downloads (30d)
- 163.7K
About Phi 4
[Microsoft Research](/microsoft) Phi-4 is designed to perform well in complex reasoning tasks and can operate efficiently in situations with limited memory or where quick responses are needed. At 14 billion...
Phi 4 benchmarks
All benchmarks →- Epoch Capabilities Index129.2
- GPQA Diamond56.1%
- OTIS Mock AIME13.8%
- MATH Level 564.9%
- LiveBench41.6%
- MMLU84.8%
Scores from the Epoch AI Benchmarking Hub (best reported setting). ECI = Epoch Capabilities Index.
Where to run Phi 4 — API providers & pricing
| Provider | Input $/1M | Output $/1M | Cached input | Context |
|---|---|---|---|---|
| OpenRouter | $0.07 | $0.14 | — | 16K |
Open weights: you can also run Phi 4 locally with Ollama, LM Studio, llama.cpp or vLLM, from Hugging Face.
Phi 4 vs alternatives
- Phi 4 vs GPT-4.1 nano
- Phi 4 vs Llama 4 Scout
- Phi 4 vs Qwen2-72B
- Phi 4 vs Llama-3.3-70B-Instruct
- Phi 4 vs Anthropic: Claude 3.5 Sonnet v2
- Phi 4 vs Qwen Max
| Model | Provider | Released | Params | Context | Input $/1M | Output $/1M | ECI |
|---|---|---|---|---|---|---|---|
| GPT-4.1 nano | OpenAI | Apr 2025 | — | 1M | $0.1 | $0.4 | 126.8 |
| Llama 4 Scoutopen | Meta | Apr 2025 | 109B | 320K | $0.1 | $0.3 | 127.8 |
| Qwen2-72Bopen | Alibaba (Qwen) | Jun 2024 | 73B | — | — | — | 122.3 |
| Llama-3.3-70B-Instructopen | Meta | Dec 2024 | 71B | 128K | $0.71 | $0.71 | 126.2 |
| Anthropic: Claude 3.5 Sonnet v2 | Anthropic | Oct 2024 | — | 200K | $2.60 | $13 | 130.0 |
| Qwen Max | Alibaba (Qwen) | Apr 2024 | — | 32K | $1.60 | $6.40 | 131.2 |
| Anthropic: Claude 3.5 Haiku | Anthropic | Oct 2024 | — | 200K | $0.68 | $3.40 | 124.8 |
| Mistral Medium 3 | Mistral AI | May 2025 | — | 128K | $0.4 | $2 | 132.8 |
More models from Microsoft
All Microsoft models →| Model | Released | Params | Context | Input $/1M | Output $/1M |
|---|---|---|---|---|---|
| Phi-2open | Dec 2023 | 2.8B | — | — | — |
| Phi-1.5open | Sep 2023 | 1.4B | — | — | — |
| Phi 4 Miniopen | Feb 2025 | 3.8B | 8K | $0.17 | $0.68 |
| Florence-2-baseopen | Jun 2024 | 232M | — | — | — |
| harrier-oss-v1-0.6bopen | Mar 2026 | 596M | — | — | — |
| harrier-oss-v1-270mopen | Mar 2026 | 268M | — | — | — |
| Phi-4-reasoning-vision-15Bopen | Jan 2026 | 15B | — | — | — |
| Phi-4-mini-reasoningopen | Apr 2025 | 3.8B | — | — | — |
Frequently asked questions
Who made Phi 4?
Phi 4 was developed by Microsoft (United States of America). It was released on Dec 12, 2024.
What is the context window of Phi 4?
Phi 4 supports a context window of 16,384 tokens (16K) and can generate up to 14,745 output tokens per response.
How much does Phi 4 cost?
Phi 4 costs $0.07 per 1M input tokens and $0.14 per 1M output tokens. Prices vary across the 1 providers that serve it.
Is Phi 4 open source?
Yes. Phi 4's weights are publicly available under the mit license on Hugging Face (microsoft/phi-4), so you can download and run it yourself.
How many parameters does Phi 4 have?
Phi 4 has 15B parameters.
How does Phi 4 perform on benchmarks?
Phi 4 scores 56.1% on GPQA Diamond, 64.9% on MATH Level 5, 13.8% on OTIS Mock AIME and 41.6% on LiveBench.
Where can I use Phi 4?
Phi 4 is available via 1 API provider, and you can also self-host it with tools like vLLM, Ollama or LM Studio.
Sources: epoch, huggingface, openrouter · paper · huggingface · openrouter. Last updated 2026-11-22.