- input
- $0.07
- output
- $0.14
- Context
- 16Ktokens
- Released
- 1y ago
- Size
- 14Bparameters
Cost/1M tokens
Phi-4 is an open-weight text-generation model from Microsoft whose training data extends that used for Phi-3, and which later variants including Phi-4-mini, Phi-4-multimodal, and Phi-4-reasoning were built on. Microsoft announced it as its newest small language model, one specializing in complex reasoning. The model card positions it for reasoning-focused text tasks such as math, coding, and general knowledge, drawing on curated and synthetic textbook-like training data.
- Language model
- Open weights · 14B
- Structured output
How it compares
Score vs. costArena Text
Each model at its best score · Dashed: the best score at each cost
- Microsoft AI
- Moonshot AI
- Thinking Machines Lab
- Z.ai
- OpenAI
- Google DeepMind
- Meta
- Anthropic
- Xiaomi
- IBM
Small14BAn open-weight model of 5 to 25 billion parameters, the size that runs on a single consumer GPU.
Open models of a similar size from other labs
Add the models you use to see how this one compares.
Sign inFamily tree
Models trained from one another, as their makers describe it.
- Phi 4Microsoft AI · 2024
Additional source evidence
- Source model
- microsoft/phi-4
- Source family
- phi
- Last updated
- 2024-12-12
- Knowledge cutoff
- 2024-06
- Model context
- 16K
- Model output limit
- 16K
- Open weights
- Yes
- File attachments
- No
- Reasoning
- No
- Tool calling
- No
- Temperature control
- Yes
Downloadable weights
Complete source record (JSON)
{
"id": "microsoft/phi-4",
"name": "Phi-4",
"description": "Compact Microsoft model trained on synthetic data for reasoning, math, and coding in English",
"family": "phi",
"last_updated": "2024-12-12",
"knowledge": "2024-06",
"attachment": false,
"reasoning": false,
"tool_call": false,
"temperature": true,
"modalities": {
"input": [
"text"
],
"output": [
"text"
]
},
"limit": {
"context": 16384,
"output": 16384
},
"release_date": "2024-12-12",
"open_weights": true,
"license": "MIT",
"weights": [
{
"label": "Hugging Face",
"url": "https://huggingface.co/microsoft/phi-4"
}
]
}Frequently asked questions
Running locally
By our estimate, Phi 4 needs about 11 GB at Q4, 18.9 GB at Q8 and 33.8 GB at FP16 of VRAM. That covers the weights plus headroom for a short context, and longer contexts need more.
Yes, by our estimates Phi 4 fits on a 12 GB GPU at Q4 (about 11 GB) and at higher precision on larger cards. It does not fit fully on 8 GB GPUs.
Yes, a Mac with at least 16 GB of unified memory should run Phi 4 at Q4, which needs an estimated 11 GB. This assumes macOS gives the GPU about 75% of unified memory.
The smallest 4-bit or higher build of Phi 4 is phi4:latest (Q4_K_M), a 9.1 GB download that needs an estimated 11 GB of VRAM. Lower-bit builds are smaller but are not the ones we suggest.
Run ollama run phi4:latest to download and start Phi 4 in Ollama (9.1 GB). There are 2 other Ollama builds with different sizes and quantizations.
Vertical Tabs records support for Phi 4 in Ollama. It also has published Ollama builds.
The default Ollama build, phi4:latest, is a 9.1 GB download. Across 3 builds, sizes range from 9.1 GB to 29 GB.
API and pricing
Phi 4 is listed at $0.07 per 1M input tokens and $0.14 per 1M output tokens. Input prices across 2 providers range from $0.056 to $0.07 per 1M tokens.
DeepInfra has the lowest blended price for Phi 4 (3:1 input to output), at $0.056 per 1M input tokens and $0.112 per 1M output tokens.
A request with 10,000 input tokens and 1,000 output tokens costs about $0.000672 with Phi 4 at the cheapest provider, DeepInfra.
1 of 1 tracked Phi 4 endpoints had 99% uptime or better over the last day. The best was DeepInfra at 100.0%.
Privacy and data
DeepInfra offers zero data retention for Phi 4, so prompts are not stored after the request.
Yes, Phi 4 has open weights, so you can run it on your own hardware and keep prompts on your own machines. The quickest start is ollama run phi4:latest.
Capabilities and specs
Phi 4 has a 16K token context window. It can write up to 15K output tokens per response.
No, Phi 4 takes text input only.
No, Phi 4 is not listed with tool calling support.
Yes, Phi 4 supports structured output, so responses can be constrained to JSON.
No, Phi 4 is not listed with a reasoning mode.
Phi 4 has a knowledge cutoff of 2024-06-30, so it does not know about later events unless you provide them.
Quality and benchmarks
Phi 4 ranks #331 on Arena Text, using Arena's published ranks.
Similar models from other labs include Command R7B (12-2024) (Cohere), Mistral Small 3 (Mistral AI) and Gemma 3 27B (Google DeepMind). They are the closest matches by kind, price and release date.
Command R7B (12-2024)Phi 4 vs Command R7B (12-2024)Mistral Small 3Phi 4 vs Mistral Small 3Gemma 3 27BPhi 4 vs Gemma 3 27B
Versions and lineage
Phi 4 has a 16K token context window, versus 128K for Phi-4-mini.
Licensing and access
Phi 4 has open weights under the MIT license, so you can download and run it yourself.
Yes, Phi 4 is released under the MIT license, which allows commercial use. Check the license text for attribution terms.
The Phi 4 weights are on Hugging Face at microsoft/phi-4. There are also 3 Ollama builds.
Basics
Phi 4 was made by Microsoft AI. It was released on December 12, 2024.
Yes, Phi 4 has open weights, so you can run it on your own hardware without API fees. Paid API access is listed at $0.07 per 1M input tokens and $0.14 per 1M output tokens.
Generated from Vertical Tabs data, updated November 29, 2026.

Discussion
No comments yet
Be the first to share your thoughts.