Models

Phi Models: Microsoft's Small Open Models Compared

Checked 2026-10-31

Loading poll...

Phi is Microsoft's family of small open models. The Phi-4 generation runs from the 3.8 billion parameter Phi-4-mini-instruct to the 15 billion parameter Phi-4-reasoning-vision-15B, all under the MIT licence with weights on Hugging Face. They are cheap to run and strong for their size at reasoning, but short on context: 16K tokens for Phi-4 and the vision model. Checked on 31 October 2026.

The Phi-4 family at a glance

Model

Parameters

Context

Inputs

Licence

Release

Phi-4-mini-instruct

About 3.8B

128K

Text

MIT

February 2025

Phi-4-multimodal-instruct

About 5.6B

128K

Text, image, audio

MIT

February 2025

Phi-4

14B

16K

Text

MIT

12 December 2024

Phi-4-reasoning

About 14.7B

32K

Text

MIT

30 April 2025

Phi-4-reasoning-vision-15B

15B

16,384

Text, image

MIT

4 March 2026

Parameter counts for the mini, multimodal and reasoning models come from the Hugging Face hub's metadata and are rounded. The 14B, 15B, context and release facts are from each model card. Phi-4-multimodal-instruct takes text, image and audio inputs and produces text. Its card lists text support in 23 languages, vision in English only, and audio in eight languages (English, Chinese, German, French, Italian, Japanese, Spanish and Portuguese).

The hub also lists ONNX builds, a GUI-grounding model called Phi-Ground, and more recent Microsoft uploads with other names. We did not find a newer general Phi language model than the ones above, but Microsoft's hub moves quickly, so check it before you choose.

Maker, licence and open weights

Microsoft makes Phi, and the weights are published under the MIT licence on every Phi-4 card we checked. That is as permissive as licences get for model weights: commercial use, modification and redistribution with the licence notice. There is no revenue threshold, attribution banner or military-use clause of the kind that appears in some custom licences. We check that against the stricter terms of MiniMax and Llama on our open source LLM overview.

The cards still carry responsible-use language. Microsoft says the models may produce inaccurate or inappropriate output, that developers should assess high-risk scenarios, and that the models are trained mainly on English text. Those are advice, not licence terms, but a regulated business should read them. The vision model's card also names Microsoft Ireland Operations Limited as its authorized representative, which is a detail from European compliance rules and not a licence term.

Context window and modalities

This is where Phi shows its size.

  • Phi-4, 16K. About 12,000 words, using the usual rule of thumb of 750 words to 1,000 tokens. Enough for a file or two, not a repository.
  • Phi-4-reasoning, 32K. Longer, so it can hold a reasoning trace plus a prompt.
  • Phi-4-mini-instruct and multimodal, 128K. The long-context members of the family.
  • Phi-4-reasoning-vision-15B, 16,384. Short, and it spends many of those tokens on pictures: the card says its dynamic-resolution encoder can use up to 3,600 visual tokens for one image.

For the reasoning-vision model, the cards describe a single model with two modes. It can think with extended chain-of-thought blocks for maths and science, or answer directly for perception tasks such as captioning and grounding, and you can force either mode by appending a token to the generation template. That is a practical feature: you pick cost per request.

What each model is for

Model

Microsoft's stated focus

Phi-4

Accelerating research on language models and a building block for generative AI features, primarily in English

Phi-4-reasoning

Reasoning, with maths, science and code evaluations on its card

Phi-4-mini-instruct

Lightweight, reasoning-dense, long context, precise instruction following

Phi-4-multimodal-instruct

Mixed text, vision and audio in one small model

Phi-4-reasoning-vision-15B

Visual reasoning over documents, charts and diagrams, and computer-use agent tasks such as locating buttons on a screen

Note the last row. A computer-use agent has to look at a screen and decide where to click. Microsoft lists that as one of two primary uses of the reasoning-vision model, and prints GUI-grounding results on the card. It is not a coding model, though. None of these cards position Phi as an agentic software engineering model.

Vendor-reported scores

The reasoning-vision card carries a model-index block with these accuracy figures. They are Microsoft's, reported on its own card, and we have not rerun them.

Benchmark (vendor-reported)

Phi-4-reasoning-vision-15B

AI2D

84.8

ChartQA

83.3

MathVista (mini)

75.2

MMMU

54.3

OCRBench

76.0

ScreenSpot-V2

88.2

