Phi-3-medium-128k-instruct
Microsoft (United States) · Language (text)
Which way is for me?
💻 On my own computer
- Download and install LM Studio (free): lmstudio.ai
- In LM Studio open Search (the magnifier) and type exactly:
bartowski/Phi-3-medium-128k-instruct-GGUF - From the list of files pick the version the check above suggested; if unsure, take Q4_K_M (compressed, slightly lower quality, less memory).
- Press Download, then Load, and start talking in Chat.
Or, if you use Ollama, this one command is enough:
ollama run hf.co/bartowski/Phi-3-medium-128k-instruct-GGUF🧑💻 For developers
vLLM
vllm serve microsoft/Phi-3-medium-128k-instructTransformers (Python)
from transformers import pipeline
pipe = pipeline("text-generation", model="microsoft/Phi-3-medium-128k-instruct")llama.cpp
llama-server -hf bartowski/Phi-3-medium-128k-instruct-GGUFWords used here
- GGUF
- The file format LM Studio, Ollama and llama.cpp use to run a model.
- Quantization (Q4, Q8)
- Shrinking a model by storing numbers less precisely: Q4 smallest and slightly weaker, Q8 almost full, FP16 full.
- VRAM
- The graphics card's memory (or shared memory on a Mac); the model has to fit in it.
- Context
- The most text the model can see at once in a conversation (questions, answers and files).
- Tokens per second
- How fast the answer is written; 20 is about reading speed, 5 is slow.
From the Hugging Face model card
The Phi-3-Medium-128K-Instruct is a 14B parameters, lightweight, state-of-the-art open model trained with the Phi-3 datasets that includes both synthetic data and the filtered publicly available websites data with a focus on high-quality and reasoning dense properties. The model belongs to the Phi-3 family with the Medium version in two variants 4k and 128K which is the context length (in tokens) that it can support.
Intended use
The model is intended for broad commercial and research use in English. The model provides uses for general purpose AI systems and applications which require :
Benchmarks (from the model card)
| Benchmark | Phi-3-Medium-128k-Instruct 14b | Command R+ 104B | Mixtral 8x22B | Llama-3-70B-Instruct | GPT3.5-Turbo version 1106 | Gemini Pro |
|---|---|---|---|---|---|---|
| AGI Eval 5-shot | 49.7 | 50.1 | 54.0 | 56.9 | 48.4 | 49.0 |
| MMLU 5-shot | 76.6 | 73.8 | 76.2 | 80.2 | 71.4 | 66.7 |
| BigBench Hard 3-shot | 77.9 | 74.1 | 81.8 | 80.4 | 68.3 | 75.6 |
| ANLI 7-shot | 57.3 | 63.4 | 65.2 | 68.3 | 58.1 | 64.2 |
| HellaSwag 5-shot | 81.6 | 78.0 | 79.0 | 82.6 | 78.8 | 76.2 |
| ARC Challenge 10-shot | 91.0 | 86.9 | 91.3 | 93.0 | 87.4 | 88.3 |
| ARC Easy 10-shot | 97.6 | 95.7 | 96.9 | 98.2 | 96.3 | 96.1 |
| BoolQ 2-shot | 86.5 | 86.1 | 82.7 | 89.1 | 79.1 | 86.4 |
Source: Hugging Face · microsoft/Phi-3-medium-128k-instruct · License: mit
Hardware and running it
Local Weights are published and it runs on your own hardware.
- Minimum Q4
- 9.4 GB
- Recommended Q8
- 16.8 GB
- Full quality FP16
- 33.5 GB
On common hardware
| RTX 4060 · 8 GB | Won't run | |
|---|---|---|
| RTX 4090 · 24 GB | Great | Q8 · ≈ 26–43 tokens/s |
| RTX 5090 · 32 GB | Great | Q8 · ≈ 46–77 tokens/s |
| Mac M4 Max · 128 GB | Usable | FP16 · ≈ 7–12 tokens/s |
| H100 · 80 GB | Great | FP16 · ≈ 43–72 tokens/s |
| 8× H100 · 640 GB | Great | FP16 · ≈ 350–580 tokens/s |
Speeds are estimates. estimated speed for one user, from memory bandwidth
Links come from the vendor's official site and the model card the vendor published · Updated: