Skip to content
AI Dev Toolkit.
Esc
  • Loading…

VRAM · Local model

Phi-4 14B VRAM requirements: can you run it locally?

Yes, on one 12 GB GPU such as the GeForce RTX 5070, or a Mac with 24 GB of unified memory. At Q4_K_M and an 8K context it needs about 11 GB. At 8-bit (Q8_0) it needs about 18 GB, which fits a 24 GB card. Estimates from the model’s official config.json, checked 2026-10-08.

Parameters
14.7B
Layers
40
Max context
16,384
Experts
Dense

Attention: 40 full-attention layers.

Requirements

How much VRAM does Phi-4 14B need?

Quantisation8K context16K context
FP16 / BF1632 GB33 GB
Q8_0 (8-bit)18 GB19 GB
Q6_K14 GB16 GB
Q5_K_M12 GB14 GB
Q4_K_M11 GB13 GB
Q3_K_M9.4 GB11 GB
Q2_K8.0 GB9.5 GB

Weights + FP16 KV cache + overhead, batch 1; the VRAM calculator shows the formula.

GPUs

Which GPUs can run Phi-4 14B?

MemoryExample cardBest quality at 8KLongest context at that qualityLongest context at Q4_K_M
8 GBGeForce RTX 4060Q2_K · 8.0 GB8K—
12 GBGeForce RTX 5070Q4_K_M · 11 GB13K13K
16 GBGeForce RTX 5080Q6_K · 14 GB16K16K
24 GBRadeon RX 7900 XTXQ8_0 (8-bit) · 18 GB16K16K
32 GBGeForce RTX 5090FP16 / BF16 · 32 GB9K16K
48 GBL40SFP16 / BF16 · 32 GB16K16K
80 GBH100 80GBFP16 / BF16 · 32 GB16K16K
96 GBRTX PRO 6000 BlackwellFP16 / BF16 · 32 GB16K16K

The smallest card that holds Phi-4 14B at Q4_K_M with an 8K context has 12 GB, such as the GeForce RTX 5070; there it has room for about 13K tokens. Every extra gigabyte goes to context: on a 16 GB card the limit rises to 16K. For 8-bit or better you need a 24 GB card, and full 16-bit precision (32 GB) fits from 32 GB.

Apple Silicon

Can you run Phi-4 14B on a Mac?

Mac memoryGPU can useBest quality at 8KLongest context
16 GB11 GBQ3_K_M · 9.4 GB14K
24 GB16 GBQ6_K · 14 GB16K
32 GB21 GBQ8_0 (8-bit) · 18 GB16K
36 GB27 GBQ8_0 (8-bit) · 18 GB16K
48 GB36 GBFP16 / BF16 · 32 GB16K
64 GB48 GBFP16 / BF16 · 32 GB16K
96 GB72 GBFP16 / BF16 · 32 GB16K
128 GB96 GBFP16 / BF16 · 32 GB16K
192 GB144 GBFP16 / BF16 · 32 GB16K
256 GB192 GBFP16 / BF16 · 32 GB16K
512 GB384 GBFP16 / BF16 · 32 GB16K

At Q4_K_M and an 8K context, Phi-4 14B needs a Mac with at least 24 GB of unified memory; 8-bit needs 32 GB and full precision needs 48 GB. By default macOS lets the GPU use about two thirds of memory on Macs with 32 GB or less and about three quarters on larger ones; the table uses that limit. You can raise it with sudo sysctl iogpu.wired_limit_mb, leaving at least 8 GB for macOS.

Context

How much memory does Phi-4 14B’s context use?

ContextKV cache, FP16KV cache, 8-bitTotal at Q4_K_M
8,1921.6 GB0.8 GB11 GB
16,3843.1 GB1.7 GB13 GB

Phi-4 14B’s FP16 cache grows by about 195 MB for every 1,000 tokens. At 8K tokens that is 1.6 GB, 14% of the total at Q4_K_M; at its full 16,384-token context it is 3.1 GB, 37% of the 8.3 GB of Q4_K_M weights. All 40 layers use full attention and cache 2,560 values (keys plus values for its KV heads) per token, so the cache grows in a straight line with the context. On a 24 GB card at Q4_K_M, the longest context is about 16K tokens with an FP16 cache, its full context.

Download

How big is the Phi-4 14B download?

GGUF quantisationBits per weightApproximate size
FP16 / BF1616.0027 GB
Q8_0 (8-bit)8.5015 GB
Q6_K6.5611 GB
Q5_K_M5.709.7 GB
Q4_K_M4.898.3 GB
Q3_K_M4.006.8 GB
Q2_K3.165.4 GB

A 14.7B-parameter model takes about 8.3 GB of disk at Q4_K_M and 27 GB as 16-bit weights, so the quantised file saves about 19 GB. Sizes are parameters × bits per weight; real GGUF files differ by a few per cent because some tensors stay at higher precision.

Offload

Can you run Phi-4 14B with less VRAM by offloading to RAM?

GPU VRAMIn system RAMRAM to have
8 GB2.9 GB16 GB

Yes: llama.cpp can keep part of Phi-4 14B in system RAM and run it on the CPU, so the GPU and RAM together need about 11 GB at Q4_K_M and an 8K context. On an 8 GB card that leaves 2.9 GB in RAM. As a dense model, every token reads all 14.7B parameters, so each layer moved to RAM (fewer --n-gpu-layers) is limited by RAM bandwidth and generation slows as more of it leaves the GPU.

Compare

Models of a similar size to Phi-4 14B

FAQ

Frequently asked questions

How much VRAM does Phi-4 14B need?

With an 8K context, about 11 GB at Q4_K_M, 18 GB at 8-bit (Q8_0) and 32 GB at full 16-bit precision. That covers the weights, the KV cache and runtime overhead.

Can Phi-4 14B run on a 24 GB GPU like the RTX 4090?

Yes: the best quality that fits with an 8K context is Q8_0 (8-bit), at about 18 GB, and at that setting it has room for about 16K tokens.

Can I run Phi-4 14B on a Mac?

Yes: at Q4_K_M and an 8K context it fits a Mac with 24 GB of unified memory using macOS’s default GPU memory limit (about 16 GB for the GPU).

Can Phi-4 14B run on 16, 12 or 8 GB?

Best quality with an 8K context: 16 GB: Q6_K at about 14 GB, with up to 16K tokens; 12 GB: Q4_K_M at about 11 GB, with up to 13K tokens; 8 GB: Q2_K at about 8.0 GB, with up to 8K tokens.

How big is the Phi-4 14B download?

About 8.3 GB for a Q4_K_M GGUF, 15 GB at Q8_0 and 27 GB for the 16-bit weights.

What is the longest context Phi-4 14B can use on 24 GB?

About 16K tokens at Q4_K_M with an FP16 cache. Its maximum is 16,384 tokens.

Related

Try other settings in the VRAM calculator

Keep exploring