Skip to content
llmmodels
Chat LLMOpen weightsStructured output

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 →

Scores from the Epoch AI Benchmarking Hub (best reported setting). ECI = Epoch Capabilities Index.

Where to run Phi 4 — API providers & pricing

ProviderInput $/1MOutput $/1MCached inputContext
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

Alternatives to Phi 4
ModelProviderReleasedParamsContextInput $/1MOutput $/1MECI
GPT-4.1 nanoOpenAIApr 2025—1M$0.1$0.4126.8
Llama 4 ScoutopenMetaApr 2025109B320K$0.1$0.3127.8
Qwen2-72BopenAlibaba (Qwen)Jun 202473B———122.3
Llama-3.3-70B-InstructopenMetaDec 202471B128K$0.71$0.71126.2
Anthropic: Claude 3.5 Sonnet v2AnthropicOct 2024—200K$2.60$13130.0
Qwen MaxAlibaba (Qwen)Apr 2024—32K$1.60$6.40131.2
Anthropic: Claude 3.5 HaikuAnthropicOct 2024—200K$0.68$3.40124.8
Mistral Medium 3Mistral AIMay 2025—128K$0.4$2132.8

More models from Microsoft

All Microsoft models →
ModelReleasedParamsContextInput $/1MOutput $/1M
Phi-2openDec 20232.8B———
Phi-1.5openSep 20231.4B———
Phi 4 MiniopenFeb 20253.8B8K$0.17$0.68
Florence-2-baseopenJun 2024232M———
harrier-oss-v1-0.6bopenMar 2026596M———
harrier-oss-v1-270mopenMar 2026268M———
Phi-4-reasoning-vision-15BopenJan 202615B———
Phi-4-mini-reasoningopenApr 20253.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.