A 3.8B-parameter reasoning-focused model from Microsoft. Punches well above its weight on math, code, and structured-reasoning benchmarks — beating models 5–10× its size on MATH and GPQA.
128k context with YaRN.
MIT-licensed, the most permissive license among comparable models. Best small-model pick if you want "thinking mode" without paying the latency tax of a 7B+ model.
Available quantizations
File
Size
Bits/weight
Recommended use
Phi-4-mini-instruct-Q4_K_M.gguf
2.3 GB
4.8
Default — best size/quality tradeoff for phone & laptop
Phi-4-mini-instruct-Q5_K_M.gguf
2.6 GB
5.7
Slightly better reasoning, ~13% bigger; recommended for iPad / Mac
Phi-4-mini-instruct-Q8_0.gguf
3.8 GB
8.5
Near-FP16 quality; only worth it on Apple Silicon Mac
Pick
Q4_K_M
for general use. Phi-4-mini's reasoning quality holds up well at Q4_K_M. Avoid Q3 quants for this model — reasoning quality degrades noticeably.
Performance on Apple Silicon
Approximate decode throughput at single-batch greedy decode, 2048-token context. Measured with
llama-cli
.
Device
RAM
Q4_K_M tok/s
Notes
iPhone 15 Pro
8 GB
~18 tok/s
Smooth, but reasoning mode adds latency before the first token
iPhone 16 Pro
8 GB
~22 tok/s
Recommended phone target
iPad Pro M2
8 GB
~38 tok/s
Snappy
MacBook Pro M3
16 GB
~70 tok/s
Effectively instant
Reference numbers — Q5_K_M and Q8_0 are roughly 15% / 40% slower than Q4_K_M.
How to use
1. Haplo (iPhone / iPad / Mac)
The model appears automatically in Haplo's model browser on Kuzco-1.1.0+ builds. The download URL for Q4_K_M is:
For reasoning-heavy tasks set
--temp 0.0
and let the model deterministically work through the problem.
3. Ollama
cat <<'EOF' > Modelfile
FROM ./Phi-4-mini-instruct-Q4_K_M.gguf
PARAMETER temperature 0.0
PARAMETER top_p 1.0
EOF
ollama create phi-4-mini -f Modelfile
ollama run phi-4-mini
Long context (128k via YaRN)
Phi-4-mini is trained at 64k context and can stretch to
128k tokens
via YaRN extrapolation. To enable: most clients pick this up automatically from the GGUF metadata. If yours doesn't, set
--rope-scaling yarn --rope-scale 2.0
in llama.cpp.
Sampling defaults
For reasoning tasks (math, code, structured output):
temperature=0.0
,
top_p=1.0
.
For chat / general output:
temperature=0.7
,
top_p=0.9
.
The GGUF stores no defaults — pass them explicitly per task.
Chat template
Phi-4-mini uses the Phi-3 chat template. The tokenizer stores it in the GGUF metadata, so llama.cpp's
--chat-template
flag isn't required.
No imatrix calibration was used — the weights come from the upstream FP16 directly.
Original model card
See the upstream model card for full architecture, training, benchmarks, and Microsoft's responsible-AI guidance:
microsoft/Phi-4-mini-instruct
.
License
MIT License
, inherited from the original model — the most permissive license among comparable on-device models. Commercial use, modification, redistribution, and bundling in proprietary apps are all permitted with attribution. See
LICENSE
for full terms.
Phi-4-mini by Microsoft Corporation. Licensed under the MIT License.
Acknowledgements
Microsoft for the original Phi-4-mini weights and an unusually open-licensed release.
The
llama.cpp
team for the GGUF format and quantization tooling.
Phi-4-mini-instruct-GGUF huggingface.co is an AI model on huggingface.co that provides Phi-4-mini-instruct-GGUF's model effect (), which can be used instantly with this jc-builds Phi-4-mini-instruct-GGUF model. huggingface.co supports a free trial of the Phi-4-mini-instruct-GGUF model, and also provides paid use of the Phi-4-mini-instruct-GGUF. Support call Phi-4-mini-instruct-GGUF model through api, including Node.js, Python, http.
Phi-4-mini-instruct-GGUF huggingface.co is an online trial and call api platform, which integrates Phi-4-mini-instruct-GGUF's modeling effects, including api services, and provides a free online trial of Phi-4-mini-instruct-GGUF, you can try Phi-4-mini-instruct-GGUF online for free by clicking the link below.
jc-builds Phi-4-mini-instruct-GGUF online free url in huggingface.co:
Phi-4-mini-instruct-GGUF is an open source model from GitHub that offers a free installation service, and any user can find Phi-4-mini-instruct-GGUF on GitHub to install. At the same time, huggingface.co provides the effect of Phi-4-mini-instruct-GGUF install, users can directly use Phi-4-mini-instruct-GGUF installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Phi-4-mini-instruct-GGUF install url in huggingface.co: