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
178 K
Likes
3,534
Download history
daily snapshots · 106 days
▲ 408 K in the last 30 days (69.7%)
570 K177 K
Oct 12Oct 22Nov 1Nov 10
1.6 M177 K
Aug 13Sep 12Oct 12Nov 10
1.6 M177 K
Jul 28Sep 1Oct 6Nov 10
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": 177546,
"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