whatmodel.sh / Phi-4-mini 3.8B

Phi-4-mini 3.8B is an open-weights language model from Microsoft, released February 2025. Its published size is 3.84B parameters and a 128k-token context window. Licence: mit.

43.7±0.7#470 of 719 LLMsfrom 40 benchmark results across 10 sources

$ how it compares

The LLMs ranked either side of Phi-4-mini 3.8B, out of 828 with a score, then more from Microsoft.

#modelscorewhereRAMreleased
557Code Tulu 2 34B Allen Institute for AI44±2local~72GB2023-11
558Qwen3 1.7B Alibaba44±1local~2.6GB2025-04
559Phi-4-mini 3.8B Microsoft44±1api $0.13/M +local~3.8GB2025-02
560Ministral 8B (2410) Mistral44±1local~6.2GB2024-10
561Granite 3.2 8B Instruct IBM44±1local~6.6GB2025-02
more from Microsoft
252Phi-4-reasoning-plus 14B Microsoft59±1local~10GB2025-04
261Phi-4-reasoning 14B Microsoft58±1api $0.22/M +local~10GB2025-04
365Phi-4 14B Microsoft53±1api $0.087/M +local~10GB2024-12

see all LLMs · find the ones that fit your machine

$ what it's good at

agent tasks▁▃▃▆█▆▅▅▅▄▃▁ #294 of 300 · 2.3% of its score · 3 tests

Beats QwQ-32B-Preview, DeepSeek-Coder-V2 Lite Instruct (16B-A2.4B) here, though they rank higher overall. Trails Granite 4.0 350M, Qwen2.5 0.5B Instruct, Granite 4.0 H 350M here, though they rank lower overall.

testresultvs the others in its rundifficultycountswhy
BFCL v328.2% ✎▁▁▃▁▁▃▅█▅▄▁▁ beats 6/114medium · avg 52%▇ 0.9%blunt · at its level
BFCL V4 (2025-11-03 archive, models absent from the December archive)21.7% ✎▃··▅▃▃·▅·▃·█ beats 0/10hard · avg 34%▇ 0.8%at its level
BFCL (version not stated) lab70.3% ✎▄▆▄▃·█▆·▄··▂ beats 7/17easy · avg 77%▇ 0.6%blunt · at its level · small run
coding▁▁▁▃▆██▇▆▄▃▁ #309 of 458 · 8.0% of its score · 4 tests

Beats Solar Open 100B (102B-A12B), GLM-4.7-Flash, Qwen3 4B Instruct 2507 here, though they rank higher overall. Trails DeepSeek LLM 67B Chat, WizardLM 70B V1.0 here, though they rank lower overall.

testresultvs the others in its rundifficultycountswhy
HumanEval lab74.4% ✎▁▁▁▁▁▃▅▅█▃▂▁ beats 140/190easy · avg 84%▇ 2.9%sharp · at its level · small run
HumanEval+ lab68.3% ✎▁·▁▁▂▃▄▄█▅▄▃ beats 74/145easy · avg 80%▇ 2.6%sharp · at its level · small run
MBPP lab65.3% ✎▁▁▁▄▅█▄▅▃▁▂▁ beats 57/81easy · avg 76%▇ 1.4%at its level · small run
MBPP+ lab63.8% ✎▁··▁▁▃▄█▆▄▁▁ beats 58/120easy · avg 71%▇ 1.0%at its level · small run
chat & writing█··········█ #1 of 2 * · 0.6% of its score · 1 test
testresultvs the others in its rundifficultycountswhy
IFEval (aggregation unspecified) lab70.1% ✎▁▁▃▁▃▄▄▆█▃▂▁ beats 32/141easy · avg 75%▇ 0.6%at its level · small run
math▁▂▃▅▆▅▄█▄▁▁▁ #279 of 398 · 17% of its score · 5 tests

Beats Molmo 2 8B, DeepSeek-Coder-V2 Instruct (0724), Llama 3.1 Nemotron 70B Instruct here, though they rank higher overall. Trails DeepSeek R1 Distill Qwen 1.5B, Granite 8B Code Base (4K), Mixtral 8x7B v0.1 (base) here, though they rank lower overall.

