[whatmodel.sh](../../README.md) / Phi-3 Medium 128K Instruct # Phi-3 Medium 128K Instruct Microsoft · released 2024-04 · 13.96B params · mit **score 46.6** ±1.2 · #443 of 732 · from 10 benchmark results across 5 sources Score within the [LMArena (text)](https://whatmodel.sh/?set=lmarena-text&score=set) comparison set only. ## What it's good at ● marks Phi-3 Medium 128K Instruct among every model on that task or test, worst to best.
task    vs the others          rank  counts  tests
coding  ▁▁▁▃▅▇●▇▅▄▃▁    #266 of 469     12%      4
math    ▁▁▃●█▆▄█▄▂▁▁   #355 of 431*     17%      1
coding · #266 of 469 · 12% of its score Beats [Qwen3-VL 32B Instruct](qwen3-vl-32b-instruct.md), [Solar Open 100B (102B-A12B)](solar-open-100b.md), [GLM-4.7-Flash](glm-4-7-flash.md) here, though they rank higher overall. Trails [DeepSeek LLM 67B Chat](deepseek-llm-67b-chat.md), [QwQ-32B-Preview](qwq-32b-preview.md) here, though they rank lower overall.
test                                result  vs the others in its run  difficulty        counts  why
CodeReviewQA: solution identifica…   50.8%  ▃··▁▂▂▃▂●▃▄▂ beats 26/47  medium · avg 51%    4.3%  sharp · at its level · noisy
CodeReviewQA: change localisation…   43.0%  █▂▁▁▂▂▂▃▅●▅▇ beats 32/47  hard · avg 33%      3.9%  sharp · noisy
CodeReviewQA: automated code refi…   30.2%  ▁▁▁▁▁▁▂▂▃●▅▄ beats 20/47  hard · avg 32%      3.3%  at its level
CodeReviewQA: change type recogni…   76.7%  ▁▁▁······▁▃● beats 37/47  easy · avg 67%      0.1%  blunt · at its level · noisy
math · #355 of 431 · 17% of its score Beats [GPT-3.5 Turbo (0125)](gpt-3-5-turbo-0125.md), [DBRX Instruct](dbrx-instruct.md) here, though they rank higher overall. Trails [OPT-2.7B](opt-2-7b.md), [Gemma 2B (base)](gemma-2b-base.md), [Stable Code 3B](stable-code-3b.md) here, though they rank lower overall.
test          result  vs the others in its run  difficulty      counts  why
MATH level 5   17.6%  ▂▂▅●▄█▆▃▅▂▃▄ beats 15/92  hard · avg 28%     17%  sharp
other tests (5)
test                                result  vs the others in its run    difficulty        counts  why
LiveBench 2024-07-26                 30.3%  ▁▁▁▂▂▃▂●▆▃▅▃ beats 28/61    medium · avg 38%     53%  at its level
GPQA Diamond                         27.6%  ▁▁●▁▂▄▆▄▅▇█▅ beats 12/211   hard · avg 39%       10%  sharp
RULER 64k                            78.6%  ▁▁·▁·▂●▄█▂·▁ beats 5/22     easy · avg 82%      3.4%  typical
Open PT-LLM Leaderboard average (…   71.7%  ▃▁▁▁▁▁▁▁▂●▅▁ beats 188/276  medium · avg 72%    3.4%  at its level · noisy
RULER 128k                           46.1%  ▄··▂●▂▆██▄▄▂ beats 3/21     easy · avg 67%      1.1%  at its level · noisy
## How the score was worked out Each result implies a score on its own, after adjusting for how hard that test is and who ran it. The model's score is their weighted average, with a small pull toward the middle for thinly tested models. Each test's weight is its *counts* column above; here it is added up by who ran the tests. [Method](../method.md)
source                                    results  share of the score
LiveBench model judgments                       1   53% ▇▇▇▇▇▇
Epoch AI                                        2   27% ▇▇▇
CodeReviewQA: The Code Review Comprehen…        4   12% ▇
NVIDIA RULER repository README results …        2    5% ▇
Open Portuguese LLM Leaderboard                 1    3% ▇
prior: pull toward the middle                        1% ▇
weighted average                                   = 46.6
Licences: LiveBench model judgments ([Apache-2.0 (stated in the LiveBench datasheet)](https://www.apache.org/licenses/LICENSE-2.0)) · Epoch AI ([CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)) · CodeReviewQA: The Code Review Comprehension Assessment for Large Language Models ([CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/)) · NVIDIA RULER repository README results table ([Apache-2.0](https://github.com/NVIDIA/RULER/blob/c3f5e3b4f87f97e048793bb510a3a6b19a46bf3a/LICENSE)) · Open Portuguese LLM Leaderboard ([Apache-2.0](../../licenses/hf-leaderboard-spaces-Apache-2.0.txt)) ## How to run it ### llama.cpp (recommended) 1. Install llama.cpp. Homebrew and winget installs name the commands llama-cli and llama-server instead. [Other ways to install](https://github.com/ggml-org/llama.cpp/blob/master/docs/install.md) ```sh # macOS / Linux curl -LsSf https://llama.app/install.sh | sh # Windows irm https://llama.app/install.ps1 | iex ``` 2. Run Phi-3 Medium 128K Instruct (Q4_K_M, needs ~8.6 GB, from [huggingface.co/bartowski](https://huggingface.co/bartowski/Phi-3-medium-128k-instruct-GGUF/tree/950c8154e91f33193217eebf1c26903af44c6e13)) ```sh llama cli -hf bartowski/Phi-3-medium-128k-instruct-GGUF:Q4_K_M ``` 3. Or start a local server and open the address it prints (http://localhost:9931) ```sh llama serve -hf bartowski/Phi-3-medium-128k-instruct-GGUF:Q4_K_M ``` Other versions: Q8_0 (~14.8 GB) `llama cli -hf bartowski/Phi-3-medium-128k-instruct-GGUF:Q8_0` ### LM Studio 1. Install LM Studio. Open the app once before using the lms command. [Download it (macOS / Windows / Linux)](https://lmstudio.ai/download) 2. Run Phi-3 Medium 128K Instruct (Q4_K_M, needs ~8.6 GB, from [huggingface.co/bartowski](https://huggingface.co/bartowski/Phi-3-medium-128k-instruct-GGUF/tree/950c8154e91f33193217eebf1c26903af44c6e13)) ```sh lms get https://huggingface.co/bartowski/Phi-3-medium-128k-instruct-GGUF@Q4_K_M -y ``` 3. Then run lms ls to see its name, and lms chat followed by that name Other versions: Q8_0 (~14.8 GB) `lms get https://huggingface.co/bartowski/Phi-3-medium-128k-instruct-GGUF@Q8_0 -y` · 4bit (~7.9 GB, Mac only) `lms get https://huggingface.co/mlx-community/Phi-3-medium-128k-instruct-4bit -y` · 8bit (~14.8 GB, Mac only) `lms get https://huggingface.co/mlx-community/Phi-3-medium-128k-instruct-8bit -y` ### Ollama 1. Install Ollama. [Download it (macOS / Windows)](https://ollama.com/download) ```sh # Linux curl -fsSL https://ollama.com/install.sh | sh ``` 2. Run Phi-3 Medium 128K Instruct (Q4_0, needs ~8.88 GB, from [ollama.com](https://ollama.com/library/phi3/tags)) ```sh ollama run phi3:medium-128k ``` Other versions: Q8_0 (~17.25 GB) `ollama run phi3:14b-medium-128k-instruct-q8_0` ### MLX (Mac) 1. Install MLX (Mac). Apple silicon Macs only, text only. ```sh # with uv uv tool install mlx-lm # or pip install mlx-lm ``` 2. Run Phi-3 Medium 128K Instruct (4bit, needs ~7.9 GB, Mac only, from [huggingface.co/mlx-community](https://huggingface.co/mlx-community/Phi-3-medium-128k-instruct-4bit/tree/9cffe737ae8c598cf3fca728b8417132754043f8)) ```sh mlx_lm.chat --model mlx-community/Phi-3-medium-128k-instruct-4bit ``` 3. Or start an OpenAI-compatible server at http://localhost:8080/v1 ```sh mlx_lm.server --model mlx-community/Phi-3-medium-128k-instruct-4bit ``` Other versions: 8bit (~14.8 GB, Mac only) `mlx_lm.chat --model mlx-community/Phi-3-medium-128k-instruct-8bit` Model repository and documentation: [huggingface.co/microsoft](https://huggingface.co/microsoft/Phi-3-medium-128k-instruct) [interactive version](https://whatmodel.sh/model/phi-3-medium-128k-instruct) · [JSON](https://whatmodel.sh/api?format=json&all=1)