Skip to content

Phi 3 Medium 128K Instruct VRAM requirements

How much VRAM Phi 3 Medium 128K Instruct needs
4-bit weights: 7.9 GBWith 8K context: 10.1 GBWith 32K context: 14.8 GB8-bit, 8K context: 16.0 GB
Parameters
14B
Longest context
128K
Released
May 2024
License
MIT
Strongest at
Not rated

How much VRAM Phi 3 Medium 128K Instruct needs

Memory Phi 3 Medium 128K Instruct needs at each precision and context length
PrecisionWeightsWith 8KWith 32KWith 128K
16-bit26.0 GB28.2 GB32.9 GB51.7 GB
8-bit13.8 GB16.0 GB20.7 GB39.5 GB
6-bit10.7 GB12.9 GB17.6 GB36.3 GB
5-bit9.2 GB11.5 GB16.2 GB34.9 GB
4-bit7.9 GB10.1 GB14.8 GB33.5 GB
3-bit6.4 GB8.6 GB13.3 GB32.0 GB
2-bit4.9 GB7.1 GB11.8 GB30.5 GB
1.6-bit2.7 GB4.9 GB9.6 GB28.3 GB

One conversation, 16-bit context cache, runtime overhead included.

GPUs and Macs that run Phi 3 Medium 128K Instruct

