RunsOnMy ModelsGPUs & MacsAPI pricesVRAM calculatorNew

Can I run phi 2 locally?

phi 2 by microsoft has 2.8B parameters. At 4-bit with an 8K context it needs about 4.7 GB of GPU memory. It fits on 65 of 65 GPUs and Macs we track.

4.7 GBQ4_K_M · 8K context
RTX 4060smallest consumer GPU that fits
M1 16GBsmallest Mac that fits
2Kmax context
MHAattention type

Memory needed by quant and context length

GB of GPU memory = weights + KV cache (FP16) + runtime overhead. Weights use real file sizes from TheBloke/phi-2-GGUF where available (marked •), otherwise parameter count × bits per weight. How we calculate.

QuantQuality
2-bit (Q2_K) •rough
3-bit (Q3_K_M) •usable
4-bit (Q4_K_M) •good, most popular
5-bit (Q5_K_M) •very good
6-bit (Q6_K) •near lossless
8-bit (Q8_0) •effectively lossless
16-bit (F16/BF16)original weights

Which GPUs and Macs run phi 2?

Best quality quant that fits at 8K context. "Tight" = within 10% of usable memory. Speed is a ceiling from memory bandwidth (real speed is typically 50–80% of it).

HardwareMemoryFits?Best quantNeedsMax tok/s (est.)
RTX 3060 12GB12 GBFitsF168.2 GB65details
RTX 4060 Ti 16GB16 GBFitsF168.2 GB52details
RTX 309024 GBFitsF168.2 GB168details
RTX 409024 GBFitsF168.2 GB181details
RTX 509032 GBFitsF168.2 GB322details
RTX 5070 Ti16 GBFitsF168.2 GB161details
RX 7900 XTX24 GBFitsF168.2 GB173details
Mac M4 Pro 48GB48 GBFitsF168.2 GB49details
Mac M4 Max 128GB128 GBFitsF168.2 GB98details
Mac M3 Ultra 512GB512 GBFitsF168.2 GB147details
DGX Spark128 GBFitsF168.2 GB49details
RTX 407012 GBFitsF168.2 GB91details
RTX 5060 Ti 16GB16 GBFitsF168.2 GB81details
RTX 40608 GBFitsQ8_05.8 GB92details
Arc B58012 GBFitsF168.2 GB82details
RTX 3060 Ti8 GBFitsQ8_05.8 GB151details
RTX 30708 GBFitsQ8_05.8 GB151details
RTX 3080 10GB10 GBFitsF168.2 GB137details
RTX 3080 12GB12 GBFitsF168.2 GB164details
RTX 3090 Ti24 GBFitsF168.2 GB181details
RTX 4060 Ti 8GB8 GBFitsQ8_05.8 GB97details
RTX 4070 Super12 GBFitsF168.2 GB91details
RTX 4070 Ti12 GBFitsF168.2 GB91details
RTX 4070 Ti Super16 GBFitsF168.2 GB121details
RTX 408016 GBFitsF168.2 GB129details
RTX 4080 Super16 GBFitsF168.2 GB132details
RTX 50608 GBFitsQ8_05.8 GB151details
RTX 507012 GBFitsF168.2 GB121details
RTX 508016 GBFitsF168.2 GB173details
2x RTX 30902×24 GBFitsF168.2 GB168details
2x RTX 40902×24 GBFitsF168.2 GB181details
2x RTX 50902×32 GBFitsF168.2 GB322details
RTX A600048 GBFitsF168.2 GB138details
RTX 6000 Ada48 GBFitsF168.2 GB173details
RTX PRO 6000 Blackwell96 GBFitsF168.2 GB322details
L40S48 GBFitsF168.2 GB155details
A100 40GB40 GBFitsF168.2 GB280details
A100 80GB80 GBFitsF168.2 GB367details
H100 PCIe80 GBFitsF168.2 GB360details
H100 SXM80 GBFitsF168.2 GB603details
H200141 GBFitsF168.2 GB863details
RX 76008 GBFitsQ8_05.8 GB97details
RX 7700 XT12 GBFitsF168.2 GB78details
RX 7800 XT16 GBFitsF168.2 GB112details
RX 7900 GRE16 GBFitsF168.2 GB104details
RX 7900 XT20 GBFitsF168.2 GB144details
RX 907016 GBFitsF168.2 GB115details
RX 9070 XT16 GBFitsF168.2 GB115details
Ryzen AI Max+ 395 128GB128 GBFitsF168.2 GB46details
Arc A770 16GB16 GBFitsF168.2 GB101details
Mac M1 16GB16 GBFitsF168.2 GB12details
Mac M2 24GB24 GBFitsF168.2 GB18details
Mac M3 24GB24 GBFitsF168.2 GB18details
Mac M4 16GB16 GBFitsF168.2 GB22details
Mac M4 32GB32 GBFitsF168.2 GB22details
Mac M1 Pro 32GB32 GBFitsF168.2 GB36details
Mac M3 Pro 36GB36 GBFitsF168.2 GB27details
Mac M4 Pro 24GB24 GBFitsF168.2 GB49details
Mac M4 Pro 64GB64 GBFitsF168.2 GB49details
Mac M1 Max 64GB64 GBFitsF168.2 GB72details
Mac M2 Max 96GB96 GBFitsF168.2 GB72details
Mac M3 Max 128GB128 GBFitsF168.2 GB72details
Mac M4 Max 64GB64 GBFitsF168.2 GB98details
Mac M2 Ultra 192GB192 GBFitsF168.2 GB144details
Mac M3 Ultra 256GB256 GBFitsF168.2 GB147details

Questions

How much VRAM does phi 2 need?

About 4.7 GB at 4-bit (Q4_K_M) with an 8K context: 1.7 GB of weights (real GGUF file size), 2.5 GB of KV cache and 0.5 GB of runtime overhead. At 8-bit it needs about 5.8 GB.

What is the smallest GPU that runs phi 2?

At Q4_K_M and 8K context, the smallest single consumer GPU in our table that fits it is the RTX 4060 (8 GB).

Can I run phi 2 on a Mac?

Yes. At Q4_K_M with 8K context it fits on a Mac M1 16GB or larger, using the default macOS GPU memory limit.

Model facts

Hugging Face repomicrosoft/phi-2
Parameters2,779,683,840 (2.8B)
Layers / hidden size32 / 2560
AttentionMHA; 32 heads, 32 KV heads, head dim 80
KV cache per token (FP16)320.0 KiB
Max context2,048 tokens
Licensemit
Released on HFDec 13, 2023
Downloads (30d) / likes179,705 / 3,536

Sources: Hugging Face model API · config.json (microsoft/phi-2) · GGUF files · GPU specs from vendor pages (list). Data fetched Nov 17, 2026. Spot an error? Report it.