# Phi (Microsoft)

> Canonical: https://skillalmanac.com/glossary/phi-models | Last verified: 2026-11-24 | Index status: not offered to search engines

Phi is a family of small language models published by Microsoft. A Phi-4-mini model card calls it a lightweight open model built on synthetic data and filtered publicly available websites.

Also called: Microsoft Phi, Phi model, Phi models, Phi-3, Phi-4.

## In plain language

Phi is a set of compact AI language models made by Microsoft. They are designed to be small enough to run on modest hardware, and the Phi-3 technical report title mentions running on a phone. Microsoft's model card describes Phi-4-mini-instruct as a lightweight open model built on synthetic data, meaning text generated for training, and on filtered public websites. Small models can handle simpler jobs on a laptop but may be wrong, so check results that matter. Read the licence on the model card of the exact model you use.

## Technical definition

Microsoft's Hugging Face model card for Phi-4-mini-instruct describes it as a lightweight open model built upon synthetic data and filtered publicly available websites, and says the model is licensed under the MIT license. Hugging Face's Transformers documentation quotes the Phi-3 technical report abstract, which says the innovation lies in the training dataset, composed of heavily filtered web data and synthetic data, and that the model is further aligned for robustness, safety and chat format. The same page says the architecture is very similar to Llama, so runtimes that support Llama-style models often adapt to it.

## How it shows up when you use agents

Phi matters to agent users as an example of a small model you can run yourself. When a guide says to point a coding agent at a local model on a laptop, a compact model such as Phi is a candidate, served by a local runtime such as [Ollama](/glossary/ollama). The agent still sends its prompts to a [language model](/glossary/small-language-model); the difference is that it runs on your own machine.

What breaks when this is misunderstood:

- **A small model is expected to match a large one.** Compact models can be a good fit for narrow tasks, but agent loops that need long planning may expose their limits. Test on your own task before relying on one.
- **The model does not fit.** Even small models need memory for weights and cache. Check fit with the [local-model-sizing](/skills/skill-almanac/local-model-sizing) skill.
- **The licence is assumed.** The Phi-4-mini-instruct card says MIT, but each model has its own card. Read the one you use.
- **Local is assumed private.** See the [self-hosting guide](/learn/self-hosted-ai-agent-considerations).

A sensible next step is to pick the model, read its card, then size it against your hardware.

## Common confusions

- **Phi versus Phi-3 or Phi-4.** Phi is the family. The numbers are generations, each with its own model card and terms.
- **Small versus weak.** Small describes size. How well a model does a task has to be measured on that task, not inferred from the word.
- **Synthetic data versus fake answers.** The model card says the training used synthetic data, meaning text generated for training. See [Synthetic data](/glossary/synthetic-data).
- **Open versus unrestricted.** Open describes access to the model. The licence on the card still sets the terms.

## Worked examples in this catalogue

### [local-model-sizing](https://skillalmanac.com/skills/skill-almanac/local-model-sizing)

```
Give the skill the model you want to run and the GPU, Mac or PC you have.
```

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A memory estimate for weights, KV-cache and overhead at each quantization level, produced by a script, so you can see whether a downloaded open-weight model will fit before you try it.

Why it exercises the concept: A small model still has to fit your memory. This skill is the check, and it shows how much headroom a compact model such as Phi leaves.

### [Self-Hosting an AI Agent: What You Take On](https://skillalmanac.com/learn/self-hosted-ai-agent-considerations)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The guide lists what you take on when the model and the agent run on your machine: model fit, network exposure, file reach, data flow and vetting skills.

Why it exercises the concept: Phi is aimed at modest hardware, which makes it a natural candidate for the self-hosted setup this guide covers.

### [hf-cli](https://skillalmanac.com/skills/huggingface/hf-cli)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The catalogue lists this skill under ai-ml-engineering without a description line, so read its page before relying on it.

Why it exercises the concept: Microsoft publishes Phi model cards on Hugging Face; this entry is the catalogue's Hugging Face command-line skill.

## Related terms

- [Small language model (SLM)](https://skillalmanac.com/glossary/small-language-model.md)
- [Synthetic data](https://skillalmanac.com/glossary/synthetic-data.md)
- [Open-weights model](https://skillalmanac.com/glossary/open-weights-model.md)
- [Self-hosted LLM](https://skillalmanac.com/glossary/self-hosted-llm.md)
- [Ollama](https://skillalmanac.com/glossary/ollama.md)
- [Edge AI](https://skillalmanac.com/glossary/edge-ai.md)

## Sources

- [microsoft/Phi-4-mini-instruct](https://huggingface.co/microsoft/Phi-4-mini-instruct), Microsoft (Hugging Face model card) (accessed 2026-11-24)
- [Phi-3](https://huggingface.co/docs/transformers/model_doc/phi3), Hugging Face (Transformers documentation) (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-24. [Glossary index](https://skillalmanac.com/glossary.md).
