RunsOnMy ModelsGPUs & MacsAPI pricesVRAM calculatorNew

Can I run phi 4 locally?

phi 4 by microsoft has 15B parameters. At 4-bit with an 8K context it needs about 10.4 GB of GPU memory. It fits on 65 of 65 GPUs and Macs we track.

10.4 GBQ4_K_M · 8K context
RTX 4060 Ti 16GBsmallest consumer GPU that fits
M2 24GBsmallest Mac that fits
16Kmax context
GQAattention type

Memory needed by quant and context length

GB of GPU memory = weights + KV cache (FP16) + runtime overhead. Weights use real file sizes from unsloth/phi-4-GGUF where available (marked •), otherwise parameter count × bits per weight. How we calculate.

QuantQuality4K ctx8K ctx
2-bit (Q2_K) •rough6.6 GB7.4 GB
3-bit (Q3_K_M) •usable8.1 GB8.9 GB
4-bit (Q4_K_M) •good, most popular9.7 GB10.4 GB
5-bit (Q5_K_M) •very good11.1 GB11.9 GB
6-bit (Q6_K) •near lossless12.6 GB13.4 GB
8-bit (Q8_0) •effectively lossless15.9 GB16.7 GB
16-bit (F16/BF16) •original weights28.7 GB29.5 GB

Which GPUs and Macs run phi 4?

Best quality quant that fits at 8K context. "Tight" = within 10% of usable memory. Speed is a ceiling from memory bandwidth (real speed is typically 50–80% of it).

