Enter opens the highlighted result. Esc closes.

Llama Guard 4 12B vs Phi 4

Phi 4 costs 1.3x less per output token than Llama Guard 4 12B ($0.14 vs $0.18 per million). Updated October 21, 2026; no benchmark has tested both models yet.

Llama Guard 4 12BMeta Llama
Coding
No data
Overall
No data
Output $/M
$0.18
Phi 4Microsoft
Coding
No data
Overall
5.9
Output $/M
$0.14
vs $0.18 vs $0.14 per 1M output tokens. Phi 4 is 1.3x cheaper.

Llama Guard 4 12B or Phi 4: which to pick

Neither model has a coding score yet, so the two cannot be ranked on coding.

Pick Llama Guard 4 12B for a larger context window (164K against 16K tokens).

No benchmark has tested both yet. Llama Guard 4 12B has none yet; Phi 4 on LiveCodeBench (Artificial Analysis run), Terminal-Bench Hard (Artificial Analysis run) and LMArena Text: coding. Compare them on price and context instead.

Which one for your work

Each card is decided by one number both models carry. Where only one has it, the card says so and makes no call.

At a glance

Coding index
Llama Guard 4 12B not benchmarked, Phi 4 not benchmarked.
Widest category
None yet: no category has been tested on both models.
Widest single gap
None yet: no benchmark has tested both models.
Output price
Llama Guard 4 12B $0.18 against Phi 4 $0.14 per million output tokens, 1.3x apart.
Context window
Llama Guard 4 12B takes 164K tokens, Phi 4 16K.

Benchmark by benchmark

Every board either model has a result on, a category to a fold; bars are each result on a 0 to 100 scale. Only one model is measured on each, so no row names a leader.

CodingDirectional onlySix of these boards feed the Vibe Coding Index4 boards measured
Coding benchmarks for Llama Guard 4 12B and Phi 4
BenchmarkLlama Guard 4 12BPhi 4Leader
LiveCodeBench (Artificial Analysis run)Not measured23.1%Only Phi 4 measured
Terminal-Bench Hard (Artificial Analysis run)Not measured3.8%Only Phi 4 measured
LMArena Text: codingNot measured1231Only Phi 4 measured
LMArena Text: software and ITNot measured1228Only Phi 4 measured
Neither model has a result on the other 34 boards here
IntelligenceDirectional onlyPublic boards, shown as published, kept out of the index2 boards measured
Intelligence benchmarks for Llama Guard 4 12B and Phi 4
BenchmarkLlama Guard 4 12BPhi 4Leader
AA Intelligence IndexNot measured5.9Only Phi 4 measured
Epoch Capabilities IndexNot measured130.5Only Phi 4 measured
Agentic workDirectional onlyPublic boards, shown as published, kept out of the index2 boards measured
Agentic work benchmarks for Llama Guard 4 12B and Phi 4
BenchmarkLlama Guard 4 12BPhi 4Leader
τ²-Bench TelecomNot measured0.0%Only Phi 4 measured
BALROGNot measured11.6%Only Phi 4 measured
Neither model has a result on the other 37 boards here
ReasoningDirectional onlyPublic boards, shown as published, kept out of the index6 boards measured
Reasoning benchmarks for Llama Guard 4 12B and Phi 4
BenchmarkLlama Guard 4 12BPhi 4Leader
GPQA Diamond (Artificial Analysis run)Not measured57.5%Only Phi 4 measured
Humanity's Last Exam (Artificial Analysis run)Not measured3.8%Only Phi 4 measured
GPQA Diamond (Epoch AI run)Not measured56.1%Only Phi 4 measured
LMArena Text: hard promptsNot measured1220Only Phi 4 measured
LMArena Text: expertNot measured1203Only Phi 4 measured
LMArena Text: hard prompts in EnglishNot measured1230Only Phi 4 measured
Neither model has a result on the other 15 boards here
MathDirectional onlyPublic boards, shown as published, kept out of the index6 boards measured
Math benchmarks for Llama Guard 4 12B and Phi 4
BenchmarkLlama Guard 4 12BPhi 4Leader
AA Math IndexNot measured18.0Only Phi 4 measured
AIME 2025 (Artificial Analysis run)Not measured18.0%Only Phi 4 measured
OTIS Mock AIMENot measured13.8%Only Phi 4 measured
MATH level 5Not measured64.9%Only Phi 4 measured
LMArena Text: mathNot measured1246Only Phi 4 measured
LMArena Text: mathematical workNot measured1254Only Phi 4 measured
Neither model has a result on the other 7 boards here
KnowledgeDirectional onlyPublic boards, shown as published, kept out of the index6 boards measured
Knowledge benchmarks for Llama Guard 4 12B and Phi 4
BenchmarkLlama Guard 4 12BPhi 4Leader
MMLU Pro (Artificial Analysis run)Not measured71.4%Only Phi 4 measured
MMLUNot measured84.8%Only Phi 4 measured
LMArena Text: scienceNot measured1206Only Phi 4 measured
LMArena Text: medicine and healthcareNot measured1202Only Phi 4 measured
LMArena Text: legal and governmentNot measured1241Only Phi 4 measured
LMArena Text: business and financeNot measured1199Only Phi 4 measured
Neither model has a result on the other 11 boards here
GeneralDirectional onlyPublic boards, shown as published, kept out of the index19 boards measured
General benchmarks for Llama Guard 4 12B and Phi 4
BenchmarkLlama Guard 4 12BPhi 4Leader
IFBenchNot measured23.5%Only Phi 4 measured
Long context reasoning (AA-LCR)Not measured0.0%Only Phi 4 measured
Creative writing (Lech Mazur)Not measured62.6%Only Phi 4 measured
LMArena TextNot measured1217Only Phi 4 measured
LMArena Text: instruction followingNot measured1201Only Phi 4 measured
LMArena Text: creative writingNot measured1181Only Phi 4 measured
LMArena Text: EnglishNot measured1231Only Phi 4 measured
LMArena Text: non-EnglishNot measured1197Only Phi 4 measured
LMArena Text: ChineseNot measured1212Only Phi 4 measured
LMArena Text: GermanNot measured1222Only Phi 4 measured
LMArena Text: JapaneseNot measured1158Only Phi 4 measured
LMArena Text: KoreanNot measured1151Only Phi 4 measured
LMArena Text: FrenchNot measured1224Only Phi 4 measured
LMArena Text: SpanishNot measured1234Only Phi 4 measured
LMArena Text: RussianNot measured1209Only Phi 4 measured
LMArena Text: multi-turnNot measured1206Only Phi 4 measured
LMArena Text: longer queriesNot measured1217Only Phi 4 measured
LMArena Text: writing and languageNot measured1198Only Phi 4 measured
LMArena Text: entertainment and mediaNot measured1162Only Phi 4 measured
Neither model has a result on the other 27 boards here