testresultvs the others in its rundifficultycountswhy
GSM8K lab88.6% ✎█·█▄▄█···█·▄ beats 8/10very easy · avg 91%▇▇▇ 6.7%sharp
MGSM lab63.9% ✎▅▃▃█·▅···▃·▃ beats 7/10easy · avg 71%▇▇ 4.9%at its level
MATH lab64.0% ✎█▄██···▄▄▄·▄ beats 9/10medium · avg 64%▇ 3.1%at its level
AIME 2024 lab10.0% ✎▁▁▁▃▁▃▁▅███▃ beats 9/85medium · avg 45%▇ 1.7%sharp · at its level · noisy
MATH-500 lab71.8% ✎▁▃▂▃▅▇▅▇█▅▂▁ beats 14/84easy · avg 84%▇ 1.1%noisy
other tests27 not in a task · 71% of its score
testresultvs the others in its rundifficultycountswhy
ARC Challenge lab83.7% ✎▂▂▂█▂···▄··▂ beats 6/10very easy · avg 91%▇▇▇▇ 9.5%sharp
MMLU lab67.3% ✎█▄█▄▄▄·▄▄··▄ beats 6/10easy · avg 77%▇▇ 6.2%at its level
CLIcK Korean (Daekeun Kim)42.8% ✎▆▄▄▄█▄▂·▄█·▄ beats 0/23medium · avg 58%▇▇ 6.1%at its level
BIG-Bench Hard lab70.4% ✎██▄·█▄·▄▄··▄ beats 8/10easy · avg 74%▇▇ 5.7%sharp · at its level
HAE-RAE 1.0 (Daekeun Kim)44.5% ✎▄▄▄▂▂█▂▄▂█▂▄ beats 1/22medium · avg 63%▇▇ 5.5%at its level
OpenBookQA lab79.2% ✎▂··▄█▂·▂···▄ beats 1/10easy · avg 87%▇▇ 5.5%at its level
MMLU-Pro lab52.8% ✎█▄▄·█▄▄▄·▄·▄ beats 8/10medium · avg 57%▇▇ 3.8%at its level
Multilingual MMLU (Microsoft) lab49.3% ✎█▄▄██··█···▄ beats 2/10easy · avg 65%▇ 3.5%at its level
19 more tests
testresultvs the others in its rundifficultycountswhy
CPTUB average (SpeakLeash, 0-5 judge scale)43.4% ✎▁▂▃▂▃█▃▆▅▄▂▃ beats 11/95easy · avg 66%▇ 3.1%at its level
GPQA Diamond lab36.9% ✎▁▁▁▁▂▄▅▅███▄ beats 38/310hard · avg 49%▇ 2.8%sharp
Polish EQ-Bench v2 (SpeakLeash)50.8% ✎▁··▁▁▂▂▆▅▆█▆ beats 25/70medium · avg 64%▇ 2.4%at its level
WinoGrande lab67.0% ✎▃····▃▃█▃·▅▅ beats 6/10medium · avg 74%▇ 2.3%at its level
HellaSwag lab69.1% ✎▃▅█·▃▃▃···▃▃ beats 0/10easy · avg 84%▇ 2.1%at its level
BoolQ lab81.2% ✎▃··▃··██▃·▃▃ beats 7/10easy · avg 85%▇ 2.0%at its level
Social IQA lab72.5% ✎▃·▃▅▅█·▃···▃ beats 2/10easy · avg 78%▇ 1.9%blunt · at its level
BRIDGE clinical text, zero-shot average (87 tasks)24.5% ✎▁▁▁▁▁▂▃▃▄▆█▃ beats 17/97hard · avg 32%▇ 1.8%blunt · at its level
KCL-Essay vanilla6.0% ✎▃···▁▃▂█▂▃▃▂ beats 0/23hard · avg 18%▇ 1.3%typical
GPQA (subset unspecified) lab25.2% ✎█··▄▂··▂▂··▄ beats 3/10very hard · avg 33%▇ 1.0%sharp · too hard for it · noisy
Open PT-LLM Leaderboard average (9 Portuguese tasks)66.5% ✎▃▁▁▁▁▁▁▁▂█▅▁ beats 127/276medium · avg 73%▇ 0.9%at its level · noisy
BigCodeBench (Complete) lab43.0% ✎▂▁▁▃▂▅▇█▅▂▂▂ beats 35/60medium · avg 51%▇ 0.9%at its level · small run
TruthfulQA MC2 lab66.4% ✎▂·█▂▃▄····▂▂ beats 6/10easy · avg 69%▇ 0.6%blunt · at its level
PIQA lab77.6% ✎▃·▅·▃█·▃▅··▃ beats 4/10easy · avg 83%▇ 0.6%blunt · at its level
BigCodeBench (Instruct) lab33.8% ✎▁▁··▁▁▂▅█▅▅▅ beats 20/49medium · avg 36%▇ 0.6%at its level · small run
KMMLU-HARD (Daekeun Kim, zero-shot)25.3% ✎█···▁▁▁▂▃·▆▂ beats 5/23very hard · avg 29%▇ 0.5%sharp · too hard for it
KCL-MCQA vanilla22.0% ✎▃···█▂▆▆██▆▂ beats 0/23very hard · avg 30%▇ 0.5%too hard for it
Vectara hallucination leaderboard, 2025 dataset (HHEM-2.3, factual consistency rate)96.6% ✎▁▁▂▃▄▄█▆▃▂▂▁ beats 96/140very easy · avg 94%▇ 0.3%blunt · noisy
Vectara hallucination leaderboard (HHEM-2.3, factual consistency rate)76.5% ✎▃▂▁▂▅█▂▃▄▃▁▁ beats 1/98very easy · avg 90%▇ 0.0%blunt

