← Back to LLM Wiki
LLM Wiki · Open Weights · Self-Hostable

Phi

Microsoft Research's small-language-model family. "Textbooks are all you need" — competitive reasoning performance at 1B–14B parameters.
Phi exists to test the hypothesis that curated training data beats raw scale. The result: a family of 1B to 14B parameter models that punch two weight classes above their size on reasoning benchmarks, shipped under MIT license, and small enough to run on phones, Raspberry Pis, and edge devices where Llama and Qwen don't fit.
Microsoft Open Weights Small Model MIT License Edge

Quick Facts

Vendor
Microsoft Research
Released
Phi-1 (June 2023); Phi-2 (December 2023); Phi-3 (April 2024); Phi-4 (December 2024)
Current line
Phi-4 · Phi-4-mini · Phi-3.5 (mini, MoE, vision)
License
MIT (recent releases)
Hosting
Self-hosted (vLLM, Ollama, ONNX Runtime); Azure AI; available on-device
Context window
128K tokens
Modalities
Text; vision (Phi-3.5-vision)
Training approach
Heavy reliance on curated and synthetic "textbook-quality" data

Summary

Phi started in 2023 as a Microsoft Research experiment — the paper "Textbooks Are All You Need" argued that training on carefully curated, high-quality data could produce small models that outperform much larger ones trained on web-scale noise. The hypothesis held up. Phi-4 (14B) routinely ranks alongside 70B-class open-weights models on reasoning and math benchmarks, and Phi-4-mini (3.8B) holds its own against 7B–8B peers.

For infrastructure teams, Phi's niche is edge and on-device. When you need reasoning capability on a phone, a Raspberry Pi, or inside a mobile app, Phi is often the highest-quality option that fits. MIT licensing removes the scale restrictions that ship with Llama.

Model Lineup

Where Phi Fits

Phi is the default when size constraints are hard — mobile apps, on-device inference, Raspberry Pi class hardware, low-latency classification. It's also a strong pick for cost-sensitive self-hosted workloads where a 14B model with reasoning can replace a 70B tier without material quality loss. For consumer-facing chat, Phi's distinctive training data profile can produce unusual refusals or stilted prose — stock Llama or Qwen is often a better feel.

Tradeoffs

Deployment Notes

Within the Claw ecosystem, Phi-4 and Phi-4-mini are strong fits for PicoClaw and ZeroClaw — the ultra-small-footprint runtimes that target embedded hardware and minimal deployments. ONNX Runtime support makes Phi particularly convenient for cross-platform edge deployments. For standard Mac Mini edge nodes in OpenClaw, Qwen3 or Hermes is usually preferred; Phi wins when the deployment envelope shrinks below a laptop.

References

  1. Microsoft — Phi
  2. Microsoft on Hugging Face
  3. Textbooks Are All You Need
  4. Edge Compute Economics — Organized AI