Skip to content
Updated minutes ago
ReleasedApril 23, 2024Verified · huggingface.co
Microsoft

Phi 3 Mini 3.8B

Microsoft · dense · 3.8B parameters · 131,072 context

Quality
64.0

Parameters

3.8B

Context Window

128K tokens

Architecture

Dense

Best GPU

A4000

Quality Score

64/100

Intelligence Brief

Phi 3 Mini 3.8B is a 3.8B parameter DENSE model from Microsoft, featuring Multi-Head Attention (MHA) with 32 layers and 3,072 hidden dimensions. With a 131,072 token context window, it supports structured output, code, math. On standardized benchmarks, it achieves MMLU 68.8, HumanEval 47, GSM8K 75. For self-hosted inference, A4000 delivers optimal throughput at $161/month.

Recent changes

Loading…

Related models

5 suggestions

Picks: same family first, then same vendor within ±2× params, then top tag-overlap matches. Price shown is the cheapest Output $/M across providers — the row's page shows the canonical anchor.

Architecture Details

TypeDENSE
Total Parameters3.8B
Active Parameters3.8B
Layers32
Hidden Dimension3,072
Attention Heads32
KV Heads32
Head Dimension96
Vocab Size32,064

Memory Requirements

BF16 Weights

7.6 GB

FP8 Weights

3.8 GB

INT4 Weights

1.9 GB

KV-Cache per Token393216 bytes
Activation Estimate0.50 GB

GPU Compatibility Matrix

Phi 3 Mini 3.8B is compatible with 100% of GPU configurations across 41 GPUs at 3 precision levels.

BF16 (Full)
FP8 (Half)
INT4 (Quarter)
Blackwell(7 GPUs)
B200 NVL (pair)360GB
B300288GB
B100 SXM192GB
GB200 NVL72 (per GPU)192GB
Hopper(7 GPUs)
H100 NVL 94GB (per GPU pair)188GB
H200 SXM141GB
H2096GB
GH20096GB
Ada Lovelace(11 GPUs)
L40S48GB
L4048GB
RTX 6000 Ada48GB
L2048GB
Ampere(16 GPUs)
A100 80GB SXM80GB
A100 80GB PCIe80GB
A1664GB
RTX A600048GB
Legend:No fitVery tightTightModerateGoodExcellent

GPU Recommendations

A4000optimal

BF16 · 1 GPU · vllm

100/100

score

Throughput

286.5 tok/s

Latency (ITL)

3.5ms

Est. TTFT

1ms

Cost/Month

$161

Cost/M Tokens

$0.21

Use this config →
RTX 4080optimal

BF16 · 1 GPU · vllm

100/100

score

Throughput

458.5 tok/s

Latency (ITL)

2.2ms

Est. TTFT

0ms

Cost/Month

$304

Cost/M Tokens

$0.25

Use this config →
RTX 4070 Tioptimal

BF16 · 1 GPU · vllm

100/100

score

Throughput

322.3 tok/s

Latency (ITL)

3.1ms

Est. TTFT

1ms

Cost/Month

$237

Cost/M Tokens

$0.28

Use this config →

Deployment Options

API

API Deployment

No API pricing available

Self-Hosted

Single GPU

A4000

$161/mo

Min VRAM: 4 GB

Scale

Multi-GPU

RTX 3070 x2

409.0 tok/s

TP· $171/mo

API Pricing Comparison

No API pricing data available for this model.

Performance Estimates

Throughput by GPU

A4000
286.5 tok/s
RTX 4080
458.5 tok/s
RTX 4070 Ti
322.3 tok/s

VRAM Breakdown (A4000, BF16)

Weights
KV
Act
Weights 7.6 GBKV-Cache 6.4 GBActivations 4.0 GBOverhead 0.6 GB

Precision Impact

bf16

7.6 GB

weights/GPU

~286.5 tok/s

fp8

3.8 GB

weights/GPU

int4

1.9 GB

weights/GPU

Quality Benchmarks

Average
67th percentile across all models
MMLU
68.8
Below Average (28th pctile)
HumanEval
47.0
Below Average (40th pctile)
GSM8K
75.0
Below Average (35th pctile)
MT-Bench
76.0
Bottom 25% (0th pctile)

Capabilities

Features

Tool Use Vision Code Math Reasoning Multilingual Structured Output

Supported Frameworks

vllmsglangtgitensorrt-llmollama

Supported Precisions

BF16 (default)FP8INT4

Where to Deploy Phi 3 Mini 3.8B

Similar Models

Higher quality, Larger modelCompare →

Phi 4 Mini

3.8B params · dense

Quality: 70

from $0.35/M

Higher qualityCompare →

Minitron 4B

4B params · dense

Quality: 50

from $0.06/M

Smaller context, Lower qualityCompare →

Nemotron Mini 4B

4B params · dense

Quality: 48

from $0.06/M

Smaller context, Lower qualityCompare →

Qwen 3 4B

4B params · dense

Quality: 57

from $0.10/M

Lower qualityCompare →

Frequently Asked Questions

How much VRAM does Phi 3 Mini 3.8B need for inference?

Phi 3 Mini 3.8B requires approximately 7.6 GB of VRAM at BF16 precision, 3.8 GB at FP8, or 1.9 GB at INT4 quantization. Additional VRAM is needed for KV-cache (393216 bytes per token) and activations (~0.50 GB).

What is the best GPU for Phi 3 Mini 3.8B?

The top recommended GPU for Phi 3 Mini 3.8B is the A4000 using BF16 precision. It achieves approximately 286.5 tokens/sec at an estimated cost of $161/month ($0.21/M tokens). Score: 100/100.

How much does Phi 3 Mini 3.8B inference cost?

Phi 3 Mini 3.8B inference costs vary by provider and GPU setup. Use our calculator for detailed cost estimates across all providers.