Microsoft · 15B · Q4_K_M · 8.43 GiB
Phi-4 at Q4_K_M needs about 11.0 GiB at 8K context, and the smallest listed machine that fits it is GeForce RTX 4060 Ti 16GB.
Dense 14B-class Phi-4. head_dim is hidden_size / num_attention_heads from config.json (5120 / 40).
ollama run phi4:14b
Weights: phi-4-Q4_K_M.gguf. Architecture: config source. Hugging Face repo created 2024-12-11. License field: mit.
Quants with a measured file size
| Quant | File | Size |
|---|---|---|
| Q4_K_M · recommended | phi-4-Q4_K_M.gguf | 8.43 GiB |
| Q5_K_M | phi-4-Q5_K_M.gguf | 9.88 GiB |
| Q6_K | phi-4-Q6_K.gguf | 11.2 GiB |
| Q8_0 | phi-4-Q8_0.gguf | 14.5 GiB |
Machines
| Machine | Memory | Total | Verdict | Speed |
|---|---|---|---|---|
| Apple M1, 8 GB | 8 GB unified | 11.0 GiB | No | — |
| Apple M2, 8 GB | 8 GB unified | 11.0 GiB | No | — |
| Apple M3, 8 GB | 8 GB unified | 11.0 GiB | No | — |
| GeForce RTX 3060 Ti | 8 GB GDDR | 11.0 GiB | Offload | 4–6 tok/s |
| GeForce RTX 3070 | 8 GB GDDR | 11.0 GiB | Offload | 4–6 tok/s |
| GeForce RTX 4060 | 8 GB GDDR | 11.0 GiB | Offload | 4–6 tok/s |
| GeForce RTX 4060 Ti 8GB | 8 GB GDDR | 11.0 GiB | Offload | 4–6 tok/s |
| GeForce RTX 5060 | 8 GB GDDR | 11.0 GiB | Offload | 7–11 tok/s |
| GeForce RTX 5060 Ti 8GB | 8 GB GDDR | 11.0 GiB | Offload | 7–11 tok/s |
| Radeon RX 6600 | 8 GB GDDR6 | 11.0 GiB | Offload | 4–5 tok/s |
| Radeon RX 7600 | 8 GB GDDR6 | 11.0 GiB | Offload | 4–6 tok/s |
| GeForce RTX 3080 10GB | 10 GB GDDR | 10.00 GiB | Tight | 43–67 tok/s |
| GeForce RTX 3060 12GB | 12 GB GDDR | 11.0 GiB | Tight | 18–32 tok/s |
| GeForce RTX 4070 | 12 GB GDDR | 11.0 GiB | Tight | 26–45 tok/s |
| GeForce RTX 4070 Super | 12 GB GDDR | 11.0 GiB | Tight | 26–45 tok/s |
| GeForce RTX 4070 Ti | 12 GB GDDR | 11.0 GiB | Tight | 26–45 tok/s |
| GeForce RTX 5070 | 12 GB GDDR | 11.0 GiB | Tight | 34–59 tok/s |
| Intel Arc B580 | 12 GB GDDR6 | 11.0 GiB | Tight | 23–40 tok/s |
| Radeon RX 6700 XT | 12 GB GDDR6 | 11.0 GiB | Tight | 20–34 tok/s |
| Radeon RX 7700 XT | 12 GB GDDR6 | 11.0 GiB | Tight | 22–38 tok/s |
| Apple M1 Pro, 16 GB | 16 GB unified | 11.0 GiB | Tight | 10–18 tok/s |
| Apple M1, 16 GB | 16 GB unified | 11.0 GiB | Tight | 3–6 tok/s |
| Apple M2 Pro, 16 GB | 16 GB unified | 11.0 GiB | Tight | 10–18 tok/s |
| Apple M2, 16 GB | 16 GB unified | 11.0 GiB | Tight | 5–9 tok/s |
| Apple M3, 16 GB | 16 GB unified | 11.0 GiB | Tight | 5–9 tok/s |
| Apple M4, 16 GB | 16 GB unified | 11.0 GiB | Tight | 6–11 tok/s |
| GeForce RTX 4060 Ti 16GB | 16 GB GDDR | 11.0 GiB | Fits | 15–25 tok/s |
| GeForce RTX 4070 Ti Super | 16 GB GDDR | 11.0 GiB | Fits | 34–59 tok/s |
| GeForce RTX 4080 | 16 GB GDDR | 11.0 GiB | Fits | 37–63 tok/s |
| GeForce RTX 4080 Super | 16 GB GDDR | 11.0 GiB | Fits | 38–65 tok/s |
| GeForce RTX 5060 Ti 16GB | 16 GB GDDR | 11.0 GiB | Fits | 23–40 tok/s |
| GeForce RTX 5070 Ti | 16 GB GDDR | 11.0 GiB | Fits | 46–79 tok/s |
| GeForce RTX 5080 | 16 GB GDDR | 11.0 GiB | Fits | 49–85 tok/s |
| Intel Arc A770 16GB | 16 GB GDDR6 | 11.0 GiB | Fits | 26–45 tok/s |
| Legion Go | 16 GB LPDDR5X-7500 | 11.0 GiB | Tight | 6–11 tok/s |
| Radeon RX 6800 XT | 16 GB GDDR6 | 11.0 GiB | Fits | 26–45 tok/s |
| Radeon RX 7800 XT | 16 GB GDDR6 | 11.0 GiB | Fits | 32–55 tok/s |
| Radeon RX 9060 XT 16GB | 16 GB GDDR6 | 11.0 GiB | Fits | 16–28 tok/s |
| Radeon RX 9070 XT | 16 GB GDDR6 | 11.0 GiB | Fits | 33–57 tok/s |
| ROG Ally | 16 GB LPDDR5-6400 | 11.0 GiB | Tight | 5–9 tok/s |
| Steam Deck LCD | 16 GB LPDDR5-5500 | 11.0 GiB | Tight | 5–8 tok/s |
| Steam Deck OLED | 16 GB LPDDR5-6400 | 11.0 GiB | Tight | 5–9 tok/s |
| Apple M3 Pro, 18 GB | 18 GB unified | 11.0 GiB | Fits | 8–13 tok/s |
| Radeon RX 7900 XT | 20 GB GDDR6 | 11.0 GiB | Fits | 41–71 tok/s |
| Apple M2, 24 GB | 24 GB unified | 11.0 GiB | Fits | 5–9 tok/s |
| Apple M3, 24 GB | 24 GB unified | 11.0 GiB | Fits | 5–9 tok/s |
| Apple M4 Pro, 24 GB | 24 GB unified | 11.0 GiB | Fits | 14–24 tok/s |
| Apple M4, 24 GB | 24 GB unified | 11.0 GiB | Fits | 6–11 tok/s |
| GeForce RTX 3090 | 24 GB GDDR | 11.0 GiB | Fits | 48–83 tok/s |
| GeForce RTX 4090 | 24 GB GDDR | 11.0 GiB | Fits | 52–89 tok/s |
| Radeon RX 7900 XTX | 24 GB GDDR6 | 11.0 GiB | Fits | 49–85 tok/s |
| ROG Ally X | 24 GB LPDDR5X-7500 | 11.0 GiB | Fits | 6–11 tok/s |
| Apple M1 Max, 32 GB | 32 GB unified | 11.0 GiB | Fits | 21–35 tok/s |
| Apple M1 Pro, 32 GB | 32 GB unified | 11.0 GiB | Fits | 10–18 tok/s |
| Apple M2 Max, 32 GB | 32 GB unified | 11.0 GiB | Fits | 21–35 tok/s |
| Apple M2 Pro, 32 GB | 32 GB unified | 11.0 GiB | Fits | 10–18 tok/s |
| Apple M4, 32 GB | 32 GB unified | 11.0 GiB | Fits | 6–11 tok/s |
| GeForce RTX 5090 | 32 GB GDDR | 11.0 GiB | Fits | 92–158 tok/s |
| Apple M3 Pro, 36 GB | 36 GB unified | 11.0 GiB | Fits | 8–13 tok/s |
| Apple M4 Max 14-core, 36 GB | 36 GB unified | 11.0 GiB | Fits | 21–36 tok/s |
| Apple M3 Max 16-core, 48 GB | 48 GB unified | 11.0 GiB | Fits | 21–35 tok/s |
| Apple M4 Max 16-core, 48 GB | 48 GB unified | 11.0 GiB | Fits | 28–48 tok/s |
| Apple M4 Pro, 48 GB | 48 GB unified | 11.0 GiB | Fits | 14–24 tok/s |
| Apple M1 Max, 64 GB | 64 GB unified | 11.0 GiB | Fits | 21–35 tok/s |
| Apple M2 Max, 64 GB | 64 GB unified | 11.0 GiB | Fits | 21–35 tok/s |
| Apple M3 Max 16-core, 64 GB | 64 GB unified | 11.0 GiB | Fits | 21–35 tok/s |
| Apple M4 Max 16-core, 64 GB | 64 GB unified | 11.0 GiB | Fits | 28–48 tok/s |
| Apple M4 Pro, 64 GB | 64 GB unified | 11.0 GiB | Fits | 14–24 tok/s |
| Apple M2 Max, 96 GB | 96 GB unified | 11.0 GiB | Fits | 21–35 tok/s |
| Apple M3 Max 16-core, 128 GB | 128 GB unified | 11.0 GiB | Fits | 21–35 tok/s |
| Apple M4 Max 16-core, 128 GB | 128 GB unified | 11.0 GiB | Fits | 28–48 tok/s |
Exact answers
FAQ
Why Q4_K_M?
Q4_K_M is the quant this page recommends. The file is phi-4-Q4_K_M.gguf at 8.43 GiB. Other single-file quants are in the table when a real size was available.
Where do the architecture numbers come from?
Official config.json. Context 16,384. Source: https://huggingface.co/microsoft/phi-4/raw/main/config.json
Does this include a long context?
The fit uses 8,192 tokens, or less when that is all the fast memory can hold. The model file allows up to 16,384 tokens, and KV cache grows as you use more of that.
What is the Ollama command?
ollama run phi4:14b. The library tag is Q4-class or the vendor quant. Compare it with the GGUF linked on this page before you treat the sizes as identical.