Phi-2

Newer version available: Phi-4 14B

Released
2023-12-12
Last refreshed
2026-10-17
Status
Researched 10d ago
Open sourceCommercial use: permittedCodingClassificationJSON / Tool use
Microsoft Research releases · 6 in the last 12 monthsChangelog →
Specifications
Family
Phi-2
Released
2023-12-12
Context
2K
Parameters
2.7B
Architecture
Decoder Only
Specialization
general
Openness
Open source
License
MITOSI-approvedPermitted
Weights
Unknown
Code
Unknown
Training
Fine-tuned
Created by

Advancing the state-of-the-art in AI and computing.

Redmond, Washington, United States
Founded 1991
Website
Pricing
Output / 1M
$0.070
Input / 1M
$0.070

Cheapest of 3 routes · Microsoft Foundry

About

Phi-2 is a compact language model by Microsoft endowed with 2.7 billion parameters and part of their Phi series. It shows formidable capabilities in reasoning and language understanding, outshining much larger models, even those with up to 25 times more parameters. Phi-2's training utilized a vast and diverse dataset of 1.4 trillion tokens, incorporating high-quality synthetic data and curated web content to bolster its common sense reasoning and general knowledge. Interestingly, despite lacking fine-tuning via reinforcement learning from human feedback (RLHF), it exhibits enhanced safety features and reduced bias.

Providers(3)

Compare all 3

Compare API pricing across 3 tracked provider routes for input and output tokens, batch, and cached reads when available.

ProviderInput / 1MOutput / 1MRoute
Microsoft Foundry$0.070$0.070
Provisioned
Fireworks AI$0.100$0.100
Provisioned
Replicate API$0.050$0.250
Serverless

Deprecated provider routes(2)

ProviderStatusCatalog ID
Cloudflare Workers AI
Deprecated
@cf/microsoft/phi-2
Together AI
DeprecatedRetired August 22, 2024
—

Available via routers & gateways(6)

Capabilities

Structured Outputs

Benchmark peer barsfor Coding

Benchmark scores(4)

Scores are benchmark-specific and are direction-aware: the same numeric gap can mean very different outcomes across suites. Use the leaderboard context and this model's provider route to decide whether the winning margin is meaningful for your workload.
BenchmarkScoreVersionEvaluationSource
41.2diamondObserved 2026-03-06—
research
85.910-shotObserved 2026-03-06—
research
59.7pass@1Observed 2026-03-06—
research
68.35-shotObserved 2026-03-06—
research

Migration checks

No linked migration route is available for this model yet.