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
69.1 t/s
#2
AzureAzure
31.8 t/s

Output speed

Total 2 providers

Lowest Latency

#1
DeepInfraDeepInfra
0.85 s
#2
AzureAzure
2.85 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 (69.1 t/s) and Azure (31.8 t/s).
  • For latency, DeepInfra (0.85s) and Azure (2.85s) 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.

Highlights

Output tokens per second · Higher is better
Seconds · 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

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

Pricing: Blended Price

Blended at 7:2:1 (cache-input-output) · USD per 1M tokens (blended) · Lower is better

Output Speed vs. Price

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

Latency vs. Output Speed

Latency: seconds to first token received · Output speed: output tokens per second · 10,000 input tokens
Most attractive quadrant

Latency

Measured by Time (seconds) to First Token

Time to First Token

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

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

Key Comparison Metrics & API Features

Microsoft Azure logoMicrosoft Azure
16.4k
Open
--
40
2.56
14.93
--
DeepInfra logoDeepInfra
16.4k
Open
--
64
0.93
8.80
--

Frequently Asked Questions

Common questions about Phi-4 providers