Phi 4 — Hardware Requirements & GPU Compatibility
ChatMathCodeMicrosoft Phi 4 is a 14-billion parameter language model from Microsoft Research's Phi series, designed to deliver strong reasoning, mathematical, and coding performance at an efficient size. Phi 4 continues the Phi family's focus on maximizing capability per parameter through high-quality training data curation, achieving benchmark scores that rival much larger models on reasoning and STEM tasks. The model runs well on consumer GPUs with 12-16GB of VRAM in quantized formats. It excels at mathematical problem solving, code generation, and structured reasoning. Released under the MIT license.
Runs great on a 24 GB GPU
Runs from 8 GB (IQ2_XXS · 16K)Best on 24 GB (Q4_K_M · ~69 tok/s · 16K)Macs from 16 GB (Q4_K_M · ~15 tok/s)
Score 83.9#81 of 106 open#23 of 36 that fit 24 GBMIT
Reference GPU · RTX 4090 24 GB
Estimates, ±20% · how we estimate
llmrun Composite Score →
83.9
- 90% range 79.1–88.7
- #81 of 106 open models
- #23 of 36 that fit 24 GB
Run Phi 4
One recommended way. Every other method, OS and quant is in the step-by-step guide.Each way opens a step-by-step guide for your OS and quant.
Recommended
ollama run hf.co/MaziyarPanahi/phi-4-GGUF:Q4_K_MQ4_K_M fits fully on the RTX 4090 · 11.5 GB free · 16K context
Download: phi-4.Q4_K_M.gguf9.05 GBMaziyarPanahi
Ways to runOther ways
each opens step-by-stepRun in cloud
Runs on RTX 3090 (24 GB) (11 GB headroom) · Q4_K_M
- Generation speed
- ~64 tok/s
- generation speed
- Cost per 1M output tokens
- $0.74
- per 1M output tokens
How Much VRAM Does Phi 4 Need?
Select a quantization level; the listed hardware adheres to it.
| Quantization | VRAM | +32K | On RTX 4090 (reference) | |
|---|---|---|---|---|
| 7.0 GB | — | 2-bit · K-quant — 2-bit quantization with K-quant improvements | Fits: 16K context · ~94 tok/s | |
| 7.1 GB | — | 3-bit small — 3-bit small quantization | Fits: 16K context · ~92 tok/s | |
| 7.9 GB | — | 3-bit medium — 3-bit medium quantization | Fits: 16K context · ~83 tok/s | |
| 8.1 GB | — | 4-bit · legacy — 4-bit legacy quantization | Fits: 16K context · ~81 tok/s | |
| 9.5 GB | — | 4-bit medium — 4-bit medium quantization — most popular sweet spot | Fits: 16K context · ~69 tok/s | |
| 11.2 GB | — | 5-bit medium — 5-bit medium quantization — good quality/size tradeoff | Fits: 16K context · ~59 tok/s | |
| 12.8 GB | — | 6-bit, very good — 6-bit quantization, very good quality | Fits: 16K context · ~51 tok/s | |
| 15.4 GB | — | 8-bit, near-lossless — 8-bit quantization, near-lossless | Fits: 16K context · ~43 tok/s |
Selected Q4_K_M
4-bit medium quantization12.5GBat 16K context
- Weights
- 8.8 GB
- KV cache
- 3.4 GB
- Overhead
- 0.3 GB
Fits RTX 4090 (reference) · 11.5 GB free · ~69 tok/s
≥50 tok/s needs ≥732 GB/s · RTX 5090 ~122, RTX 3090 Ti ~69
Which Hardware Can Run Phi 4?
Q4_K_M · 9.5 GBPhi 4 (Q4_K_M) requires 9.5 GB of VRAM to load the model weights. For comfortable inference with headroom for KV cache and system overhead, 13+ GB is recommended. Using the full 16K context window can add up to 2.9 GB, bringing total usage to 12.4 GB. 40 GPUs can run it, including NVIDIA GeForce RTX 5090, NVIDIA GeForce RTX 3090 Ti, NVIDIA GeForce RTX 3080 Ti. 150 devices with unified memory can run Phi 4, including Mac Studio (M3 Ultra, 256GB), Mac Studio (M3 Ultra, 512GB), Mac Mini M2 Pro (16 GB).
16–18 GB
16–18 GB tier →fits · 3.5 GB free · up to 16K ctx
18 GPUs · 2 Mac classes · 2 device families
RTX 5080~66Simulate output on RTX 5080RTX 5070 Ti~61Simulate output on RTX 5070 TiRTX 4080 SUPER~50Simulate output on RTX 4080 SUPERM516 GB~11Simulate output on MacBook Air 13" M5 (16 GB)M3 Pro*18 GB~11Simulate output on MacBook Pro 14" M3 Pro (18 GB)iPad~11Simulate output on iPad Pro M5 13" (16 GB)Orin NX~7Simulate output on NVIDIA Jetson Orin NX 16GB20 GB
fits · 7.5 GB free · up to 16K ctx
1 GPU
RX 7900 XT~50Simulate output on RX 7900 XT32–40 GB
fits · 19.5 GB free · up to 16K ctx
1 GPU · 3 Mac classes · 4 device families
RTX 5090~122Simulate output on RTX 5090M5 Max36 GB~34Simulate output on Mac Studio M5 Max (36 GB)M532 GB~11Simulate output on MacBook Air 13" M5 (32 GB)Orin~14Simulate output on NVIDIA Jetson AGX Orin 32GBSnapdragon X Elite (X1E-80-100)~9Simulate output on Snapdragon X Elite Copilot+ PC
By VRAM tier · typical GPUs and Macs at Q4_K_M
How good is Phi 4?
The llmrun Score merges 5 public benchmark boards into a single figure, where 100 represents the average for open models.
Score vs VRAM in the 24 GB tier
- Phi 4
- Other models
- Best Score for its VRAM
#23 of 36 that fit 24 GB
Each dot is a model at the best quant that fits a 24 GB GPU. The line steps up to the best Score available at each amount of VRAM; a dot below it is beaten by a model that needs no more memory.
Full 24 GB ranking →Benchmarks
The 6 boards that weigh most in the llmrun Score, of 8 with a result for this model; badges show who ran the test.
- GPQA Diamond
Epoch AI · Dec 2024Independent
Independent56.1%
#48/100 open
- LMArena Text
LMArena · Oct 2026Arena
Arena1256.3
#129/188 open
- AIME 2024/2025
Epoch AI · Dec 2024Independent
Independent13.8%
#59/88 open
- MMLU-Pro
TIGER-LabIndependent
Independent70.4%
#37/146 open
- MATH Level 5
Epoch AI · Dec 2024Independent
Independent64.9%
#9/39 open
- MMLU
Epoch AI · Dec 2024Lab-reported
Lab-reported84.8%
#5/85 open
In the 24 GB class
36 models fit 24 GBSame Score, only models that fit 24 GB at their best quant: the ranking a 24 GB owner actually chooses from.
- #1
Qwen3.8 27BAlibaba
122.0
~38 tok/s · 17.9 GB
- #2
Qwen3.6 27BAlibaba
111.2
~38 tok/s · 17.9 GB
- #3
Qwen3.6 35B A3BAlibaba
106.8
~151 tok/s · 22.0 GB
- #4
Gemma 4 31B ITGoogle
106.7
~32 tok/s · 21.7 GB
- #5
Gemma 4 26B A4B ITGoogle
105.8
~171 tok/s · 16.5 GB
- #6
Qwen3.5 35B A3BAlibaba
105.8
~151 tok/s · 22.0 GB
Alternatives to Phi 4
Phi 4 family · 7 models →Official models with an llmrun Score, each answering one question; numbers are at the best quant that fits a 24 GB GPU.
Best alternative at this size
GPT OSS 20B
OpenAI
- 12.5 higher Score
- 0.7 GB more VRAM
- 121 tok/s faster
Score 96.4 · 13.1 GB · ~190 tok/s
Much faster, similar quality
Qwen3.6 35B A3B
Alibaba
- 22.9 higher Score
- 9.6 GB more VRAM
- 82 tok/s faster
Score 106.8 · 22 GB · ~151 tok/s
Other vendor
Qwen3.8 27B
Alibaba
- 38.1 higher Score
- 5.4 GB more VRAM
- 31 tok/s slower
Score 122.0 · 17.9 GB · ~38 tok/s
Similar models
10| Model | Score | VRAM | tok/s | Why it is similar |
|---|---|---|---|---|
| Qwen3.6 27BAlibaba | 111.2 | 17.9 GB | ~38 | similar score |
| Gemma 4 31B ITGoogle | 106.7 | 21.7 GB | ~32 | similar score |
| Gemma 4 26B A4B ITGoogle | 105.8 | 16.5 GB | ~171 | similar score |
| Qwen3.5 35B A3BAlibaba | 105.8 | 22 GB | ~151 | similar score |
| Qwen3.5 27BAlibaba | 103.8 | 17.9 GB | ~38 | similar score |
| Seed OSS 36B InstructByteDance-Seed | 102.5 | 22.8 GB | ~31 | similar score |
| Qwen3.5 4BAlibaba | 98.5 | 3.4 GB | ~201 | similar score |
| Qwen3 30B A3B Instruct 2507Alibaba | 96.7 | 19.4 GB | ~173 | similar score |
| QwQ 32BAlibaba | 96.2 | 23 GB | ~34 | similar score |
| Qwen3 30B A3BAlibaba | 93.9 | 19.4 GB | ~173 | similar score |
Fine-tunes & variants(4)
Specifications
- Publisher
- Microsoft
- Family
- Phi 4
- Parameters
- 14.7B
- Architecture
- Phi3ForCausalLM
- Context Length
- 16,384 tokens
- Vocabulary Size
- 100,352
- Release Date
- 2024-12-11
- License
- MIT
Frequently Asked Questions
How much VRAM does Phi 4 need?
Phi 4 requires 9.5 GB of VRAM at Q4_K_M, or 30.0 GB at BF16. Full 16K context adds up to 2.9 GB (12.4 GB total).
VRAM = Weights + KV Cache + Overhead
Weights = 14.7B × 4.8 bits ÷ 8 = 8.8 GB
KV Cache + Overhead ≈ 0.7 GB (at 2K context + ~0.3 GB framework)
Fit ratings and hardware model lists check this model with room for a 16K-token context, which needs a little more memory.
KV Cache + Overhead ≈ 3.6 GB (at full 16K context)
VRAM usage by quantization
Can NVIDIA GeForce RTX 4090 run Phi 4?
Yes, at Q8_0 (15.4 GB) or lower. Higher quantizations like BF16 (30.0 GB) exceed the NVIDIA GeForce RTX 4090's 24 GB.
What's the best quantization for Phi 4?
For Phi 4, Q4_K_M (9.5 GB) offers the best balance of quality and VRAM usage. Q4_K_L (9.7 GB) provides better quality if you have the VRAM. The smallest option is IQ2_XXS at 4.8 GB.
VRAM requirement by quantization
★ Recommended — best balance of quality and VRAM usage.
Can I run Phi 4 on a Mac?
Yes — Mac Mini M2 Pro (16 GB) and 133 other Macs can run Phi 4. Apple Silicon uses unified memory, so the model shares RAM with the system. At Q4_K_M you need at least 9.5 GB of usable unified memory (RAM minus macOS overhead).
Can I run Phi 4 locally?
Yes — Phi 4 can run locally on consumer hardware. Popular tools include Ollama, LM Studio, and llama.cpp.
How fast is Phi 4?
At Q4_K_M, Phi 4 can reach ~504 tok/s on AMD Instinct MI350X. On NVIDIA GeForce RTX 4090: ~69 tok/s. Speed depends mainly on GPU memory bandwidth. Real-world results typically within ±20%.
tok/s = (bandwidth GB/s ÷ model GB) × efficiency
Example: NVIDIA B200 → 8000 ÷ 9.52 × 0.65 = ~546 tok/s
Estimated speed at Q4_K_M (9.5 GB)
Real-world results typically within ±20%. Speed depends on batch size, quantization kernel, and software stack.
What's the download size of Phi 4?
At Q4_K_M, the download is about 8.80 GB. The full-precision BF16 version is 29.32 GB. The smallest option (IQ2_XXS) is 4.03 GB.
Which GPUs can run Phi 4?
40 consumer GPUs can run Phi 4 at Q4_K_M. Top options include AMD Radeon RX 6800, AMD Radeon RX 6800 XT, AMD Radeon RX 6900 XT, AMD Radeon RX 6700 XT. 26 GPUs have plenty of headroom for comfortable inference.
Which devices can run Phi 4?
150 devices with unified memory can run Phi 4 at Q4_K_M (9.5 GB), including AMD Ryzen AI 9 HX 370 (Strix Point) Laptop, ASUS Ascent GX10, Beelink GTR9 Pro (Ryzen AI Max+ 395, 128 GB), Framework Desktop (Ryzen AI Max+ 395, 128 GB). Apple Silicon Macs use unified memory shared between CPU and GPU, making them well-suited for local LLM inference.