Skip to content

Microsoft · model passport

Microsoft: Phi 4

phi-4
  • Open weights
  • MIT licence
  • 14.7B params
  • 16,384 context
  • Released 2024-12-12(curated)
12/27axes covered
Overall · LMArena
1,256#300 of 396
Best percentile
97.1HHEM Hallucination (Vectara)
Cohort standing
37.5median 42.0

What the data says

Benchmarked on 12 of 27 tracked axes. Every figure below is the model's own published result on that board.

Strongest axes

  • 97.1 pct — HHEM Hallucination (Vectara) (96.3%)

Weakest axes

  • 7.1 pct — IFBench (Artificial Analysis) (23.5%)

Uneven: 90 percentile points between its best and worst axis — 97.1 pct on HHEM Hallucination (Vectara) versus 7.1 pct on IFBench (Artificial Analysis).

  • HHEM Hallucination (Vectara)97.1 pct96.3%Verify →
  • MMLU-Pro (Artificial Analysis)44.2 pct71.4%Verify →
  • GPQA Diamond39.4 pct56.1%Verify →
  • BFCL v4 (function calling)Dormant board39 pct28.8%Verify →
  • LiveBench28.5 pct40.7%Verify →
  • LiveCodeBench (Artificial Analysis)27.5 pct23.1%Verify →
  • Hard prompts27.3 pct1,278Verify →
  • Coding26.9 pct1,306Verify →
  • AIME (math)26 pct13.8%Verify →
  • Instruction following25.8 pct1,245Verify →
  • Overall24.5 pct1,256Verify →
  • IFBench (Artificial Analysis)7.1 pct23.5%Verify →
  • WebDev ArenaNot benchmarked
  • Vision ArenaNot benchmarked
  • Factuality ArenaNot benchmarked
  • Search ArenaNot benchmarked
  • Document ArenaNot benchmarked
  • Agent ArenaNot benchmarked
  • FrontierMathNot benchmarked
  • SimpleQA VerifiedNot benchmarked
  • ARC-AGI-2Not benchmarked
  • Humanity's Last ExamNot benchmarked
  • SimpleBenchNot benchmarked
  • SWE-bench Verified (live board)Not benchmarked
  • Terminal-Bench 4.0Not benchmarked
  • SWE-bench VerifiedNot benchmarked
  • Terminal-BenchNot benchmarked

Percentiles are the model's standing within each board's own population. Axes marked "not benchmarked" have no published result for this model — that is an absence of data, not a low score.

How to run it

Run it yourself

Repositorymicrosoft/phi-4
Parameters14.7B
ArchitecturePhi3ForCausalLM
LicenceMIT

Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "microsoft/phi-4"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

Ollama

We don't sync Ollama tags, so we won't print a command we can't verify — a wrong one would pull the wrong model. Search the Ollama library →

Unsloth fine-tuning recipes are model-specific and we don't derive them here. Unsloth docs →

Use it hosted

API model IDmicrosoft/phi-4
Context length16,384 tokens
Max output14,745 tokens
Input price$0.07 per 1M tokens
Output price$0.14 per 1M tokens

API parameters this endpoint supports

Frequency penaltyLogit biasMax tokensMin-pPresence penaltyRepetition penaltyResponse formatSeedStop sequencesStructured outputsTemperatureTop-kTop-p

Example request

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"microsoft/phi-4","messages":[{"role":"user","content":"Hello"}]}'

View on OpenRouter →

Identifiers, limits and prices are synced from the upstream source shown above. Any field we haven't synced is left out entirely rather than guessed.

  • phi-4 stands at 37.5 (raw mean 34.4) — measured on 12 of 27 axes.

    standingtemplateVerify →
  • phi-4 stands at 37.5 versus a cohort median of 42 across 141 models released within 180 days — below the peer median.

    cohorttemplateVerify →

Every claim is a computed fact from the current board data, phrased by a low-temperature model call and rejected by a validation gate if any number is not in the source row. How the leaderboards work →