•

Open weights model

•

Released December 2024

Phi-4 API Provider Benchmarking & Analysis

Model Comparison

This analysis is intended to support you in choosing the best API provider of Phi-4 for your use-case.

Fastest

#1
DeepInfraDeepInfra
93.3 t/s
#2
AzureAzure
40.5 t/s

Output speed

Total 2 providers

Lowest Latency

#1
DeepInfraDeepInfra
1.08 s
#2
AzureAzure
2.68 s

Time to first token

Total 2 providers

Lowest Price

#1
DeepInfraDeepInfra
$0.08
#2
AzureAzure
$0.16

Blended price (per 1M tokens)

Total 2 providers

Phi-4 is available through 2 API providers, each offering different performance characteristics and pricing. Below is a comparison of the key metrics across providers.

  • For output speed, the top providers are DeepInfra (93.3 t/s) and Azure (40.5 t/s).
  • For latency, DeepInfra (1.08s) and Azure (2.68s) offer the lowest time to first token.
  • For pricing, DeepInfra (0.08) and Azure (0.16) offer the lowest blended prices per 1M tokens.
  • DeepInfra stands out as the overall leader, ranking first across all three categories: speed, latency, and pricing.
Output tokens per second · Higher is better
Seconds to first answer token received · Lower is better
USD per 1M tokens (blended) · Lower is better

Update: Default performance benchmarking workload has updated to 10k input tokens to better reflect production use cases. You can still select different workloads above.

Pricing

Pricing: Cache Hit, Input, and Output: Phi-4

Price (USD per M Tokens) · Lower is better · 10,000 input tokens

Cost per Intelligence Index Task: Phi-4

Weighted average cost (USD) per Intelligence Index task · Segmented by token type · Lower is better
No data available

Output Speed vs. Price: Phi-4

Blended at 7:2:1 (cache-input-output) · Output speed: output tokens per second · USD per 1M tokens (blended)
Most attractive quadrant

Speed

Measured by Output Speed (tokens per second)

Output Speed: Phi-4

Output speed: output tokens per second · 10,000 input tokens

Time per Intelligence Index Task: Phi-4

Weighted average decode time (minutes) per Intelligence Index task · Excludes TTFT and overhead time · Lower is better
No data available

Cost per Task vs. Time per Task: Phi-4

Weighted average cost (USD) per Intelligence Index task · Weighted average decode time (minutes) per Intelligence Index task
Most attractive quadrant
No data available

Latency

Measured by Time (seconds) to First Token

Time to First Token: Phi-4

Seconds to first token received · Lower is better · 10,000 input tokens

End-to-End Response Time

Seconds to output 500 tokens, calculated based on time to first token, 'thinking' time for reasoning models, and output speed

End-to-End Response Time: Phi-4

Seconds to output 500 tokens, including reasoning model 'thinking' time · Lower is better · 10,000 input tokens

Key Comparison Metrics & API Features

DeepInfra logoDeepInfra
16.4k
Open
--
94
1.06
6.40
--
Microsoft Azure logoMicrosoft Azure
16.4k
Open
--
41
2.64
14.79
--

Frequently Asked Questions

Common questions about Phi-4 providers