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?
| Quantisation | 8K context | 16K context |
|---|---|---|
| FP16 / BF16 | 32 GB | 33 GB |
| Q8_0 (8-bit) | 18 GB | 19 GB |
| Q6_K | 14 GB | 16 GB |
| Q5_K_M | 12 GB | 14 GB |
| Q4_K_M | 11 GB | 13 GB |
| Q3_K_M | 9.4 GB | 11 GB |
| Q2_K | 8.0 GB | 9.5 GB |
Weights + FP16 KV cache + overhead, batch 1; the VRAM calculator shows the formula.
GPUs
Which GPUs can run Phi-4 14B?
| Memory | Example card | Best quality at 8K | Longest context at that quality | Longest context at Q4_K_M |
|---|---|---|---|---|
| 8 GB | GeForce RTX 4060 | Q2_K · 8.0 GB | 8K | — |
| 12 GB | GeForce RTX 5070 | Q4_K_M · 11 GB | 13K | 13K |
| 16 GB | GeForce RTX 5080 | Q6_K · 14 GB | 16K | 16K |
| 24 GB | Radeon RX 7900 XTX | Q8_0 (8-bit) · 18 GB | 16K | 16K |
| 32 GB | GeForce RTX 5090 | FP16 / BF16 · 32 GB | 9K | 16K |
| 48 GB | L40S | FP16 / BF16 · 32 GB | 16K | 16K |
| 80 GB | H100 80GB | FP16 / BF16 · 32 GB | 16K | 16K |
| 96 GB | RTX PRO 6000 Blackwell | FP16 / BF16 · 32 GB | 16K | 16K |
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 memory | GPU can use | Best quality at 8K | Longest context |
|---|---|---|---|
| 16 GB | 11 GB | Q3_K_M · 9.4 GB | 14K |
| 24 GB | 16 GB | Q6_K · 14 GB | 16K |
| 32 GB | 21 GB | Q8_0 (8-bit) · 18 GB | 16K |
| 36 GB | 27 GB | Q8_0 (8-bit) · 18 GB | 16K |
| 48 GB | 36 GB | FP16 / BF16 · 32 GB | 16K |
| 64 GB | 48 GB | FP16 / BF16 · 32 GB | 16K |
| 96 GB | 72 GB | FP16 / BF16 · 32 GB | 16K |
| 128 GB | 96 GB | FP16 / BF16 · 32 GB | 16K |
| 192 GB | 144 GB | FP16 / BF16 · 32 GB | 16K |
| 256 GB | 192 GB | FP16 / BF16 · 32 GB | 16K |
| 512 GB | 384 GB | FP16 / BF16 · 32 GB | 16K |
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?
| Context | KV cache, FP16 | KV cache, 8-bit | Total at Q4_K_M |
|---|---|---|---|
| 8,192 | 1.6 GB | 0.8 GB | 11 GB |
| 16,384 | 3.1 GB | 1.7 GB | 13 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 quantisation | Bits per weight | Approximate size |
|---|---|---|
| FP16 / BF16 | 16.00 | 27 GB |
| Q8_0 (8-bit) | 8.50 | 15 GB |
| Q6_K | 6.56 | 11 GB |
| Q5_K_M | 5.70 | 9.7 GB |
| Q4_K_M | 4.89 | 8.3 GB |
| Q3_K_M | 4.00 | 6.8 GB |
| Q2_K | 3.16 | 5.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 VRAM | In system RAM | RAM to have |
|---|---|---|
| 8 GB | 2.9 GB | 16 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
Try other settings in the VRAM calculator
- Guide: How much VRAM do you need to run an LLM locally?
- Glossary: Quantisation, GGUF, KV cache
Keep exploring