LLMs ·

Phi-4 Mini (3.8B)

Parameters
3.8B
Architecture
Dense
Max context
128K tokens
License
mit
Released
2025-02

How to run it

Quickest · Ollama

One command downloads a ready-to-run version and starts a chat.

ollama run phi4-mini:3.8b

Get Ollama at ollama.com/download (opens in a new tab) · model page (opens in a new tab)

Quantized files · GGUF

Works in LM Studio, llama.cpp, Jan and Ollama. No sign-in needed.

huggingface.co/unsloth/Phi-4-mini-instruct-GGUF (opens in a new tab)

ollama run hf.co/unsloth/Phi-4-mini-instruct-GGUF

Original weights · Hugging Face

Full-precision files from Microsoft, for fine-tuning, vLLM, Transformers.

huggingface.co/microsoft/Phi-4-mini-instruct (opens in a new tab)

No sign-in needed.

Official repo · GitHub

Reference code, inference scripts and docs from Microsoft. The weights themselves download from Hugging Face.

github.com/microsoft/PhiCookBook (opens in a new tab)

git clone https://github.com/microsoft/PhiCookBook

Microsoft’s official Phi cookbook: setup, inference and fine-tuning guides.

Memory needed

Weights plus KV cache and runtime overhead. Leave a little extra free for the operating system and other apps.

Quantization Quality Weights Total at 8K context Total at 32K context Download
Q2_K Low 1.5 GB 3.2 GB 6.4 GB GGUF (opens in a new tab)
Q3_K_M Low 1.9 GB 3.6 GB 6.8 GB GGUF (opens in a new tab)
Q4_K_M Good 2.3 GB 4.0 GB 7.2 GB GGUF (opens in a new tab)
Q5_K_M High 2.7 GB 4.4 GB 7.6 GB GGUF (opens in a new tab)
Q6_K High 3.1 GB 4.8 GB 8.0 GB GGUF (opens in a new tab)
Q8_0 Very high 4.1 GB 5.7 GB 9.0 GB GGUF (opens in a new tab)
F16 Full 7.7 GB 9.4 GB 12.6 GB GGUF (opens in a new tab) Original weights (opens in a new tab)

Best hardware for Phi-4 Mini (3.8B)

The least expensive GPU in our catalog that runs it without offloading is the Intel Arc A380 (launch price $139) at Q4_K_M.

Grade · points Hardware Quant Memory Speed Fit
74 ptsGreat (A) · 74 of 100 points: Model quality 19.8/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 4060 Q8_0 6.1 GB / 8.0 GB 44.3 tok/s Runs well
74 ptsGreat (A) · 74 of 100 points: Model quality 19.8/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 14.6/15 AMD Radeon RX 9070 XT F16 10.2 GB / 16.0 GB 41.3 tok/s Runs well
74 ptsGreat (A) · 74 of 100 points: Model quality 19.8/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 14.6/15 NVIDIA GeForce RTX 4070 Ti SUPER F16 10.2 GB / 16.0 GB 50.4 tok/s Runs well
74 ptsGreat (A) · 74 of 100 points: Model quality 19.8/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 14.6/15 NVIDIA GeForce RTX 4080 SUPER F16 10.2 GB / 16.0 GB 55.2 tok/s Runs well
74 ptsGreat (A) · 74 of 100 points: Model quality 19.8/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 14.6/15 NVIDIA GeForce RTX 5070 Ti F16 10.2 GB / 16.0 GB 67.2 tok/s Runs well
74 ptsGreat (A) · 74 of 100 points: Model quality 19.8/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 14.6/15 NVIDIA GeForce RTX 5080 F16 10.2 GB / 16.0 GB 72.0 tok/s Runs well
72 ptsGreat (A) · 72 of 100 points: Model quality 19.8/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 12.2/15 Intel Arc B580 Q8_0 6.3 GB / 12.0 GB 56.7 tok/s Runs well
72 ptsGreat (A) · 72 of 100 points: Model quality 19.8/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 12.2/15 NVIDIA GeForce RTX 3060 12GB Q8_0 6.3 GB / 12.0 GB 58.6 tok/s Runs well
72 ptsGreat (A) · 72 of 100 points: Model quality 19.8/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 12.2/15 NVIDIA GeForce RTX 4070 SUPER Q8_0 6.3 GB / 12.0 GB 82.0 tok/s Runs well
69 ptsGood (B) · 69 of 100 points: Model quality 19.8/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 10.1/15 AMD Radeon RX 7900 XTX F16 10.6 GB / 24.0 GB 62.0 tok/s Runs well

Check it on your own hardware

Estimates come from published hardware specs and our open formulas, not from running the model on your machine. Real speed varies with runtime, drivers and settings. Numbers marked “Measured” come from a linked benchmark.