Source: the Hugging Face model card for microsoft/Phi-4-Reasoning-Vision-15B, vendor-reported. These are vision and GUI benchmarks, so they say little about writing code. We found no SWE-bench or Terminal-Bench figure for Phi on the cards. Phi-4-reasoning's card reports AIME, GPQA-Diamond and LiveCodeBench for its reasoning evaluation, and we leave the numbers to the card.

Hardware needs

For a rough floor, multiply parameters by bytes per value. At 16-bit that is two bytes. This covers weights only. The runtime cache for a long prompt takes more.

Model

16-bit weights, by our arithmetic

Note

Phi-4-mini-instruct, 3.8B

About 7.7 GB

Fits a 16 GB laptop or an 8 GB-plus GPU with quantisation

Phi-4-multimodal-instruct, 5.6B

About 11.1 GB

A 16 GB GPU is comfortable

Phi-4, 14B

About 28 GB

Needs a 32 GB-plus GPU or a 4-bit build

Phi-4-reasoning, 14.7B

About 29.3 GB

Same class

Phi-4-reasoning-vision-15B

About 30 GB

Card recommends vLLM at bf16

The reasoning-vision card says it was tested on NVIDIA A6000, A100, H100 and B200 GPUs on Ubuntu, and that other GPUs with enough memory should work but were not tested. It lists torch 2.7.1 or later, transformers 4.57.1 or later and vLLM 0.15.2 or later as requirements. A 4-bit build roughly quarters the size, at some quality cost. The Ollama library lists quantised Phi builds, for example phi4 at 9.1 GB for the 14B model.

If you run models locally, our comparisons of Ollama and LM Studio, llama.cpp and Ollama and Ollama and vLLM cover the tools. For renting a GPU instead, see Runpod and Lambda, and cloud versus self-hosted AI for the maths.

How the models relate

Phi is not five unrelated models. The cards show a lineage, and knowing it helps you pick.

Phi-4 is the base 14 billion parameter dense decoder-only Transformer, trained on a cluster of 1,920 H100 GPUs, per its card. Phi-4-reasoning is a fine-tune of that line, with longer context at 32K. The vision model's card names Phi-4-reasoning as its model dependency, so Phi-4-reasoning-vision-15B reuses the reasoning model as its language backbone and adds the SigLIP-2 vision encoder. The mini and multimodal models are separate, smaller builds, and they are the only ones with a 128K window.

The practical reading is that the reasoning behaviour you see in the vision model comes from the reasoning model, and the vision model adds eyes at a cost of a short window. If you only need text, the plain reasoning model is the better fit. If you need to read an image, you accept 16K.

Running Phi-4-mini on your own machine

The shortest path for a laptop is a local runner. The command below is the common pattern for Ollama, shown as an illustration. Check the model name in Ollama's library before you run it, because names change.

ollama run phi4-mini

The Ollama library carries phi4 (14B, 9.1 GB, 16K context), phi4-mini, phi4-reasoning, phi4-mini-reasoning, phi3, phi3.5 and phi. With vLLM, the vision card recommends serving at bf16 and lists the minimum package versions. With llama.cpp you would use a GGUF build, which is a community or vendor-converted file. Whichever tool you pick, test three things before you trust it: the answer quality on your own prompts, the speed in tokens per second on your hardware, and the memory use at the context length you actually need. A 128K window on paper still needs memory for the cache.

When a small model is enough

Small models are a good fit when the task is narrow, repetitive and cheap to check. They are a poor fit when the task needs broad knowledge or long planning. Use this list as a first filter.

  • Good fit: classifying support requests, extracting fields from a form, summarising a short diff, drafting a commit message, answering questions about a short document, reading a chart image, locating a button on a screenshot.
  • Weak fit: multi-file refactors, long debugging sessions, anything that needs a repository in context, or tasks where a wrong answer is expensive and hard to catch.
  • Pattern that works: a larger model plans and a small model runs the narrow steps. We explain the split in subagents versus skills.

Cost is the usual reason to go small, and for local use the cost is electricity and your own time. Hosted small models are also cheap per token, but we did not find a Microsoft price on the cards, so we give no number. The comparison to run is price per passing task, not price per token. A small model that fails half the time and needs a retry loop can cost more in total than a bigger model that passes first time.

Customising Phi

The MIT licence allows fine-tuning and redistribution of the result with the licence notice. Small models are the usual choice for fine-tuning because the training run is affordable on a few GPUs. The cards describe supervised fine-tuning and, for some models, preference optimisation in Microsoft's own post-training. If you fine-tune, keep your own evaluation set, since a tuned small model can lose general skills while it gains narrow ones.

