LLMs ·

Phi-3 Medium (14B)

Parameters
14B
Architecture
Dense
Max context
4K tokens
License
mit
Released
2024-05

How to run it

Quickest · Ollama

One command downloads a ready-to-run version and starts a chat.

ollama run phi3:14b

Get Ollama at ollama.com/download (opens in a new tab) · model page (opens in a new tab)

Quantized files · GGUF

Works in LM Studio, llama.cpp, Jan and Ollama. No sign-in needed.

huggingface.co/bartowski/Phi-3-medium-4k-instruct-GGUF (opens in a new tab)

ollama run hf.co/bartowski/Phi-3-medium-4k-instruct-GGUF

Original weights · Hugging Face

Full-precision files from Microsoft, for fine-tuning, vLLM, Transformers.

huggingface.co/microsoft/Phi-3-medium-4k-instruct (opens in a new tab)

No sign-in needed.

Official repo · GitHub

Reference code, inference scripts and docs from Microsoft. The weights themselves download from Hugging Face.

github.com/microsoft/PhiCookBook (opens in a new tab)

git clone https://github.com/microsoft/PhiCookBook

Microsoft’s official Phi cookbook: setup, inference and fine-tuning guides.

Memory needed

Weights plus KV cache and runtime overhead. Leave a little extra free for the operating system and other apps.

Quantization Quality Weights Total at 4K context Download
Q2_K Low 5.6 GB 7.0 GB GGUF (opens in a new tab)
Q3_K_M Low 6.8 GB 8.3 GB GGUF (opens in a new tab)
Q4_K_M Good 8.5 GB 10.0 GB GGUF (opens in a new tab)
Q5_K_M High 9.9 GB 11.4 GB GGUF (opens in a new tab)
Q6_K High 11.4 GB 12.9 GB GGUF (opens in a new tab)
Q8_0 Very high 14.8 GB 16.2 GB GGUF (opens in a new tab)
F16 Full 27.9 GB 29.4 GB Original weights (opens in a new tab)

Best hardware for Phi-3 Medium (14B)

The least expensive GPU in our catalog that runs it without offloading is the Intel Arc A580 (launch price $179) at Q2_K.

Grade · points Hardware Quant Memory Speed Fit
75 ptsGreat (A) · 75 of 100 points: Model quality 20.7/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 3090 Q8_0 17.4 GB / 24.0 GB 41.9 tok/s Runs well
75 ptsGreat (A) · 75 of 100 points: Model quality 20.7/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 4090 Q8_0 17.4 GB / 24.0 GB 45.1 tok/s Runs well
75 ptsGreat (A) · 75 of 100 points: Model quality 20.1/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 15.0/15 AMD Radeon RX 9070 XT Q5_K_M 12.2 GB / 16.0 GB 40.0 tok/s Runs well
75 ptsGreat (A) · 75 of 100 points: Model quality 20.1/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 4070 Ti SUPER Q5_K_M 12.2 GB / 16.0 GB 48.8 tok/s Runs well
75 ptsGreat (A) · 75 of 100 points: Model quality 20.1/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 4080 SUPER Q5_K_M 12.2 GB / 16.0 GB 53.5 tok/s Runs well
75 ptsGreat (A) · 75 of 100 points: Model quality 20.1/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 5070 Ti Q5_K_M 12.2 GB / 16.0 GB 65.1 tok/s Runs well
75 ptsGreat (A) · 75 of 100 points: Model quality 20.1/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 5080 Q5_K_M 12.2 GB / 16.0 GB 69.7 tok/s Runs well
74 ptsGreat (A) · 74 of 100 points: Model quality 19.7/45, Memory fit 25.0/25, Speed 14.9/15, Memory use 15.0/15 NVIDIA GeForce RTX 5060 Ti 16GB Q4_K_M 10.8 GB / 16.0 GB 39.4 tok/s Runs well
74 ptsGreat (A) · 74 of 100 points: Model quality 20.5/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 13.5/15 AMD Radeon RX 7900 XTX Q6_K 14.1 GB / 24.0 GB 50.4 tok/s Runs well
73 ptsGreat (A) · 73 of 100 points: Model quality 19.7/45, Memory fit 24.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 4070 SUPER Q4_K_M 10.6 GB / 12.0 GB 44.3 tok/s Tight fit

Check it on your own hardware

Estimates come from published hardware specs and our open formulas, not from running the model on your machine. Real speed varies with runtime, drivers and settings. Numbers marked “Measured” come from a linked benchmark.