LANGUAGE MODEL Microsoft Last updated:

Phi-4 Mini Instruct

Phi-4 Mini Instruct is an API model from Microsoft. It’s positioned for general text tasks—work that benefits from iteration, not just one-shot answers.

Intelligence
Below avg
Speed
Slow
44 tok/s output
Cost
Low
$0.08 in / $0.35 out
Context
128K
Up to 128,000 tokens
How are Intelligence, Speed & Cost bucketed?
Intelligence and Speed buckets are percentile ranks on Artificial Analysis. Cost buckets are fixed dollar thresholds keyed off output-token price ($/M out).
Intelligence
  • Top 1%≤ 1%
  • Top 5%≤ 5%
  • Top 10%≤ 10%
  • Good≤ 25%
  • Medium≤ 50%
  • Below avg> 50%
Speed
  • Top 1%≥ 345 tok/s
  • Top 5%≥ 237 tok/s
  • Top 10%≥ 196 tok/s
  • Good≥ 146 tok/s
  • Medium≥ 90 tok/s
  • Slow< 90 tok/s
Cost
  • Freeopen weights · self-host
  • Low< $1 / M out
  • Moderate$1–5 / M out
  • High≥ $5 / M out

Core Capabilities

Long Documents
Handles entire codebases, books, and multi-doc RAG.

Context Window

128k tokens
≈ 98 pages
4k Chat 聊天
32k Long docs 长文档
128k This model 本模型
400k Multi-doc 多文档
1M Codebase 整个代码库
10M

Availability

API
Available
Product / App
Not available
Open Source
Not released
Enterprise
Contact sales

Pricing Model

Free / self-host
Open weights — pay only for compute.
Self-host

Capability / Performance

Where this model sits relative to the middle 60% of models in the tree. All scores are 0–10 (higher is better).

Lower 20% Upper 80% This model
Reasoning
AA Intelligence Index · scaled to 10
1.7
5.6
1.2
Coding
SciCode · scaled to 10
1.8
4.3
1.1
Agentic tasks
Terminal-Bench Hard · scaled to 10
0.2
3.6
0.0
Context / memory
Context window size · log-scaled
6.0
9.0
6.0
Cost efficiency
Input price ($/M tokens) · cheaper scores higher
6.2
10.0
10.0
Lower 20% 20th percentile — 20% of models score below this This model Where the current model lands Upper 80% 80th percentile — only 20% of models score above this Percentile boundaries are computed across every model in the tree that reports the underlying benchmark for each capability.

What it feels like

  • 14B parameters that outperforms models 5x larger on math and reasoning — synthetic-data scaling laws in action
  • MMLU 84.8% (up from Phi-3's 77.9%); MATH 56.1% (up from 42.5%) — large quality jumps without size jump
  • HumanEval 82.6% — competitive with much larger frontier-tier models on Python code generation

Best use cases

  • On-device reasoning where larger models can't fit
  • Math, science, and code benchmarks at SLM cost
  • Self-hosted production where 14B inference is affordable on a single GPU

Tools to try

Not ideal for

  • Broad-knowledge factual QA — small models still have limited recall
  • Multimodal tasks (Phi-4 base is text-only; vision lives in Phi-4-multimodal)

Model Evolution

phi is Microsoft's language model family.

View full evolution tree →