phi-2
Phi-2 is a Transformer with 2.7 billion parameters. It was trained using the same data sources as Phi-1.5, augmented with a new data source that consists of various NLP synthetic texts and filtered websites (for safety and educational value). When assessed against benchmarks testing common sense, language understanding, and logical reasoning, Phi-2 showcased a nearly state-of-the-art performance among models with les...
Params
2.8 B
Context
2,048
Downloads 30d
556 K
Likes
3,523
Download history
daily snapshots · 56 days
▲ 1.1 M in the last 30 days (65.7%)
1.6 M556 K
Aug 23Sep 2Sep 12Sep 21
1.6 M556 K
Jul 28Aug 15Sep 3Sep 21
Can you run it?
Estimated VRAM at 8K context unless noted. Pick your hardware to see the verdict per quantization.
| File | Quant | Size | Est. VRAM | Verdict on RTX 4090 · 24 GB |
|---|---|---|---|---|
| model.safetensors | f16 | 5.6 GB | 7.0 GB | ✅ Runs comfortably |
Estimate: file size × 1.1 + KV cache at 8K + 0.5 GB overhead. Not a benchmark — how we calculate this.
Run it
copy-paste, exact tags checked against the Hub$ curl -s https://aimodelscomparison.com/api/v1/models/phi-2
{
"hf_id": "microsoft/phi-2",
"params_b": 2.78,
"context_length": 2048,
"license": { "id": "mit", "commercial": "yes" },
"downloads_30d": 556469,
"vram_estimates": [
{ "quant": "f16", "gb": 7.0 }
],
"updated_at": "2026-07-28T18:03:48Z"
}
Specifications
- Architecture
- PhiForCausalLM
- Parameters
- 2.8 B
- Tensor type
- F16
- Context length
- 2,048
- Vocabulary
- 51,200
- Layers / heads
- 32 / 32
- Licence
- mit
- First seen on the Hub
- 2023-12-13
- Training datasets
- undisclosed
- Added to our catalog
- 2026-07-28
Compare with any text-generation model