Phi-4 Mini Instruct is Microsoft's 3.8B model from February 2025, released under the MIT licence. It has a 128K tokens token context window, a large 200K-word vocabulary for many languages, and supports function calling.
At Q4_K_M it needs about 4.0 GB with an 8K conversation, so it runs on laptops, 4 to 6GB GPUs and 8GB Macs.
ollama run phi4-mini:3.8bLast reviewed · How we calculate
phi4-mini:3.8bThe upright line marks the memory your device can give the model. Everything left of it runs on the GPU.
At Q4_K_M the longest conversation this device can hold is about 35K tokens.
Total memory for weights, conversation cache and runtime. Pick the row your card can hold at the length you need.
| Quantization | File size | 4K | 8K | 16K | 32K | Quality |
|---|---|---|---|---|---|---|
| Q4_K_Mrecommended | 2.3 GB | 3.5 GB | 4.0 GB | 5.1 GB | 7.2 GB | Small loss, best default |
| Q5_K_M | 2.7 GB | 3.9 GB | 4.4 GB | 5.5 GB | 7.6 GB | Very close to Q8 |
| Q6_K | 3.1 GB | 4.3 GB | 4.8 GB | 5.9 GB | 8.0 GB | Hard to tell from Q8 |
| Q8_0 | 4.1 GB | 5.2 GB | 5.8 GB | 6.8 GB | 9.0 GB | Near full quality |
| F16 | 7.7 GB | 8.8 GB | 9.4 GB | 10.4 GB | 12.6 GB | Full quality |
| Device | At Q4_K_M | At Q8_0 | Memory | Speed | Longest chat |
|---|---|---|---|---|---|
| RTX 4060 8GB | Runs well | Runs well | about 76 tok/s | 35K | |
| RTX 3060 12GB | Runs well | Runs well | about 101 tok/s | 64K | |
| RTX 4070 12GB | Runs well | Runs well | about 141 tok/s | 64K | |
| RTX 4060 Ti 16GB | Runs well | Runs well | about 80 tok/s | 93K | |
| Radeon RX 7600 XT 16GB | Runs well | Runs well | about 80 tok/s | 93K | |
| RTX 5060 Ti 16GB | Runs well | Runs well | about 125 tok/s | 93K | |
| Intel Arc A770 16GB | Runs well | Runs well | about 156 tok/s | 93K | |
| Radeon RX 9070 XT 16GB | Runs well | Runs well | about 179 tok/s | 93K | |
| RTX 4070 Ti Super 16GB | Runs well | Runs well | about 188 tok/s | 93K | |
| RTX 4080 Super 16GB | Runs well | Runs well | about 205 tok/s | 93K | |
| RTX 5080 16GB | Runs well | Runs well | about 268 tok/s | 93K | |
| RTX 3090 24GB | Runs well | Runs well | about 261 tok/s | 128K, full | |
| Radeon RX 7900 XTX 24GB | Runs well | Runs well | about 268 tok/s | 128K, full | |
| RTX 4090 24GB | Runs well | Runs well | about 281 tok/s | 128K, full | |
| RTX 5090 32GB | Runs well | Runs well | about 500 tok/s | 128K, full | |
| Mac mini M4 16GB | Runs well | Runs well | about 34 tok/s | 59K | |
| Mac M4 Pro 24GB | Runs well | Runs well | about 76 tok/s | 100K | |
| Mac M4 Pro 48GB | Runs well | Runs well | about 76 tok/s | 128K, full | |
| Mac M4 Max 64GB | Runs well | Runs well | about 152 tok/s | 128K, full | |
| Mac M4 Max 128GB | Runs well | Runs well | about 152 tok/s | 128K, full |
These apps use the same GGUF files, so the memory numbers above apply to each.
ollama run phi4-mini:3.8b
Downloads the Q4_K_M file on first run. For a longer conversation type /set parameter num_ctx 16384 inside the chat.
The speeds on this page are estimates from memory bandwidth. Run the model, note the tokens per second your app reports, and your number replaces the estimate for everyone with your hardware.
Add the first benchmarkRun ollama run phi4-mini:3.8b. It downloads the Q4_K_M build, about 2.5 GB.
Yes. Microsoft trained Phi-4 Mini Instruct for function calling, so it can work as a small local agent that calls your tools.
Both fit the same hardware. Qwen3 4B adds a thinking mode; Phi-4 Mini has a longer native context (128K) and an MIT licence. Test both on your own tasks.
Yes. It is released under the MIT licence.
About 4.0 GB at Q4_K_M with an 8K conversation, 4.4 GB at Q5_K_M, 5.8 GB at Q8_0 and 9.4 GB at full F16 precision. Longer conversations add about 1.1 GB for every 8,000 tokens.
Yes. The RTX 4060 8GB runs Phi-4 Mini 3.8B fully on the GPU at Q4_K_M at about 76 tokens a second.
Yes. The RTX 3060 12GB runs Phi-4 Mini 3.8B fully on the GPU at Q4_K_M at about 101 tokens a second.
Yes. The RTX 4060 Ti 16GB runs Phi-4 Mini 3.8B fully on the GPU at Q4_K_M at about 80 tokens a second.
Yes. A Mac with 16 GB of memory runs it comfortably at Q4. macOS keeps about a third of memory for the system, so smaller Macs may only manage short conversations.