What is Phi-4-mini-instruct?
Phi-4-mini-instruct is a 3.8B dense decoder-only model from Microsoft and the small text model of the Phi-4 family. Microsoft trained it on 5 trillion tokens of synthetic and filtered public web data weighted toward reasoning-dense material, then post-trained it with supervised fine-tuning and direct preference optimization for instruction following. It shipped in February 2025 under the MIT license, and it is one of the easiest open models to run locally: the Q4_K_M build is 2.49 GB.
| Specification | Phi-4-mini-instruct |
|---|---|
| Parameters | 3.8B (3,836,021,760) |
| Architecture | Dense decoder-only Transformer |
| Attention | Grouped-query attention, flash attention by default |
| Embeddings | Input and output embeddings shared |
| Vocabulary | 200,064 tokens, spare slots for fine-tuning |
| Context window | 128K tokens |
| Modalities | Text input, text output |
| Languages | 23 supported, Arabic to Ukrainian |
| Function calling | Supported, tools declared as JSON in the system prompt |
| Training data | 5T tokens, cutoff June 2024 |
| Training run | 512 A100-80G GPUs, 21 days, late 2024 |
| Post-training | Supervised fine-tuning, direct preference optimization |
| Release date | February 2025 |
| License | MIT |
The 200K vocabulary, grouped-query attention and shared input and output embeddings are the three architecture changes Microsoft names over Phi-3.5-mini; the larger vocabulary is there for multilingual coverage across the 23 languages. The corpus was curated rather than scraped: public documents were filtered to a preferred level of knowledge, with trivia dropped to leave capacity for reasoning, then decontaminated by n-gram matching against the benchmarks. Microsoft is also direct about the limit of the size: a 3.8B model cannot store much factual knowledge, so the card itself recommends pairing it with a search engine or RAG when facts matter.
Phi-4-mini-instruct benchmarks
Microsoft published its own comparison, run on an internal benchmark platform, against instruct models of similar size, including the predecessor Phi-3.5-mini, plus Qwen2.5-7B from its 2x size class:
| Benchmark | Phi-4-mini-instruct | Phi-3.5-mini | Llama-3.2-3B | Qwen2.5-3B | Qwen2.5-7B |
|---|---|---|---|---|---|
MMLU General knowledge | 67.3 | 65.5 | 61.8 | 65.0 | 72.6 |
MMLU-Pro Academic knowledge | 52.8 | 47.4 | 39.2 | 44.7 | 56.2 |
BigBench Hard Hard reasoning | 70.4 | 63.1 | 55.4 | 56.2 | 72.4 |
ARC Challenge Science reasoning | 83.7 | 84.6 | 76.1 | 82.6 | 90.1 |
TruthfulQA Grounded reasoning | 66.4 | 65.2 | 59.2 | 64.3 | 69.4 |
GSM8K Grade-school math | 88.6 | 76.9 | 75.6 | 80.6 | 88.7 |
MATH Competition math | 64.0 | 49.8 | 46.7 | 61.7 | 60.4 |
MGSM Multilingual math | 63.9 | 49.6 | 44.6 | 53.5 | 64.5 |
Against models its own size it takes seven of these eight rows, widest in math: 88.6 on GSM8K and 64.0 on MATH. Only ARC Challenge goes the other way, 83.7 against 84.6. Qwen2.5-7B leads at almost twice the parameters, but the mini takes MATH outright and is within a point on GSM8K and MGSM.
Across the full 17-benchmark table Microsoft reports an overall average of 63.5, against 60.5 for Phi-3.5-mini and 56.2 for Llama-3.2-3B. Its own summary is that the 3.8B model "achieves a similar level of multilingual language understanding and reasoning ability as much larger models", and it names three target uses: constrained memory and compute, latency bound scenarios, and reasoning that leans on math and logic. The rows outside the table show the cost against Phi-3.5-mini: 69.1 on HellaSwag against 72.2, 67.0 on Winogrande against 72.2, and 49.3 on Multilingual MMLU against 51.8.
Phi-4-mini-instruct hardware requirements
The system requirement to check is memory. The GGUF builds below are published as unsloth/Phi-4-mini-instruct-GGUF, and even the full-precision file is small by local-model standards:
| Memory | Build to pick | File size |
|---|---|---|
| 2 GB | Q2_K | 1.68 GB |
| 3 GB | Q3_K_M | 2.12 GB |
| 4 GB | Q4_K_M | 2.49 GB |
| 5 GB | Q5_K_M | 2.85 GB |
| 6 GB | Q6_K | 3.16 GB |
| 8 GB | Q8_0 | 4.08 GB |
| 16 GB and up | BF16 | 7.68 GB |
The quantized builds sit less than a gigabyte apart, so when two of them fit, take the larger one. That matters most at the bottom: Q2_K saves only 0.81 GB over Q4_K_M, and Q2_K_L in the same repo is the same 1.68 GB, so take the 2-bit files only on a machine that cannot spare 4 GB.
To run the original weights, Microsoft names vLLM 0.7.3 or newer and Transformers 4.49.0, both with torch 2.5.1 and flash_attn 2.7.4.post1, and its sample scripts decode greedily at temperature 0.0. Flash attention is on by default and needs a recent NVIDIA card: A100, A6000 and H100 are the tested ones, V100 or older needs attn_implementation set to eager. If the format is new to you, start with what GGUF is, and see the best local LLMs for a 16 GB Mac for what else fits alongside it.
How to run Phi-4-mini-instruct in Atomic Chat
Atomic Chat is a free local app for macOS, Windows and Linux. It includes a Hugging Face model browser and a built-in chat, with no manual llama.cpp build required.
- Download Atomic Chat for your platform and open it.
- Search for Phi-4-mini-instruct in the model browser and open Download Options.
- Pick the build that fits the memory you have, then start a chat.
For the rest of the family, see every Phi model you can run locally, or the full-size Phi-4.
Phi-4-mini-instruct license
Phi-4-mini-instruct is released under the MIT license, one of the most permissive licenses an open model ships with. It permits commercial use, modification and redistribution with no royalties, so you can build products on top of it and run it on your own hardware without a usage fee. Microsoft states one carve-out separately: the grant covers the model, not its trademarks and logos, so modified versions must not imply Microsoft sponsorship.
