Llama Guard 4 12B vs Phi 4

Compare Llama Guard 4 12B from Meta Llama and Phi 4 from Microsoft 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 meta-llama
Llama Guard 4 12B
Favicon for microsoft
Phi 4

Overview

Llama Guard 4 12B
Author
Meta Llama
Phi 4
Author
Microsoft
Llama Guard 4 12B
Context length
164Ktokens
Phi 4
Context length
16Ktokens
Llama Guard 4 12B
Reasoning
No
Phi 4
Reasoning
No
Llama Guard 4 12B
Input modalities
Text, Image
Phi 4
Input modalities
Text
Llama Guard 4 12B
Output modalities
Text
Phi 4
Output modalities
Text

Analysis

Llama Guard 4 12B vs Phi 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.

Llama Guard 4 12B
Input price
$0.18/M tokens
Phi 4
Input price
$0.07/M tokens
Llama Guard 4 12B
Output price
$0.18/M tokens
Phi 4
Output price
$0.14/M tokens
Llama Guard 4 12B
Context window
163,840 tokens
Phi 4
Context window
16,384 tokens
Llama Guard 4 12B
Openness Index Artificial Analysis, best published result
Not available
Phi 4
Openness Index Artificial Analysis, best published result
50.0
Llama Guard 4 12B
GPQA Diamond score Artificial Analysis, best published result
Not available
Phi 4
GPQA Diamond score Artificial Analysis, best published result
57.5%
Llama Guard 4 12B
Latency (p50)
0.64 s
Phi 4
Latency (p50)
0.88 s
Llama Guard 4 12B
Throughput (p50)
44.0 tok/s
Phi 4
Throughput (p50)
85.0 tok/s
Llama Guard 4 12B
Provided by
Meta Llama
Phi 4
Provided by
Microsoft

Benchmark data updated

Frequently asked questions

Is Llama Guard 4 12B cheaper than Phi 4?

Phi 4 is cheaper than Llama Guard 4 12B on OpenRouter: Phi 4 costs $0.07/M tokens input and $0.14/M tokens output, while Llama Guard 4 12B costs $0.18/M tokens input and $0.18/M tokens output.

Which has the longer context window, Llama Guard 4 12B or Phi 4?

Llama Guard 4 12B has the longer context window at 163,840 tokens, compared with 16,384 tokens for Phi 4.

Which is faster, Llama Guard 4 12B or Phi 4?

Phi 4 is faster on OpenRouter, generating a median 85.0 tokens per second compared with 44.0 tokens per second for Llama Guard 4 12B.