Microsoft · 3.8B · Q4_K_M · 2.32 GiB

Phi-4-mini Instruct at Q4_K_M needs about 4.01 GiB at 8K context, and the smallest listed machine that fits it is GeForce RTX 3060 Ti.

Small Phi-4. The config sliding_window is 262,144, larger than the 131,072 context, so the KV estimate treats every layer as full attention.

ollama run phi4-mini

Weights: microsoft_Phi-4-mini-instruct-Q4_K_M.gguf. Architecture: config source. Hugging Face repo created 2025-02-19. License field: mit.

Quants with a measured file size

QuantFileSize
Q4_K_M · recommendedmicrosoft_Phi-4-mini-instruct-Q4_K_M.gguf2.32 GiB
Q5_K_Mmicrosoft_Phi-4-mini-instruct-Q5_K_M.gguf2.65 GiB
Q6_Kmicrosoft_Phi-4-mini-instruct-Q6_K.gguf2.94 GiB
Q8_0microsoft_Phi-4-mini-instruct-Q8_0.gguf3.80 GiB

Machines

Same quant and 8,192 tokens on every row.
MachineMemoryTotalVerdictSpeed
Apple M1, 8 GB8 GB unified4.01 GiBFits10–22 tok/s
Apple M2, 8 GB8 GB unified4.01 GiBFits15–32 tok/s
Apple M3, 8 GB8 GB unified4.01 GiBFits15–32 tok/s
GeForce RTX 3060 Ti8 GB GDDR4.01 GiBFits69–144 tok/s
GeForce RTX 30708 GB GDDR4.01 GiBFits69–144 tok/s
GeForce RTX 40608 GB GDDR4.01 GiBFits42–87 tok/s
GeForce RTX 4060 Ti 8GB8 GB GDDR4.01 GiBFits44–92 tok/s
GeForce RTX 50608 GB GDDR4.01 GiBFits69–144 tok/s
GeForce RTX 5060 Ti 8GB8 GB GDDR4.01 GiBFits69–144 tok/s
Radeon RX 66008 GB GDDR64.01 GiBFits35–72 tok/s
Radeon RX 76008 GB GDDR64.01 GiBFits44–92 tok/s
GeForce RTX 3080 10GB10 GB GDDR4.01 GiBFits117–244 tok/s
GeForce RTX 3060 12GB12 GB GDDR4.01 GiBFits56–116 tok/s
GeForce RTX 407012 GB GDDR4.01 GiBFits78–162 tok/s
GeForce RTX 4070 Super12 GB GDDR4.01 GiBFits78–162 tok/s
GeForce RTX 4070 Ti12 GB GDDR4.01 GiBFits78–162 tok/s
GeForce RTX 507012 GB GDDR4.01 GiBFits104–216 tok/s
Intel Arc B58012 GB GDDR64.01 GiBFits70–146 tok/s
Radeon RX 6700 XT12 GB GDDR64.01 GiBFits59–123 tok/s
Radeon RX 7700 XT12 GB GDDR64.01 GiBFits67–139 tok/s
Apple M1 Pro, 16 GB16 GB unified4.01 GiBFits31–64 tok/s
Apple M1, 16 GB16 GB unified4.01 GiBFits10–22 tok/s
Apple M2 Pro, 16 GB16 GB unified4.01 GiBFits31–64 tok/s
Apple M2, 16 GB16 GB unified4.01 GiBFits15–32 tok/s
Apple M3, 16 GB16 GB unified4.01 GiBFits15–32 tok/s
Apple M4, 16 GB16 GB unified4.01 GiBFits19–39 tok/s
GeForce RTX 4060 Ti 16GB16 GB GDDR4.01 GiBFits44–92 tok/s
GeForce RTX 4070 Ti Super16 GB GDDR4.01 GiBFits104–216 tok/s
GeForce RTX 408016 GB GDDR4.01 GiBFits111–230 tok/s
GeForce RTX 4080 Super16 GB GDDR4.01 GiBFits114–236 tok/s
GeForce RTX 5060 Ti 16GB16 GB GDDR4.01 GiBFits69–144 tok/s
GeForce RTX 5070 Ti16 GB GDDR4.01 GiBFits138–288 tok/s
GeForce RTX 508016 GB GDDR4.01 GiBFits148–308 tok/s
Intel Arc A770 16GB16 GB GDDR64.01 GiBFits79–164 tok/s
Legion Go16 GB LPDDR5X-75004.01 GiBFits19–39 tok/s
Radeon RX 6800 XT16 GB GDDR64.01 GiBFits79–164 tok/s
Radeon RX 7800 XT16 GB GDDR64.01 GiBFits96–200 tok/s
Radeon RX 9060 XT 16GB16 GB GDDR64.01 GiBFits49–103 tok/s
Radeon RX 9070 XT16 GB GDDR64.01 GiBFits99–205 tok/s
ROG Ally16 GB LPDDR5-64004.01 GiBFits16–33 tok/s
Steam Deck LCD16 GB LPDDR5-55004.01 GiBFits14–28 tok/s
Steam Deck OLED16 GB LPDDR5-64004.01 GiBFits16–33 tok/s
Apple M3 Pro, 18 GB18 GB unified4.01 GiBFits23–48 tok/s
Radeon RX 7900 XT20 GB GDDR64.01 GiBFits123–257 tok/s
Apple M2, 24 GB24 GB unified4.01 GiBFits15–32 tok/s
Apple M3, 24 GB24 GB unified4.01 GiBFits15–32 tok/s
Apple M4 Pro, 24 GB24 GB unified4.01 GiBFits42–88 tok/s
Apple M4, 24 GB24 GB unified4.01 GiBFits19–39 tok/s
GeForce RTX 309024 GB GDDR4.01 GiBFits144–300 tok/s
GeForce RTX 409024 GB GDDR4.01 GiBFits155–324 tok/s
Radeon RX 7900 XTX24 GB GDDR64.01 GiBFits148–308 tok/s
ROG Ally X24 GB LPDDR5X-75004.01 GiBFits19–39 tok/s
Apple M1 Max, 32 GB32 GB unified4.01 GiBFits62–128 tok/s
Apple M1 Pro, 32 GB32 GB unified4.01 GiBFits31–64 tok/s
Apple M2 Max, 32 GB32 GB unified4.01 GiBFits62–128 tok/s
Apple M2 Pro, 32 GB32 GB unified4.01 GiBFits31–64 tok/s
Apple M4, 32 GB32 GB unified4.01 GiBFits19–39 tok/s
GeForce RTX 509032 GB GDDR4.01 GiBFits276–575 tok/s
Apple M3 Pro, 36 GB36 GB unified4.01 GiBFits23–48 tok/s
Apple M4 Max 14-core, 36 GB36 GB unified4.01 GiBFits63–132 tok/s
Apple M3 Max 16-core, 48 GB48 GB unified4.01 GiBFits62–128 tok/s
Apple M4 Max 16-core, 48 GB48 GB unified4.01 GiBFits84–175 tok/s
Apple M4 Pro, 48 GB48 GB unified4.01 GiBFits42–88 tok/s
Apple M1 Max, 64 GB64 GB unified4.01 GiBFits62–128 tok/s
Apple M2 Max, 64 GB64 GB unified4.01 GiBFits62–128 tok/s
Apple M3 Max 16-core, 64 GB64 GB unified4.01 GiBFits62–128 tok/s
Apple M4 Max 16-core, 64 GB64 GB unified4.01 GiBFits84–175 tok/s
Apple M4 Pro, 64 GB64 GB unified4.01 GiBFits42–88 tok/s
Apple M2 Max, 96 GB96 GB unified4.01 GiBFits62–128 tok/s
Apple M3 Max 16-core, 128 GB128 GB unified4.01 GiBFits62–128 tok/s
Apple M4 Max 16-core, 128 GB128 GB unified4.01 GiBFits84–175 tok/s

FAQ

Why Q4_K_M?

Q4_K_M is the quant this page recommends. The file is microsoft_Phi-4-mini-instruct-Q4_K_M.gguf at 2.32 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. head_dim = 3072 / 24. Source: https://huggingface.co/microsoft/Phi-4-mini-instruct/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 131,072 tokens, and KV cache grows as you use more of that.

What is the Ollama command?

ollama run phi4-mini. 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.