Where it is served

The reasoning-vision card links Microsoft Foundry as a hosted route and Hugging Face for the weights, and the other cards describe distribution through Azure and open repositories. Because the weights are MIT-licensed, any host that runs open models can serve them. Check Hugging Face Inference, Replicate, Cloudflare Workers AI and AWS Bedrock for current catalogues. For the broader hosting picture, see AI hosting.

Coding agents that can use it

Phi models are not the default for any coding agent we cover. Short context is the main obstacle: agent loops carry tool definitions, file contents and history, and 16K disappears fast. Still, a small local model has a place in an agent setup, for cheap tasks such as classifying a request, summarising a diff or drafting a commit message, while a larger model does the hard work. Agents that accept a local endpoint can use Phi through Ollama or vLLM, for example Aider, Cline and OpenCode. The Ollama library describes phi4-mini as supporting function calling; check each model's page before relying on tools.

If your goal is a local coding model, look at the best open source LLM for coding first.

Privacy

Running Phi on your own machine keeps prompts and code local. Nothing leaves your hardware unless you send it. If you use Microsoft Foundry instead, Microsoft's terms apply, and you should read them for data retention and training use. For regulated work, local use of an MIT-licensed model is one of the simplest data-handling stories available.

Limits and gotchas

  • Short context. 16K on Phi-4 and the vision model.
  • English first. Cards say performance degrades in other languages.
  • Not agentic coders. Positioned for reasoning, vision and small footprints.
  • Vision tokens are expensive. One image can use up to 3,600 tokens of the 16K window.
  • Mode tokens. The vision model's think and no-think tokens change cost and behaviour per request.
  • Software versions. The vision model needs recent torch, transformers and vLLM.

Our take

Pick Phi when size matters more than ceiling. Phi-4-mini-instruct is a sensible free model for a laptop, and its 128K window is the longest in the family. Phi-4-reasoning-vision-15B is the interesting new one if you build anything that reads screens or charts. Do not pick Phi to drive a coding agent. A 16K window and no published agent benchmark are two facts that make that a poor bet, and larger open models such as Qwen, DeepSeek and gpt-oss are better documented for it.

The MIT licence is the strongest argument for Phi in a commercial product. There are no strings, and that is worth something when your legal team is tired of reading custom licences.

Who should pick it

You are

Verdict

Running a model on a laptop

Phi-4-mini-instruct

Building a screen-reading or chart-reading feature

Phi-4-reasoning-vision-15B

Needing the cleanest commercial licence

Phi, with MIT on every model we checked

Building a coding agent

Look elsewhere, at larger open models

Needing long context

Phi-4-mini-instruct at 128K, or a larger family

Related pages

Questions

Are Phi models open source?

The weights are public on Hugging Face under the MIT licence for the Phi-4 models we checked: Phi-4, Phi-4-reasoning, Phi-4-mini-instruct, Phi-4-multimodal-instruct and Phi-4-reasoning-vision-15B.

What is the latest Phi model?

Phi-4-reasoning-vision-15B, released 4 March 2026, a 15 billion parameter model that takes text and images and writes text. Its Hugging Face card lists a 16,384-token context.

Can Phi run on a laptop?

The 3.8 billion parameter Phi-4-mini-instruct has about 7.7 GB of weights in 16-bit form by our arithmetic, which fits many laptops. The 14 to 15 billion parameter models need about 29 to 30 GB at 16-bit, or a quantised build.

Is Phi good for coding agents?

Microsoft positions these models for memory and compute-constrained settings and reasoning, not agentic coding. Their short context windows, 16K for Phi-4 and the vision model, limit agent use.

How much does Phi cost?

The weights are free to download. Hosted per-token prices depend on the host, and we did not find a Microsoft price for them on the model cards.

Loading poll...

Sources

  1. huggingface.co/microsoft/Phi-4-reasoning-vision-15B
  2. huggingface.co/microsoft/phi-4
  3. huggingface.co/microsoft/Phi-4-reasoning
  4. huggingface.co/microsoft/Phi-4-mini-instruct
  5. huggingface.co/microsoft/Phi-4-multimodal-instruct
  6. ollama.com/search?q=phi

Part of the Wbcom Designs family

The all-in-one WordPress community stack

Also ours: wbcomdesigns.comvapvarun.combrndle.com