What each workload costs

Three fixed token mixes at each model's listed price, so per-token rates become a bill.

Chat turn

1K input + 500 output tokens

Llama Guard 4 12B$0.0003Fits in one request
Phi 4$0.0001Fits in one request

Phi 4 costs less

Repository review

50K input + 3K output tokens

Llama Guard 4 12B$0.0095Fits in one request
Phi 4$0.0039Exceeds the context window

Phi 4 costs less

Agent loop

200K input + 10K output tokens

Llama Guard 4 12B$0.038Exceeds the context window
Phi 4$0.015Exceeds the context window

Phi 4 costs less

Listed OpenRouter rates, without cache or batch discounts. A workload that does not fit a model's context window would need splitting.

Specification differences

The leading value in a row is marked; a row with a missing value names no leader. Our two rows are marked in red.

Specifications of Llama Guard 4 12B and Phi 4
SpecificationMeta Llama Guard 4 12BMicrosoft Phi 4
MakerMeta LlamaMicrosoft
WeightsOpen weightsOpen weights
ReleasedApril 30, 2025January 10, 2025
Context window164K16K
Input $/Mtok$0.18$0.07
Output $/Mtok$0.18$0.14
Coding indexNot benchmarkedNot benchmarked
Independent measurements behind it00
Cost per solved taskNot computableNot computable
SourceOpenRouter listingOpenRouter listing

Questions

Is Llama Guard 4 12B better than Phi 4 for coding?

Neither model has a coding score yet, so the two cannot be ranked on coding. Pick Llama Guard 4 12B for a larger context window (164K against 16K tokens).

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

Llama Guard 4 12B costs $0.18 per million input tokens and $0.18 per million output tokens; Phi 4 costs $0.07 and $0.14. Cost per solved task is known for neither of them.

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

Llama Guard 4 12B, with 164K tokens against 16K.

Has any benchmark tested both Llama Guard 4 12B and Phi 4?

No benchmark has tested both yet. Llama Guard 4 12B has none yet; Phi 4 on LiveCodeBench (Artificial Analysis run), Terminal-Bench Hard (Artificial Analysis run) and LMArena Text: coding. Compare them on price and context instead. Data as of October 21, 2026.

Compare next