llmrun
MicrosoftPhi 4Phi3ForCausalLM

Phi 4 — Hardware Requirements & GPU Compatibility

ChatMathCode

Microsoft 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.

14.7B params · dense16K contextMIT299.1K downloads2.3K likes61.9K quant downloads
S

Runs great on a 24 GB GPU

Runs from8 GB IQ2_XXS · 16KBest on24 GB Q4_K_M · ~69 tok/s · 16KMacs from16 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

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
one command · needs Ollama installed
$ollama run hf.co/MaziyarPanahi/phi-4-GGUF:Q4_K_M

Q4_K_M fits fully on the RTX 4090 · 11.5 GB free · 16K context

Download: phi-4.Q4_K_M.gguf9.05 GBMaziyarPanahi

install, OS, other quants

Ways to runOther ways

each opens step-by-step

Run 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.

QuantizationVRAM+32KOn RTX 4090 (reference)
7.0 GB—2-bit · K-quant — 2-bit quantization with K-quant improvementsFits: 16K context · ~94 tok/s
7.1 GB—3-bit small — 3-bit small quantizationFits: 16K context · ~92 tok/s
7.9 GB—3-bit medium — 3-bit medium quantizationFits: 16K context · ~83 tok/s
8.1 GB—4-bit · legacy — 4-bit legacy quantizationFits: 16K context · ~81 tok/s
9.5 GB—4-bit medium — 4-bit medium quantization — most popular sweet spotFits: 16K context · ~69 tok/s
11.2 GB—5-bit medium — 5-bit medium quantization — good quality/size tradeoffFits: 16K context · ~59 tok/s
12.8 GB—6-bit, very good — 6-bit quantization, very good qualityFits: 16K context · ~51 tok/s
15.4 GB—8-bit, near-lossless — 8-bit quantization, near-losslessFits: 16K context · ~43 tok/s
est.calculated, no published file yet

Selected Q4_K_M

4-bit medium quantization

12.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 GB

Phi 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).

By VRAM tier · typical GPUs and Macs at Q4_K_M
8 GB · RTX 4060IQ2_XXS · 7.7 GB · ~37 tok/s · 16K8 GB tier →
12 GB · RTX 3060 12GBQ4_K_M · 12.5 GB · ~25 tok/s · 8Ktight12 GB tier →
16 GB · RTX 5060 Ti 16GBQ4_K_M · 12.5 GB · ~31 tok/s · 16K16 GB tier →
24 GB · RTX 4090referenceQ4_K_M · 12.5 GB · ~69 tok/s · 16K24 GB tier →
Mac 32 GB · Mac Mini M4Q4_K_M · 12.5 GB · ~9 tok/s · 16KMacs →
Mac 64 GB · Mac Studio M4 MaxQ4_K_M · 12.5 GB · ~40 tok/s · 16KMacs →

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

    56.1%

    #48/100 open

    Independent
  • LMArena Text

    LMArena · Oct 2026Arena

    1256.3

    #129/188 open

    Arena
  • AIME 2024/2025

    Epoch AI · Dec 2024Independent

    13.8%

    #59/88 open

    Independent
  • MMLU-Pro

    TIGER-LabIndependent

    70.4%

    #37/146 open

    Independent
  • MATH Level 5

    Epoch AI · Dec 2024Independent

    64.9%

    #9/39 open

    Independent
  • MMLU

    Epoch AI · Dec 2024Lab-reported

    84.8%

    #5/85 open

    Lab-reported

In the 24 GB class

36 models fit 24 GB

Same Score, only models that fit 24 GB at their best quant: the ranking a 24 GB owner actually chooses from.

  1. #1

    122.0

    ~38 tok/s · 17.9 GB

  2. #2

    111.2

    ~38 tok/s · 17.9 GB

  3. #3

    106.8

    ~151 tok/s · 22.0 GB

  4. #4

    106.7

    ~32 tok/s · 21.7 GB

  5. #5

    105.8

    ~171 tok/s · 16.5 GB

  6. #6

    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.

Similar models

10
ModelScoreVRAMtok/sWhy it is similar
Qwen3.6 27BAlibaba111.217.9 GB~38similar score
Gemma 4 31B ITGoogle106.721.7 GB~32similar score
Gemma 4 26B A4B ITGoogle105.816.5 GB~171similar score
Qwen3.5 35B A3BAlibaba105.822 GB~151similar score
Qwen3.5 27BAlibaba103.817.9 GB~38similar score
Seed OSS 36B InstructByteDance-Seed102.522.8 GB~31similar score
Qwen3.5 4BAlibaba98.53.4 GB~201similar score
Qwen3 30B A3B Instruct 2507Alibaba96.719.4 GB~173similar score
QwQ 32BAlibaba96.223 GB~34similar score
Qwen3 30B A3BAlibaba93.919.4 GB~173similar 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

9.5 GB
12.4 GB

Learn more about VRAM estimation →

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

IQ2_XXS
4.8 GB
IQ3_S
7.0 GB
Q3_K_L
8.2 GB
Q4_K_M ★
9.5 GB
Q5_0
9.9 GB
BF16
30.0 GB

★ Recommended — best balance of quality and VRAM usage.

Learn more about quantization →

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)

~546 tok/s
~69 tok/s
~546 tok/s
~504 tok/s

Real-world results typically within ±20%. Speed depends on batch size, quantization kernel, and software stack.

Learn more about tok/s estimation →

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.