The best way Phi 3 Medium 128K Instruct runs on common GPUs, Macs and AI boxes
MachineBest fitContextSpeedFirst replyReport
RTX 4060Too bigPDF: Phi 3 Medium 128K Instruct on RTX 4060 report
RTX 5060Too bigPDF: Phi 3 Medium 128K Instruct on RTX 5060 report
RTX 3070Too bigPDF: Phi 3 Medium 128K Instruct on RTX 3070 report
RTX 3080 10 GBToo bigPDF: Phi 3 Medium 128K Instruct on RTX 3080 10 GB report
RTX 3060 12 GB3-bit20K36 tok/s2.4 sPDF: Phi 3 Medium 128K Instruct on RTX 3060 12 GB report
Arc B5803-bit20K31 tok/s1.6 sPDF: Phi 3 Medium 128K Instruct on Arc B580 report
RTX 40703-bit20K49 tok/s1.0 sPDF: Phi 3 Medium 128K Instruct on RTX 4070 report
RTX 4070 Super3-bit20K49 tok/s0.9 sPDF: Phi 3 Medium 128K Instruct on RTX 4070 Super report
RTX 50703-bit20K64 tok/s1.0 sPDF: Phi 3 Medium 128K Instruct on RTX 5070 report
RTX 4060 Ti 16 GB6-bit16K17 tok/s1.4 sPDF: Phi 3 Medium 128K Instruct on RTX 4060 Ti 16 GB report
RTX 5060 Ti 16 GB6-bit16K27 tok/s1.3 sPDF: Phi 3 Medium 128K Instruct on RTX 5060 Ti 16 GB report
Arc A770 16 GB6-bit16K23 tok/s1.5 sPDF: Phi 3 Medium 128K Instruct on Arc A770 16 GB report
Radeon RX 9070 XT6-bit16K32 tok/s0.8 sPDF: Phi 3 Medium 128K Instruct on Radeon RX 9070 XT report
RTX 4070 Ti Super6-bit16K40 tok/s0.7 sPDF: Phi 3 Medium 128K Instruct on RTX 4070 Ti Super report
RTX 4080 Super6-bit16K43 tok/s0.6 sPDF: Phi 3 Medium 128K Instruct on RTX 4080 Super report
RTX 5070 Ti6-bit16K52 tok/s0.7 sPDF: Phi 3 Medium 128K Instruct on RTX 5070 Ti report
RTX 50806-bit16K55 tok/s0.5 sPDF: Phi 3 Medium 128K Instruct on RTX 5080 report
Radeon RX 7900 XTX8-bit40K36 tok/s1.3 sPDF: Phi 3 Medium 128K Instruct on Radeon RX 7900 XTX report
RTX 30908-bit40K42 tok/s0.9 sPDF: Phi 3 Medium 128K Instruct on RTX 3090 report
RTX 40908-bit40K46 tok/s0.4 sPDF: Phi 3 Medium 128K Instruct on RTX 4090 report
Radeon AI PRO R97008-bit80K25 tok/s0.9 sPDF: Phi 3 Medium 128K Instruct on Radeon AI PRO R9700 report
RTX 50908-bit80K78 tok/s0.3 sPDF: Phi 3 Medium 128K Instruct on RTX 5090 report
2× RTX 30908-bit128K42 tok/s0.5 sPDF: Phi 3 Medium 128K Instruct on 2× RTX 3090 report
2× RTX 40908-bit128K46 tok/s0.2 sPDF: Phi 3 Medium 128K Instruct on 2× RTX 4090 report
RTX PRO 5000 Blackwell 48 GB8-bit128K60 tok/s0.4 sPDF: Phi 3 Medium 128K Instruct on RTX PRO 5000 Blackwell 48 GB report
RTX 6000 Ada8-bit128K43 tok/s0.3 sPDF: Phi 3 Medium 128K Instruct on RTX 6000 Ada report
L40S8-bit128K39 tok/s0.5 sPDF: Phi 3 Medium 128K Instruct on L40S report
2× RTX 50908-bit128K78 tok/s0.2 sPDF: Phi 3 Medium 128K Instruct on 2× RTX 5090 report
4× RTX 30908-bit128K42 tok/s0.3 sPDF: Phi 3 Medium 128K Instruct on 4× RTX 3090 report
RTX PRO 6000 Blackwell8-bit128K78 tok/s0.2 sPDF: Phi 3 Medium 128K Instruct on RTX PRO 6000 Blackwell report
Mac mini M4 16 GB3-bit16K14 tok/s19 sPDF: Phi 3 Medium 128K Instruct on Mac mini M4 16 GB report
Mac mini M4 24 GB6-bit20K8.5 tok/s19 sPDF: Phi 3 Medium 128K Instruct on Mac mini M4 24 GB report
Mac mini M4 32 GB8-bit28K6.6 tok/s19 sPDF: Phi 3 Medium 128K Instruct on Mac mini M4 32 GB report
Mac mini M4 Pro 24 GB6-bit20K19 tok/s9.6 sPDF: Phi 3 Medium 128K Instruct on Mac mini M4 Pro 24 GB report
Mac mini M4 Pro 48 GB8-bit96K15 tok/s9.6 sPDF: Phi 3 Medium 128K Instruct on Mac mini M4 Pro 48 GB report
Mac mini M4 Pro 64 GB8-bit128K15 tok/s9.6 sPDF: Phi 3 Medium 128K Instruct on Mac mini M4 Pro 64 GB report
M4 Max 128 GB8-bit128K26 tok/s4.8 sPDF: Phi 3 Medium 128K Instruct on M4 Max 128 GB report
M5 Max 128 GB8-bit128K29 tok/s1.4 sPDF: Phi 3 Medium 128K Instruct on M5 Max 128 GB report
M3 Ultra 96 GB8-bit128K33 tok/s2.7 sPDF: Phi 3 Medium 128K Instruct on M3 Ultra 96 GB report
M3 Ultra 256 GB8-bit128K33 tok/s2.7 sPDF: Phi 3 Medium 128K Instruct on M3 Ultra 256 GB report
M3 Ultra 512 GB8-bit128K33 tok/s2.7 sPDF: Phi 3 Medium 128K Instruct on M3 Ultra 512 GB report
M5 Ultra 512 GB8-bit128K45 tok/s0.8 sPDF: Phi 3 Medium 128K Instruct on M5 Ultra 512 GB report
Ryzen AI Max+ 395 64 GB8-bit128K10 tok/s2.8 sPDF: Phi 3 Medium 128K Instruct on Ryzen AI Max+ 395 64 GB report
Ryzen AI Max+ 395 128 GB8-bit128K10 tok/s2.8 sPDF: Phi 3 Medium 128K Instruct on Ryzen AI Max+ 395 128 GB report
RTX Spark8-bit128K14 tok/s1.0 sPDF: Phi 3 Medium 128K Instruct on RTX Spark report
DGX Spark8-bit128K13 tok/s1.0 sPDF: Phi 3 Medium 128K Instruct on DGX Spark report
Dual DGX Spark8-bit128K13 tok/s0.6 sPDF: Phi 3 Medium 128K Instruct on Dual DGX Spark report
DGX Station GB3008-bit128K241 tok/s0.1 sPDF: Phi 3 Medium 128K Instruct on DGX Station GB300 report
2× RTX PRO 6000 Blackwell8-bit128K78 tok/s0.1 sPDF: Phi 3 Medium 128K Instruct on 2× RTX PRO 6000 Blackwell report
4× RTX PRO 6000 Blackwell8-bit128K78 tok/s0.1 sPDF: Phi 3 Medium 128K Instruct on 4× RTX PRO 6000 Blackwell report
8× RTX PRO 6000 Blackwell8-bit128K78 tok/s0.1 sPDF: Phi 3 Medium 128K Instruct on 8× RTX PRO 6000 Blackwell report
A100 80 GB SXM8-bit128K87 tok/s0.6 sPDF: Phi 3 Medium 128K Instruct on A100 80 GB SXM report
H100 SXM8-bit128K134 tok/s0.2 sPDF: Phi 3 Medium 128K Instruct on H100 SXM report
4× H200 NVL8-bit128K180 tok/s0.1 sPDF: Phi 3 Medium 128K Instruct on 4× H200 NVL report
8× H200 NVL8-bit128K180 tok/s0.1 sPDF: Phi 3 Medium 128K Instruct on 8× H200 NVL report

Best fit is the highest quality, up to 8-bit, that leaves 16K of context. First reply is the wait for a 2K prompt. Speeds are rough, plus or minus 25%.

How to run it

llama.cpp
llama-server -hf bartowski/Phi-3-medium-128k-instruct-GGUF
vLLM
vllm serve microsoft/Phi-3-medium-128k-instruct

Questions

How much VRAM does Phi 3 Medium 128K Instruct need?

Phi 3 Medium 128K Instruct needs 7.9 GB for its weights at 4-bit, 10.1 GB with an 8K context and 14.8 GB with 32K. At 8-bit, 16.0 GB.

What is the minimum VRAM for Phi 3 Medium 128K Instruct?

About 8.6 GB at 3-bit with an 8K context, the lowest precision we recommend for a model this size. The smallest machine here that runs it without spilling is the RTX 3060 12 GB.

How big is Phi 3 Medium 128K Instruct?

14B parameters: 26.0 GB of weights at 16-bit, 7.9 GB at 4-bit.

Can Phi 3 Medium 128K Instruct run on an RTX 4090?

Yes. At 8-bit it holds 40K of context and writes about 46 tokens a second.

More models