How much VRAM does phi-4 need?
In BF16 the weights alone take 27.3 GiB (29 GB). In FP8 that is 14.6 GiB, and about 8.35 GiB with 4-bit quantization (Q4_K_M). Each request then adds KV cache: 1.56 GiB at 8K tokens (BF16 cache).
Can phi-4 run on an 8 GB, 12 GB or 16 GB graphics card?
With a 32K context and llama.cpp: 8 GB (RTX 4060): only with part of the model in system RAM, about 4.7 tokens/s in Q4_K_M; 12 GB (RTX 3060): only with part of the model in system RAM, about 7.5 tokens/s in Q4_K_M; 16 GB (RTX 4060 Ti): yes, in Q3_K_M, about 15 tokens/s. Counted with 32 GB of system RAM. A shorter context needs less memory.
How fast is phi-4 on an RTX 4090 or an RTX 5090?
About 35 tokens/s on an RTX 4090 in Q8_0. About 60 tokens/s on an RTX 5090 in Q8_0. These are estimates for one request at a 32K context; against 23 published llama.cpp measurements on consumer and workstation GPUs, our estimates are 12% off at the median.
Can phi-4 run without a graphics card?
Yes, slowly: about 2.9 tokens/s in Q5_K_M on a processor with 32 GB of dual-channel DDR5 RAM (llama.cpp, 32K context).
Can phi-4 run a coding agent on an RTX 4090 or an RTX 5090?
Not well: its context stops at 16K tokens, and coding agents need at least 64K (Ollama's guidance for agents and coding tools).
Can phi-4 run on a single RTX 4090 (24 GB)?
Yes. In Q8_0 it fits on one RTX 4090 with an 8K-token context (16.2 GiB including the cache, with llama.cpp).
Can phi-4 run on an RTX 5090 (32 GB)?
Yes. In BF16 (28.9 GiB with an 8K-token context) it fits on one RTX 5090, with llama.cpp.
Can phi-4 run on a Mac?
Yes. In 4-bit (Q4_K_M with llama.cpp) it needs a Mac with 16 GB of unified memory or more, of which macOS gives the GPU about 12 GB, for one request with an 8K-token context. In 8-bit (Q8_0) it needs 24 GB or more.
Can phi-4 run on a DGX Spark or a Ryzen AI Max+ 395 (128 GB)?
Yes. In BF16 (28.9 GiB with an 8K-token context) it fits on a DGX Spark (128 GB) and on a Ryzen AI Max+ 395 with 128 GB, whose GPU gets up to 96 GB, with llama.cpp and one request.
What is the cheapest way to run phi-4?
On 2026-11-30, the cheapest on-demand setup is 1 × RTX A4000 (16 GB) with Q4_K_M weights on Vast.ai, at $0.072 per hour (about $52.56 per month). Next: 1 × GeForce RTX 4090 (24 GB) with Q8_0 weights on Vast.ai, at $0.100 per hour. Sized for one 8K-token request; prices are checked every hour.
How many H100 GPUs does phi-4 need?
With one request and an 8K-token context: 1 in BF16, 1 in FP8 and 1 in 4-bit (vLLM, 90% of memory usable). Serving many users at once needs more memory for their KV caches: the calculator sizes that for you.
What is phi-4's knowledge cutoff?
June 2024, according to its official model card: it knows little about later events.