LLMs ·

Phi-3.5 MoE (42B-A6.6B)

Parameters
42B (6.6B active)
Architecture
Mixture of experts
Max context
128K tokens
License
mit
Released
2024-08

How to run it

Quantized files · GGUF

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

huggingface.co/lmstudio-community/Phi-3.5-MoE-instruct-GGUF (opens in a new tab)

ollama run hf.co/lmstudio-community/Phi-3.5-MoE-instruct-GGUF

Original weights · Hugging Face

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

huggingface.co/microsoft/Phi-3.5-MoE-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 8K context Total at 32K context Download
Q2_K Low 16.7 GB 18.4 GB 21.6 GB GGUF files (opens in a new tab)
Q3_K_M Low 20.5 GB 22.2 GB 25.4 GB GGUF (Q3_K_L) (opens in a new tab)
Q4_K_M Good 25.5 GB 27.2 GB 30.4 GB GGUF (opens in a new tab)
Q5_K_M High 29.7 GB 31.4 GB 34.6 GB GGUF files (opens in a new tab)
Q6_K High 34.3 GB 36.0 GB 39.2 GB GGUF (opens in a new tab)
Q8_0 Very high 44.4 GB 46.1 GB 49.3 GB GGUF (opens in a new tab)
F16 Full 83.7 GB 85.4 GB 88.6 GB Original weights (opens in a new tab)

Best hardware for Phi-3.5 MoE (42B-A6.6B)

The least expensive GPU in our catalog that runs it without offloading is the AMD Radeon RX 7900 XT (launch price $899) at Q2_K.

Grade · points Hardware Quant Memory Speed Fit
78 ptsGreat (A) · 78 of 100 points: Model quality 23.9/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 14.9/15 Apple M4 Max (64 GB) Q4_K_M 31.1 GB / 48.0 GB 43.7 tok/s Runs well
77 ptsGreat (A) · 77 of 100 points: Model quality 23.9/45, Memory fit 24.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 5090 Q4_K_M 28.8 GB / 32.0 GB 167 tok/s Tight fit
77 ptsGreat (A) · 77 of 100 points: Model quality 25.2/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 12.2/15 NVIDIA RTX PRO 6000 Blackwell Q8_0 50.9 GB / 96.0 GB 84.8 tok/s Runs well
77 ptsGreat (A) · 77 of 100 points: Model quality 23.9/45, Memory fit 25.0/25, Speed 13.4/15, Memory use 14.9/15 Apple M1 Max (64 GB) Q4_K_M 31.1 GB / 48.0 GB 32.0 tok/s Runs well
75 ptsGreat (A) · 75 of 100 points: Model quality 21.2/45, Memory fit 24.0/25, Speed 15.0/15, Memory use 15.0/15 AMD Radeon RX 7900 XTX Q3_K_M 23.4 GB / 24.0 GB 99.4 tok/s Tight fit
75 ptsGreat (A) · 75 of 100 points: Model quality 21.2/45, Memory fit 24.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 3090 Q3_K_M 23.4 GB / 24.0 GB 113 tok/s Tight fit
75 ptsGreat (A) · 75 of 100 points: Model quality 21.2/45, Memory fit 24.0/25, Speed 15.0/15, Memory use 15.0/15 NVIDIA GeForce RTX 4090 Q3_K_M 23.4 GB / 24.0 GB 121 tok/s Tight fit
75 ptsGreat (A) · 75 of 100 points: Model quality 23.9/45, Memory fit 25.0/25, Speed 11.1/15, Memory use 15.0/15 Apple M4 Pro (48 GB) Q4_K_M 30.1 GB / 36.0 GB 21.9 tok/s Runs well
72 ptsGreat (A) · 72 of 100 points: Model quality 24.9/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 7.6/15 Apple M2 Ultra (192 GB) Q6_K 47.5 GB / 144 GB 44.4 tok/s Runs well
72 ptsGreat (A) · 72 of 100 points: Model quality 23.9/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 8.4/15 Apple M4 Max (128 GB) Q4_K_M 34.9 GB / 96.0 GB 43.7 tok/s Runs well

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.