Microsoft · small open-weight · Released 2024-01-23

Phi-4 8B: pricing, context window and benchmarks

Phi-4 8B is a small open-weight model from Microsoft. It offers a 32,768-token context window, costs $0.96 per million input tokens and $5.09 per million output tokens, and averages 54.9 across the index's benchmark suite.

open weightssmall
Input price
$0.96
per 1M tokens
Output price
$5.09
per 1M tokens
Context
32,768
tokens
Avg score
54.9
rank #524 of 600
Arena Elo
1256.7
modelled
Max output
32,768
tokens

Pricing

Phi-4 8B costs $0.96 per million input tokens and $5.09 per million output tokens. A blended 3:1 input-to-output mix works out to about $1.99 per million tokens. Cached input is listed at $0.12 per million tokens.

ItemPriceNotes
Input$0.96per 1M tokens
Output$5.09per 1M tokens
Cached input$0.12per 1M tokens
Blended 3:1$1.99estimate per 1M tokens
1M in + 1M out$6.05estimate

Benchmarks

Scores below are modelled estimates on a 0–100 scale. Use them to compare relative position, not as official vendor results.

BenchmarkScoreRankPercentileRelative
MMLU-Pro 61.9 504 16th
GPQA Diamond 53.2 489 19th
SWE-bench Verified 39.9 523 13th
HumanEval 57.1 531 12th
MATH-500 54.8 522 13th
AIME 2025 43.5 518 14th
LiveCodeBench 41.8 527 12th
IFEval 65.8 523 13th
TruthfulQA 62.2 501 17th
HellaSwag 70.9 523 13th
MMMU 52.5 524 13th
Arena Elo 1256.7 480 20th

What Phi-4 8B is good for

Phi-4 8B is a small model. That makes it a good fit for classification, extraction, routing, summarization and other high-volume jobs where latency and cost dominate. It is not the right pick for open-ended frontier reasoning, but at $0.96 per million input tokens it can handle a large share of production traffic.

Strengths

  • Input price of $0.96 per million tokens is at or below the index median.
  • Open weights make self-hosting, fine-tuning and data-residency review possible.

Trade-offs

  • Average benchmark score is below the index median; test it on your own task.
  • Less reliable on open-ended reasoning and complex multi-step instructions.

How it compares

ModelProviderContextInput / 1MAvg score
Llama 4 Maverick 1.5B Meta AI 8192 $0.93 55.2
Yi-Large 7B 01.AI 4096 $0.83 55.0
Phi-4 8B Microsoft 32768 $0.96 54.9
Mixtral Groq 8B Groq 32768 $0.77 54.8
GLM-4.6 1.5B Zhipu AI 4096 $0.92 54.7
MiniMax-M2 1.5B MiniMax 16384 $0.84 54.6

Browse all comparisons →

FAQ

How much does Phi-4 8B cost?

Phi-4 8B is listed at $0.96 per million input tokens and $5.09 per million output tokens. Cached input is $0.12 per million tokens. A blended 3:1 input-to-output mix is about $1.99 per million tokens.

What is the context window of Phi-4 8B?

Phi-4 8B has a context window of 32,768 tokens and can emit up to 32,768 output tokens per request in this index.

Is Phi-4 8B open weights?

Yes. Phi-4 8B is listed as an open-weight model under a open weights licence.

How does Phi-4 8B score on benchmarks?

Phi-4 8B averages 54.9 across the scored benchmarks in this index, ranking #524 of 600 models. Its strongest relative result is Arena Elo at 1256.7.

What is Phi-4 8B best for?

Phi-4 8B is a small model. That makes it a good fit for classification, extraction, routing, summarization and other high-volume jobs where latency and cost dominate. It is not the right pick for open-ended frontier reasoning, but at $0.96 per million input tokens it can handle a large share of production traffic.

Related