Phi 4 vs GLM 5.4

Compare Phi 4 from Microsoft and GLM 5.4 from Z.ai on key metrics including benchmarks, price, context length, and other model features. Access both models and hundreds of others through the OpenRouter API.

Favicon for microsoft
Phi 4
Favicon for z-ai
GLM 5.4

Overview

Phi 4
Author
Microsoft
GLM 5.4
Author
Z.ai
Phi 4
Context length
16Ktokens
GLM 5.4
Context length
1.05Mtokens
Phi 4
Reasoning
No
GLM 5.4
Reasoning
Yes
Phi 4
Input modalities
Text
GLM 5.4
Input modalities
Text, Image, Video
Phi 4
Output modalities
Text
GLM 5.4
Output modalities
Text

Analysis

Phi 4 vs GLM 5.4 at a glance

Index and benchmark scores are from Artificial Analysis. Each score is the model's best published result across the configurations Artificial Analysis evaluated.

Phi 4
Input price
$0.07/M tokens
GLM 5.4
Input price
$0.40/M tokens
Phi 4
Output price
$0.14/M tokens
GLM 5.4
Output price
$2.464/M tokens
Phi 4
Context window
16,384 tokens
GLM 5.4
Context window
1,048,576 tokens
Phi 4
Openness Index Artificial Analysis, best published result
50.0
GLM 5.4
Openness Index Artificial Analysis, best published result
Not available
Phi 4
GPQA Diamond score Artificial Analysis, best published result
57.5%
GLM 5.4
GPQA Diamond score Artificial Analysis, best published result
Not available
Phi 4
Latency (p50)
0.83 s
GLM 5.4
Latency (p50)
0.56 s
Phi 4
Throughput (p50)
86.0 tok/s
GLM 5.4
Throughput (p50)
133.0 tok/s
Phi 4
Provided by
Microsoft
GLM 5.4
Provided by
Z.ai

Benchmark data updated

Frequently asked questions

Is Phi 4 cheaper than GLM 5.4?

Phi 4 is cheaper than GLM 5.4 on OpenRouter: Phi 4 costs $0.07/M tokens input and $0.14/M tokens output, while GLM 5.4 costs $0.40/M tokens input and $2.464/M tokens output.

Which has the longer context window, Phi 4 or GLM 5.4?

GLM 5.4 has the longer context window at 1,048,576 tokens, compared with 16,384 tokens for Phi 4.

Which is faster, Phi 4 or GLM 5.4?

GLM 5.4 is faster on OpenRouter, generating a median 133.0 tokens per second compared with 86.0 tokens per second for Phi 4.