Microsoft/Dense

MicrosoftPhi-2 2.7B

Phi-2 stunned the community — near 7B quality in 2.7B params, great for coding and reasoning.

chatcodingreasoningThinking
2.7B
Parameters
2K
Context length
8
Benchmarks
6
Quantizations
0
Architecture
Dense
Released
2023-12-12
Layers
32
KV Heads
32
Head Dim
80
Family
phi

Quantization Options

QuantBitsVRAMQuality
Q4_K_M4.892.1 GBgood
Q5_K_S5.572.4 GBgood
Q5_K_M5.72.4 GBgood
Q6_K6.562.7 GBexcellent
Q8_08.53.4 GBlossless
FP16165.9 GBlossless

Select your GPU above to see speed estimates and compatibility for each quantization.

READY TO RUN THIS?RENT BY THE HOUR

RENT A GPU AND RUN PHI-2 2.7B NOW

Spin up an A100 / H100 / 4090 in ~60s. Pay by the second. Cancel anytime.

Community Ratings

Loading ratings...

Benchmarks (8)

MBPP54.2
HumanEval45.1
BBH28.0
IFEval27.4
MMLU-PRO18.1
MUSR13.8
MATH2.9
GPQA2.9

Run this model

Easiest way to get started·Beginners
DOCS ↗
curl -fsSL https://ollama.com/install.sh | sh
$ollama run phi:2.7b-q4_K_M

Downloads and runs automatically. Add --verbose for speed stats.

▸ SETUP GUIDE
>_

Auto-setup with fitmyllm CLI

Detects your GPU, recommends the best model, downloads it, and starts chatting — zero config. Benchmarks your speed and contributes anonymous data to improve predictions.

pip install fitmyllmthen run fitmyllmLearn more
Auto-detect GPULive tok/s in chatSpeed benchmarks9 inference engines

GPUs that can run this model

At Q4_K_M quantization. Sorted by minimum VRAM.

NVIDIA Tesla C2050
3 GB VRAM • 144 GB/s
NVIDIA
NVIDIA Tesla M2050
3 GB VRAM • 148 GB/s
NVIDIA
NVIDIA Tesla S2050
3 GB VRAM • 148 GB/s
NVIDIA

Find the best GPU for Phi-2 2.7B

Build Hardware for Phi-2 2.7B

Phi-2 stunned the community — near 7B quality in 2.7B params, great for coding and reasoning.

▸ SPEC SHEET

Phi-2 2.7B2.7B Dense.

▸ SPECIFICATIONS
PARAMETERS
2.7B
ARCHITECTURE
Dense Transformer
CONTEXT LENGTH
2K tokens
CAPABILITIES
chat, coding, reasoning
RELEASE DATE
2023-12-12
PROVIDER
Microsoft
FAMILY
phi
▸ VRAM REQUIREMENTS
QUANTBPWVRAMQUALITY
Q4_K_M4.892.1 GB94%
Q5_K_S5.572.4 GB96%
Q5_K_M5.72.4 GB96%
Q6_K6.562.7 GB97%
Q8_08.53.4 GB100%
FP16165.9 GB100%
§ 01BENCHMARK SCORES
HumanEval45.1
MMLU-PRO18.1
MATH2.9
IFEval27.4
BBH28.0
GPQA2.9
MUSR13.8
MBPP54.2
§ 02RUN COMMAND

Run Phi-2 2.7B locally with Ollama — needs 2.1 GB VRAM at Q4_K_M:

$ollama run phi:2.7b