microsoft
Phi-4-mini-instruct
3.8B parameters · Instruct · Phi family
Recommended download
Which version should I download?
Default pick: GGUF · Q4_K_M — Balanced size/quality — good default.
Set your rig to confirm it fits and to see if a higher-quality quant runs fully on your hardware.
| Format | Level | Size | Verdict | Est. speed | Quality note | Swarm | Download |
|---|---|---|---|---|---|---|---|
| GGUF | Q4_K_M | 2.32 GB | Set your rig | — | Balanced size/quality — good default. | 2S / 0L webseed OK | |
| GGUF | Q8_0 | 3.80 GB | Set your rig | — | Bartowski Q8_0 quant of Phi-4-mini-instruct (3.836B dense) — high-quality option. MIT. | 2S / 0L webseed OK |
GGUF · Q4_K_M
2.32 GB
- Est. speed
- —
- Swarm
- 2S / 0L webseed OK
Balanced size/quality — good default.
GGUF · Q8_0
3.80 GB
- Est. speed
- —
- Swarm
- 2S / 0L webseed OK
Bartowski Q8_0 quant of Phi-4-mini-instruct (3.836B dense) — high-quality option. MIT.
Want a different quant? Request it on the board →
Runs fully on
Green = the model's best quant fits fully in GPU/unified memory at 8K context. Tap a card for its full "what runs on it" page.
Context
Advertised 128k · usable ≈ 128k (reported — model card)
How we know
Evidence grade: reported — a maintainer claim with no independent evaluation.
- Phi-4-mini-instruct model card — observed Jul 18, 2026
- Phi-4-Mini technical report — observed Jul 18, 2026
Card: 128K context via LongRoPE. Tech report describes the mechanism but discloses no numeric long-context scores.
Reviewed on Jul 18, 2026.
Run it
Runtime completeness (Q4_K_M torrent): llama.cpp ✅ Ollama – vision sidecar –
- – Ollama — runs the GGUF directly; no Modelfile bundled
- – vision sidecar — not a vision model
Context / KV 8,192 tokens · FP16 set above the quant table
Generic commands (no rig set). GPU-offload values assume the model fits on your GPU — set your rig for values tuned to your hardware.
llama-server -m Phi-4-mini-instruct-Q4_K_M.gguf -c 8192 -ngl 999
Use llama-cli in place of llama-server for a one-shot prompt.
FROM ./Phi-4-mini-instruct-Q4_K_M.gguf
PARAMETER num_ctx 8192
PARAMETER num_gpu 999
PARAMETER stop "<|endoftext|>"
PARAMETER stop "<|end|>"
# Chat template: Ollama uses the template embedded in the GGUF (no TEMPLATE directive needed).
ollama create microsoft-phi-4-mini-instruct -f Modelfile
ollama run microsoft-phi-4-mini-instruct
GGUF is not a first-class vLLM format.
vLLM GGUF support is experimental and single-file only; prefer safetensors/GPTQ/AWQ for production. If you must, pass the .gguf path to `vllm serve` with --load-format gguf on a recent vLLM.
transformers does not load GGUF weights.
GGUF weights run under llama.cpp, Ollama or LM Studio.
Load Phi-4-mini-instruct-Q4_K_M.gguf, set the context length to 8192 tokens. Set GPU offload to Max (all layers).
MLX runs MLX-format weights only (Apple Silicon). This quant is a GGUF build.
GGUF weights run under llama.cpp, Ollama or LM Studio.
Technical details
Chat template
{% for message in messages %}{% if message['role'] == 'system' and 'tools' in message and message['tools'] is not none %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|tool|>' + message['tools'] + '<|/tool|>' + '<|end|>' }}{% else %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|end|>' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>' }}{% else %}{{ eos_token }}{% endif %}
Stop strings
<|endoftext|>
<|end|>
Evidence & provenance
Source
- Revision pin
-
cfbefacb99257ffa30c83adab238a50856ac3083 - Manifest
- Present
License
- Name
- mit
- Commercial use
- yes
- Access
- Open
File hashes (SHA-256)
-
phi-4-mini-instruct-q4-k-m/LICENSE
7df20dcdf9197e9945c14858d41c60f11b52b93e5b69e2b63416b874d598d322 -
phi-4-mini-instruct-q4-k-m/Phi-4-mini-instruct-Q4_K_M.gguf
88c00229914083cd112853aab84ed51b87bdf6b9ce42f532d8c85c7c63b1730a -
phi-4-mini-instruct-q4-k-m/README.md
60aca40771f3c5eda04387117e45ba9c32f9941369afffc466cc9e0b7dfc789b -
phi-4-mini-instruct-q8-0/LICENSE
7df20dcdf9197e9945c14858d41c60f11b52b93e5b69e2b63416b874d598d322 -
phi-4-mini-instruct-q8-0/README.md
60aca40771f3c5eda04387117e45ba9c32f9941369afffc466cc9e0b7dfc789b -
phi-4-mini-instruct-q8-0/microsoft_Phi-4-mini-instruct-Q8_0.gguf
a12f242c4ee379b9da91673e5d78b30bfacfe4fd86a0b2259d2ecad5d93cb6c7
Explore further
Appears in
Get an email when a better quant fits your rig.
Set your rig once; we'll alert you when a new or better-fitting build lands.
Performance reports
Real-world throughput reported by the community (and scraped sources).
Community
Reviews, sampler presets and community runtime reports. Be the first to contribute.
Community runtime reports
Unofficial, community-submitted "it loads for me" reports. These are not the official verified-working badge — an admin reviews reports before anything is marked officially verified.
Log in to report whether a quant loads in your runtime.
No community reports yet.