HardwareMemoryFits?Best quantNeedsMax tok/s (est.)
RTX 3060 12GB12 GBFitsQ3_K_M8.9 GB50details
RTX 4060 Ti 16GB16 GBFitsQ6_K13.4 GB24details
RTX 309024 GBFitsQ8_016.7 GB60details
RTX 409024 GBFitsQ8_016.7 GB65details
RTX 509032 GBFitsQ8_016.7 GB115details
RTX 5070 Ti16 GBFitsQ6_K13.4 GB74details
RX 7900 XTX24 GBFitsQ8_016.7 GB62details
Mac M4 Pro 48GB48 GBFitsQ8_016.7 GB18details
Mac M4 Max 128GB128 GBFitsF1629.5 GB19details
Mac M3 Ultra 512GB512 GBFitsF1629.5 GB28details
DGX Spark128 GBFitsF1629.5 GB9.3details
RTX 407012 GBFitsQ3_K_M8.9 GB70details
RTX 5060 Ti 16GB16 GBFitsQ6_K13.4 GB37details
RTX 40608 GBTightQ2_K7.4 GB48details
Arc B58012 GBFitsQ3_K_M8.9 GB63details
RTX 3060 Ti8 GBTightQ2_K7.4 GB80details
RTX 30708 GBTightQ2_K7.4 GB80details
RTX 3080 10GB10 GBFitsQ2_K7.4 GB136details
RTX 3080 12GB12 GBFitsQ3_K_M8.9 GB127details
RTX 3090 Ti24 GBFitsQ8_016.7 GB65details
RTX 4060 Ti 8GB8 GBTightQ2_K7.4 GB51details
RTX 4070 Super12 GBFitsQ3_K_M8.9 GB70details
RTX 4070 Ti12 GBFitsQ3_K_M8.9 GB70details
RTX 4070 Ti Super16 GBFitsQ6_K13.4 GB56details
RTX 408016 GBFitsQ6_K13.4 GB60details
RTX 4080 Super16 GBFitsQ6_K13.4 GB61details
RTX 50608 GBTightQ2_K7.4 GB80details
RTX 507012 GBFitsQ3_K_M8.9 GB93details
RTX 508016 GBFitsQ6_K13.4 GB80details
2x RTX 30902×24 GBFitsF1629.5 GB32details
2x RTX 40902×24 GBFitsF1629.5 GB34details
2x RTX 50902×32 GBFitsF1629.5 GB61details
RTX A600048 GBFitsF1629.5 GB26details
RTX 6000 Ada48 GBFitsF1629.5 GB33details
RTX PRO 6000 Blackwell96 GBFitsF1629.5 GB61details
L40S48 GBFitsF1629.5 GB29details
A100 40GB40 GBFitsF1629.5 GB53details
A100 80GB80 GBFitsF1629.5 GB70details
H100 PCIe80 GBFitsF1629.5 GB68details
H100 SXM80 GBFitsF1629.5 GB114details
H200141 GBFitsF1629.5 GB164details
RX 76008 GBTightQ2_K7.4 GB51details
RX 7700 XT12 GBFitsQ3_K_M8.9 GB60details
RX 7800 XT16 GBFitsQ6_K13.4 GB52details
RX 7900 GRE16 GBFitsQ6_K13.4 GB48details
RX 7900 XT20 GBFitsQ8_016.7 GB51details
RX 907016 GBFitsQ6_K13.4 GB53details
RX 9070 XT16 GBFitsQ6_K13.4 GB53details
Ryzen AI Max+ 395 128GB128 GBFitsF1629.5 GB8.7details
Arc A770 16GB16 GBFitsQ6_K13.4 GB47details
Mac M1 16GB16 GBFitsQ3_K_M8.9 GB9.5details
Mac M2 24GB24 GBFitsQ6_K13.4 GB8.3details
Mac M3 24GB24 GBFitsQ6_K13.4 GB8.3details
Mac M4 16GB16 GBFitsQ3_K_M8.9 GB17details
Mac M4 32GB32 GBFitsQ8_016.7 GB7.7details
Mac M1 Pro 32GB32 GBFitsQ8_016.7 GB13details
Mac M3 Pro 36GB36 GBFitsQ8_016.7 GB9.6details
Mac M4 Pro 24GB24 GBFitsQ6_K13.4 GB23details
Mac M4 Pro 64GB64 GBFitsF1629.5 GB9.3details
Mac M1 Max 64GB64 GBFitsF1629.5 GB14details
Mac M2 Max 96GB96 GBFitsF1629.5 GB14details
Mac M3 Max 128GB128 GBFitsF1629.5 GB14details
Mac M4 Max 64GB64 GBFitsF1629.5 GB19details
Mac M2 Ultra 192GB192 GBFitsF1629.5 GB27details
Mac M3 Ultra 256GB256 GBFitsF1629.5 GB28details

Prefer an API?

Microsoft: Phi 4 is on OpenRouter at $0.07 per 1M input tokens and $0.14 per 1M output tokens. Price details and history →

Questions

How much VRAM does phi 4 need?

About 10.4 GB at 4-bit (Q4_K_M) with an 8K context: 8.3 GB of weights (real GGUF file size), 1.6 GB of KV cache and 0.6 GB of runtime overhead. At 8-bit it needs about 16.7 GB.

What is the smallest GPU that runs phi 4?

At Q4_K_M and 8K context, the smallest single consumer GPU in our table that fits it is the RTX 4060 Ti 16GB (16 GB).

Can I run phi 4 on a Mac?

Yes. At Q4_K_M with 8K context it fits on a Mac M2 24GB or larger, using the default macOS GPU memory limit.

Model facts

Hugging Face repomicrosoft/phi-4
Parameters14,659,507,200 (15B)
Layers / hidden size40 / 5120
AttentionGQA; 40 heads, 10 KV heads, head dim 128
KV cache per token (FP16)200.0 KiB
Max context16,384 tokens
Licensemit
Released on HFDec 11, 2024
Downloads (30d) / likes211,829 / 2,347

Sources: Hugging Face model API · config.json (microsoft/phi-4) · GGUF files · GPU specs from vendor pages (list). Data fetched Nov 17, 2026. Spot an error? Report it.