$ where to run it

Through an API

api · Microsoft Azure · $0.13/M · $0.075 in / $0.3 out per 1M tokens · 128k context · azure.microsoft.com ↗ · price sourceUSD per 1M tokens, Azure AI Foundry Models pay-as-you-go (Microsoft models table), 'Phi-4-mini' (Azure model id Phi-4-mini-instruct, GA), 128K context: input $0.075, output $0.30, region US East. Fine-tuned hosting/training rates excluded. Currency: USD. Microsoft Azure official pricing page (price cells carry the amounts in the page's own data), observed 2026-09-25.

llama.cpp · recommended

version

  1. Install llama.cpp · Homebrew and winget installs name the commands llama-cli and llama-server instead.
    macOS / Linux
    curl -LsSf https://llama.app/install.sh | sh
    Windows
    irm https://llama.app/install.ps1 | iex

    other ways to install ↗

  2. Run Phi-4-mini 3.8B · needs ~2.5 GB · from huggingface.co/lmstudio-community
    chat in the terminal
    llama cli -hf lmstudio-community/Phi-4-mini-instruct-GGUF:Q4_K_M
  3. Or start a local server and open the address it prints (http://localhost:9931)
    llama serve -hf lmstudio-community/Phi-4-mini-instruct-GGUF:Q4_K_M

LM Studio

version

  1. Install LM Studio · Open the app once before using the lms command.

    download it (macOS / Windows / Linux) ↗

  2. Run Phi-4-mini 3.8B · needs ~2.5 GB · from huggingface.co/lmstudio-community

    open in LM Studio ↗

  3. Or download it in the terminal
    lms get https://huggingface.co/lmstudio-community/Phi-4-mini-instruct-GGUF@Q4_K_M -y
  4. Then run lms ls to see its name, and lms chat followed by that name

Ollama

version

  1. Install Ollama

    download it (macOS / Windows) ↗

    Linux
    curl -fsSL https://ollama.com/install.sh | sh
  2. Run Phi-4-mini 3.8B · needs ~2.8 GB · from ollama.com
    chat in the terminal
    ollama run phi4-mini:3.8b

MLX (Mac)

version

  1. Install MLX (Mac) · Apple silicon Macs only, text only.
    with uv
    uv tool install mlx-lm
    or
    pip install mlx-lm
  2. Run Phi-4-mini 3.8B · needs ~2.2 GB, Mac only · from huggingface.co/mlx-community
    chat in the terminal
    mlx_lm.chat --model mlx-community/Phi-4-mini-instruct-4bit
  3. Or start an OpenAI-compatible server at http://localhost:8080/v1
    mlx_lm.server --model mlx-community/Phi-4-mini-instruct-4bit

Official weights and documentation: huggingface.co/microsoft ↗

$ how the score was worked out · microsoft/Phi-4-mini-instruct… 59%, Microsoft — Phi-4-Mini Techni… 16%, Daekeun Kim Korean LLM benchm… 12% and 7 more

Each result implies a score on its own, after adjusting for how hard its test is and who ran it. The 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's added up by who ran the tests. How it works

$ quantization evidence · 2 measurements

How much of the full-precision result a quantized version kept, measured within one study. Rows from the same study share a table and aren't independent.

precisiontestfull → quantizedkept
FP8 W8A8 dynamic (weights symmetric static per-channel, activations symmetric dynamic per-token)MMLU with chain-of-thought prompting (lm-evaluation-harness, vLLM)0.67 → 0.6799.9%source ↗
FP8 W8A8 dynamic (weights symmetric static per-channel, activations symmetric dynamic per-token)MMLU-Pro (lm-evaluation-harness, vLLM)0.468 → 0.45697.5%source ↗

$ improve this page

Use a short GitHub form or edit the data through a pull request. Every number needs a source; here's which ones we can use.

data updated · sources and licences · json