Overview
Phi-4-mini-instruct is a 3.8-billion-parameter open language model released by Microsoft in February 2025 as part of the Phi-4 family.
- License: MIT (commercial use allowed)
- Parameters: 3.8B dense decoder-only
- Context length: 128K tokens
- Languages: 24 languages
- Minimum hardware: ~4 GB VRAM (4-bit), runs on an 8 GB GPU
- Strengths: math, reasoning, instruction following, function calling
Highlights
- 3.8B lightweight model — part of the Phi-4 family, built from synthetic and filtered public web data.
- 128K context — dense decoder-only design handling long inputs.
- SFT + DPO alignment — supervised fine-tuning plus direct preference optimization for reliable instruction following.
- Reasoning-dense & multilingual — strong math and logic, with support for 24 languages and function calling.
What it's good at
For its size, Phi-4-mini-instruct is strong at math and structured reasoning. It scores 88.6 on GSM8K (8-shot CoT) and 64.0 on MATH, beating several larger 7B-9B models on those tasks, and reaches 70.4 on BigBench Hard. It handles 24 languages, follows instructions reliably thanks to supervised fine-tuning plus direct preference optimization, and adds proper function calling, where tools are declared as JSON in the system prompt. Microsoft is candid about the trade-off: a 3.8B model cannot store much factual knowledge, so it can be factually wrong on long-tail topics. Pairing it with retrieval (RAG) is the recommended fix.
Running locally
The small size makes local deployment easy. A 4-bit quantized build needs around 3 to 4 GB of VRAM, so it fits comfortably on an 8 GB consumer GPU, and the full-precision weights sit near 8 to 9 GB. It runs through Hugging Face transformers, vLLM, llama.cpp, and Ollama (as phi4-mini). The default transformers path uses flash attention and expects an Ampere-class or newer card; on V100 or older GPUs, load it with attn_implementation set to eager. Python 3.8 or 3.10 is recommended for the reference setup.
License
Phi-4-mini-instruct is released under the MIT license. That allows commercial and research use, modification, and redistribution with attribution and almost no other restrictions, which makes it one of the more permissive options among small instruct models.
