Phi-4, released by Microsoft in December 2024, is a 14B model. At Q4 our VRAM formula is 14 × 0.6 + 2 = 10.4 GB, so it needs a 12 GB GPU. An 8 GB GPU does not fit it. Q8 is 18.8 GB and needs 24 GB. Phi-4-mini (3.8B) at Q4 is 4.3 GB and fits an 8 GB GPU. Run ollama run phi4 or ollama run phi4-mini. Both tags were on the Ollama library on 11 October 2026. In LM Studio, pick the Q4_K_M GGUF of the same size.
What is Phi-4?
Phi-4 is Microsoft's flagship small language model, trained on high-quality synthetic "textbook" data rather than raw web text. This gives it exceptional reasoning and coding performance far beyond what its 14B parameter count would suggest.
Two sizesPhi-4 (14B) and Phi-4-mini (3.8B) — both instruction-tuned and available on Ollama and Hugging Face.
Strong on math and science for its sizeIn Microsoft's own table, Phi-4 scores higher than Llama 3.3 70B on GPQA (56.1 vs 49.1), MATH (80.4 vs 66.3) and HumanEval (82.6 vs 78.9), and lower on MMLU (84.8 vs 86.3), MGSM (80.6 vs 89.1), DROP (75.5 vs 90.2) and SimpleQA (3.0 vs 20.9). Microsoft notes that Meta reports higher Llama 3.3 scores on MATH (77) and HumanEval (88).
Trade-offWeaker multilingual and creative writing compared to Qwen3 14B. Phi-4's edge is specifically on logic, math, and code.
The MSI RTX 4060 Ti 16 GB (B0CBK7BRL9) fits phi4 at Q4 (10.4 GB) and does not fit Q8 (18.8 GB). Links to Amazon are affiliate links. Check current price on Amazon.
VRAM is estimated using params × bytes_per_param × 1.2 + 2. Q4 is params_B × 0.6 + 2. Q8 is params_B × 1.2 + 2. FP16 is params_B × 2.4 + 2. Add extra headroom for KV cache when using long context windows.
Model
Params
Q4_K_M VRAM
Q8 VRAM
FP16 VRAM
Min GPU
Phi-4-mini
3.8B
4.3 GB
6.6 GB
11.1 GB
8 GB GPU
Phi-4
14B
10.4 GB
18.8 GB
35.6 GB
12 GB GPU
Phi-4 14B at Q4 is 10.4 GB, so an 8 GB GPU does not fit it. Use the VRAM Calculator for context-length-adjusted estimates and KV cache projections.
Why Phi-4 Punches Above Its Weight
Most 14B models land firmly behind 70B models on hard benchmarks. Phi-4 is the exception. Here is why it performs so far above its size:
Synthetic textbook data
Microsoft trained Phi-4 on carefully curated synthetic data modeled on textbooks and structured problem sets — not raw web crawls. This means fewer low-quality examples and more reasoning signal per token.
Benchmark results
In Microsoft's own table, Phi-4 scores higher than Llama 3.3 70B on GPQA (56.1 vs 49.1), MATH (80.4 vs 66.3) and HumanEval (82.6 vs 78.9), and lower on MMLU (84.8 vs 86.3), MGSM (80.6 vs 89.1), DROP (75.5 vs 90.2) and SimpleQA (3.0 vs 20.9). Microsoft notes that Meta reports higher Llama 3.3 scores on MATH (77) and HumanEval (88).
Coding and math focus
If your use case is code generation, debugging, mathematical reasoning, or structured logic tasks, Phi-4 is one of the best models available regardless of size class.
Trade-off: multilingual
Phi-4 is primarily English-focused. Multilingual performance is noticeably weaker than Qwen3 14B. For multilingual use cases, Qwen3 is the better pick at the same VRAM tier.
What Phi-4 Can You Run on Your GPU?
Find your GPU or Mac below. Each card shows which Phi-4 variants fit, and what does not.
RTX 4060 8GB
Runs:
+Phi-4-mini Q4 (4.3 GB)
+Phi-4-mini Q8 (6.6 GB)
Does not fit:
-Phi-4 14B Q4 (10.4 GB)
-Phi-4 14B Q8 (18.8 GB)
An 8 GB card fits phi4-mini. It does not fit phi4 (10.4 GB at Q4). On 11 October 2026 the new buy box for the 4060 listing was not readable. Check current price on Amazon.
Intel Arc B580 12GB
Runs:
+Phi-4-mini Q4 (4.3 GB)
+Phi-4 14B Q4 (10.4 GB)
Does not fit:
-Phi-4 14B Q8 (18.8 GB)
-Phi-4 14B FP16 (35.6 GB)
12 GB holds phi4 at Q4 (10.4 GB) with little KV left. It does not hold Q8. Verify the Ollama oneAPI path before you buy Arc for this model. Check current price on Amazon.
RTX 4070 12GB
Runs:
+Phi-4-mini Q4 (4.3 GB)
+Phi-4 14B Q4 (10.4 GB)
Does not fit:
-Phi-4 14B Q8 (18.8 GB)
-Phi-4 14B FP16 (35.6 GB)
Same 12 GB ceiling as the Arc B580: phi4 at Q4 fits, Q8 does not. Check current price on Amazon.
RTX 4060 Ti 16GB
Runs:
+Phi-4-mini Q4 and Q8
+Phi-4 14B Q4 (10.4 GB)
Does not fit:
-Phi-4 14B Q8 (18.8 GB)
-Phi-4 14B FP16 (35.6 GB)
16 GB fits phi4 at Q4 and does not fit Q8. Check current price on Amazon.
RTX 4070 Ti Super 16GB
Runs:
+Phi-4 14B Q4 (10.4 GB)
Does not fit:
-Phi-4 14B Q8 (18.8 GB)
-Phi-4 14B FP16 (35.6 GB)
Faster than a 4060 Ti, same 16 GB ceiling. phi4 at Q8 still does not fit. No new price was recorded for this SKU on 11 October.
RTX 4080 16GB
Runs:
+Phi-4 14B Q4 (10.4 GB)
Does not fit:
-Phi-4 14B Q8 (18.8 GB)
-Phi-4 14B FP16 (35.6 GB)
Bandwidth does not change the 18.8 GB miss. Check current price on Amazon.
RTX 3090 24GB (used)
Runs:
+Phi-4 14B Q4 (10.4 GB)
+Phi-4 14B Q8 (18.8 GB)
Does not fit:
-Phi-4 14B FP16 (35.6 GB)
24 GB is the first discrete tier that fits phi4 at Q8. Check current price on Amazon.
RTX 4090 24GB
Runs:
+Phi-4 14B Q4 (10.4 GB)
+Phi-4 14B Q8 (18.8 GB)
Does not fit:
-Phi-4 14B FP16 (35.6 GB)
24 GB fits phi4 at Q8. It does not fit FP16. Check current price on Amazon.
RTX 5090 32GB
Runs:
+Phi-4 14B Q4 (10.4 GB)
+Phi-4 14B Q8 (18.8 GB)
Does not fit:
-Phi-4 14B FP16 (35.6 GB)
32 GB fits phi4 at Q8 and does not fit the 35.6 GB FP16 estimate. A 12 GB card already runs the Q4 file. Check current price on Amazon.
Mac mini M4 16GB
Runs:
+Phi-4-mini Q4 (4.3 GB)
+Phi-4 14B Q4 (10.4 GB), tight after a 4 GB macOS reserve
Does not fit:
-Phi-4 14B Q8 (18.8 GB)
Treat usable memory as about 12 GB. phi4 at Q4 is the ceiling and is tight. Q8 does not fit.
Mac mini M4 24GB
Runs:
+Phi-4 14B Q4 (10.4 GB)
+Phi-4 14B Q8 (18.8 GB), tight after the macOS reserve
Does not fit:
-Phi-4 14B FP16 (35.6 GB)
A 24 GB Mac is not a 24 GB GPU. Q8 can load and has little room for a long context. Check current price on Amazon.
Mac mini M4 Pro 48GB
Runs:
+Phi-4 14B Q8 (18.8 GB)
+Phi-4 14B FP16 (35.6 GB) after a 4 GB macOS reserve
Does not fit:
-Nothing in the Phi-4 family misses 48 GB unified
After a 4 GB reserve a 48 GB Mac still holds the 35.6 GB FP16 estimate. No new Amazon price was verified for the 48 GB M4 Pro mini on 11 October.
Inference Speed by Hardware
Token generation speed is bottlenecked by memory bandwidth. The table below shows estimated Q4_K_M token speeds at low batch size. Real-world results vary by driver version, context length, and system load.
Hardware
Bandwidth
Phi-4-mini tok/s
Phi-4 14B Q4 tok/s
Phi-4 14B Q8 tok/s
RTX 5090 32GB
1,792 GB/s
~400 t/s
~95 t/s
~60 t/s
RTX 4090 24GB
1,008 GB/s
~225 t/s
~55 t/s
~34 t/s
RTX 4070 Ti Super 16GB
672 GB/s
~150 t/s
~37 t/s
—
RTX 4080 16GB
720 GB/s
~160 t/s
~39 t/s
—
RTX 4060 Ti 16GB
288 GB/s
~64 t/s
~16 t/s
—
Intel Arc B580 12GB
456 GB/s
~102 t/s
~25 t/s
—
RTX 4060 8GB
272 GB/s
~61 t/s
—
—
Mac mini M4 Pro 48GB
~273 GB/s
~61 t/s
~15 t/s
~9 t/s
Mac mini M4 24GB
~120 GB/s
~27 t/s
~7 t/s
~4 t/s
Mac mini M4 16GB
~120 GB/s
~27 t/s
~7 t/s
—
Speed estimates: tokens/sec ≈ bandwidth (GB/s) / model size in memory (GB). Dash (—) means the model does not fit. An 8 GB GPU does not run phi4 at Q4, and a 16 GB GPU does not run it at Q8.
How to Run Phi-4 Locally
Ollama
ollama run phi4
Easiest option. For Phi-4 14B: ollama run phi4. For Phi-4-mini: ollama run phi4-mini. Both tags were on the Ollama library on 11 October 2026. Ollama defaults to a Q4 file. Use phi4 only when the card has 12 GB. An 8 GB GPU should stay on phi4-mini.
LM Studio
Search "Phi-4" in Discover
GUI-based model browser and chat interface. Search for "Phi-4" in the Discover tab to find Microsoft's official GGUF variants. Lets you select Q4, Q8, or other quantizations from a dropdown. Best for non-technical users on Windows, Mac, or Linux.
Hugging Face + llama.cpp
microsoft/phi-4
Download GGUF files from microsoft/phi-4 or community repos (bartowski, unsloth) on Hugging Face. Run with llama.cpp for maximum control over quantization, GPU layer count, and context length. Use --n-gpu-layers to tune how many layers load onto VRAM.
No GPU? Phi-4-mini (3.8B) is one of the best CPU-only models available. At Q4_K_M it needs about 4.3 GB of RAM and generates 4–8 tokens per second on a modern CPU — fast enough for practical use.
System RAM needed
Phi-4-mini at Q4: 4.3 GB. Phi-4 14B at Q4: 10.4 GB. For CPU inference, ensure your total system RAM exceeds the model size by at least 2–4 GB to leave room for the OS and context cache.
Speed on CPU
Phi-4-mini: 4–8 tok/s on a modern CPU (Ryzen 7, Core i7). Phi-4 14B on CPU: 1–3 tok/s — usable but slow. For 14B CPU inference, consider 32+ GB RAM and a fast CPU with many cores. Phi-4-mini is the practical CPU choice.
How to run CPU-only
With Ollama: ollama run phi4-mini — it auto-detects if no GPU is available and falls back to CPU. With llama.cpp: use --n-gpu-layers 0 to force CPU-only mode. LM Studio has a CPU mode toggle in settings.
All three target the same ~8–12 GB VRAM tier. Here is how they compare for local inference:
Phi-4 14B
Qwen3 14B
Gemma 3 12B
VRAM at Q4
10.4 GB
10.4 GB
9.2 GB
Thinking mode
No
Yes (built-in)
No
Coding
Excellent
Very good
Good
Reasoning/math
Excellent
Very good
Good
Multilingual
Poor
Excellent
Good
Creative writing
Average
Good
Good
Best for
Coding/math
General + multilingual
Balanced use
Choose Phi-4 if...
+Your primary use case is coding or math
+You want the best reasoning-per-VRAM ratio
+English-only tasks are your focus
+You prefer Microsoft's training approach
Choose Qwen3 14B if...
+You need built-in chain-of-thought reasoning
+Multilingual tasks are important
+You want a general-purpose model
+You want thinking mode without extra setup
Choose Gemma 3 12B if...
+You want Google-backed architecture
+You need balanced multilingual + reasoning
+You have 12 GB: Gemma 3 12B at Q4 is 9.2 GB and does not fit 8 GB
+You prioritize model diversity across sizes (1B–27B)
Which Hardware Should You Buy for Phi-4?
Entry tier
RTX 4060 8GB
Does not fit phi4 at Q4 (10.4 GB). It does fit phi4-mini (4.3 GB). Keep this card only if you already own it. Check current price on Amazon.
12 GB — best value
Intel Arc B580 12GB
Fits phi4 at Q4 (10.4 GB) and does not fit Q8 (18.8 GB). Verify the Ollama oneAPI path before you buy Arc for this model. Check current price on Amazon.
Mid tier
RTX 4060 Ti 16GB
Fits phi4 at Q4 (10.4 GB) and does not fit Q8 (18.8 GB). Check current price on Amazon.
Used 24 GB
RTX 3090 24GB
Fits phi4 at Q8 (18.8 GB). Does not fit FP16 (35.6 GB). Check current price on Amazon.
High end
RTX 4090 24GB
Fits phi4 at Q8 (18.8 GB) and does not fit FP16 (35.6 GB). A 12 GB card already runs the Q4 file. Check current price on Amazon.
Mac ecosystem
Mac mini M4 16GB
After a 4 GB macOS reserve, phi4 at Q4 (10.4 GB) is tight on 16 GB unified memory. Q8 (18.8 GB) does not fit. A 24 GB Mac holds Q8 and is tight. phi4-mini at 4.3 GB needs more than an 8 GB Mac, which leaves about 4 GB after macOS.
Phi-4 14B is the stronger reasoning and coding model in Microsoft's comparisons with Llama 3.1 8B. The VRAM cost is 10.4 GB at Q4 versus 6.8 GB for the 8B model. Phi-4 needs 12 GB. The 8B model fits 8 GB.
Can an 8GB GPU run Phi-4?
No. 14 × 0.6 + 2 = 10.4 GB, so an RTX 4060 8 GB does not fit phi4. Use a 12 GB card such as the Arc B580, or stay on ollama run phi4-mini (4.3 GB at Q4). Q8 of the 14B model is 18.8 GB and misses 16 GB.
How does Phi-4 compare to Qwen3 14B?
Both are 14 × 0.6 + 2 = 10.4 GB at Q4. Both fit 12 GB and miss 8 GB. Phi-4 leads on coding, math, and logical reasoning. Qwen3 14B has built-in thinking mode and is the stronger multilingual pick.
Can I run Phi-4 on a Mac?
Yes. Phi-4 runs well on Apple Silicon via Ollama or LM Studio. After about 4 GB for macOS, a 16 GB Mac holds Phi-4 at Q4 (10.4 GB) with about 1.6 GB to spare, so keep the context short. A 24 GB Mac holds Q8 (18.8 GB) with about 1.2 GB to spare. Phi-4-mini at Q4 (4.3 GB) fits a 16 GB Mac; on an 8 GB Mac it does not fit after the reserve.
How much VRAM does Phi-4 need?
Phi-4 (14B) at Q4 is 10.4 GB. Q8 is 18.8 GB. FP16 is 35.6 GB. Phi-4-mini (3.8B) at Q4 is 4.3 GB and fits 8 GB. The 14B model needs 12 GB at Q4. An 8 GB GPU does not fit it. Q8 needs 24 GB. FP16 does not fit 32 GB.
What is Phi-4-mini and how does it differ from Phi-4?
Phi-4-mini is a 3.8B parameter model from Microsoft that needs 4.3 GB of VRAM at Q4_K_M, so it fits an 8 GB GPU but not a 4 GB one. It is designed for edge devices, CPU-only inference, and low-memory GPUs. While smaller than Phi-4 (14B), it still outperforms many older 7B models on coding and reasoning. Use Phi-4-mini when you have an 8 GB GPU, run CPU-only, or need fast inference on a constrained device. Use Phi-4 14B when you have a 12 GB+ GPU and want maximum quality.
Check VRAM requirements for Phi-4, or compare hardware options.
VRAM figures on this page come from the site’s VRAM formula and model cards. The sitewide formula and the full source list are on the methodology page. For this guide we used:
Ollama. Phi-4 GGUF quants in the Ollama library, the ones we link from the install steps.
Spot a number that does not match the linked source? Contact us and we will update the guide.
We use cookies and personalised ads
This site uses cookies and shows personalised ads via Google AdSense. We and our partners store and access information on your device to serve relevant ads and improve your experience.
You can accept all cookies, decline (non-personalised ads only), or
manage preferences.
See our Privacy Policy.
Cookie preferences
Choose which cookies you allow. Strictly necessary cookies are always active.
Strictly necessary
Session state, security, and performance. Cannot be disabled.