Skip to content
Updated minutes ago
Microsoft

Phi 4 Mini

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

Quality
70.0

Parameters

3.8B

Context Window

128K tokens

Architecture

Dense

Best GPU

A4000

Quality Score

70/100

Intelligence Brief

Phi 4 Mini is a 3.8B parameter DENSE model from Microsoft, featuring Grouped Query Attention (GQA) with 32 layers and 3,072 hidden dimensions. With a 131,072 token context window, it supports tools, structured output, code, math, multilingual, reasoning. On standardized benchmarks, it achieves MMLU 72, HumanEval 55, GSM8K 80. For self-hosted inference, A4000 delivers optimal throughput at $161/month.

Architecture Details

TypeDENSE
Total Parameters3.8B
Active Parameters3.8B
Layers32
Hidden Dimension3,072
Attention Heads24
KV Heads8
Head Dimension128
Vocab Size100,352

Memory Requirements

BF16 Weights

7.6 GB

FP8 Weights

3.8 GB

INT4 Weights

1.9 GB

KV-Cache per Token65536 bytes
Activation Estimate0.50 GB

GPU Compatibility Matrix

Phi 4 Mini 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

318.3 tok/s

Latency (ITL)

3.1ms

Est. TTFT

1ms

Cost/Month

$161

Cost/M Tokens

$0.19

Use this config →
RTX 4080optimal

BF16 · 1 GPU · vllm

100/100

score

Throughput

509.4 tok/s

Latency (ITL)

2.0ms

Est. TTFT

0ms

Cost/Month

$304

Cost/M Tokens

$0.23

Use this config →
RTX 4070 Tioptimal

BF16 · 1 GPU · vllm

100/100

score

Throughput

358.1 tok/s

Latency (ITL)

2.8ms

Est. TTFT

0ms

Cost/Month

$237

Cost/M Tokens

$0.25

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

454.5 tok/s

TP· $171/mo

API Pricing Comparison

No API pricing data available for this model.

Performance Estimates

Throughput by GPU

A4000
318.3 tok/s
RTX 4080
509.4 tok/s
RTX 4070 Ti
358.1 tok/s

VRAM Breakdown (A4000, BF16)

Weights
Act
Weights 7.6 GBKV-Cache 2.1 GBActivations 4.0 GBOverhead 0.6 GB

Precision Impact

bf16

7.6 GB

weights/GPU

~318.3 tok/s

fp8

3.8 GB

weights/GPU

int4

1.9 GB

weights/GPU

Quality Benchmarks

Average
73th percentile across all models
MMLU
72.0
Below Average (36th pctile)
HumanEval
55.0
Average (57th pctile)
GSM8K
80.0
Below Average (47th pctile)
MT-Bench
78.0
Bottom 25% (0th pctile)

Capabilities

Features

Tool Use Vision Code Math Reasoning Multilingual Structured Output

Supported Frameworks

vllmsglangtgiollama

Supported Precisions

BF16 (default)FP8INT4

Where to Deploy Phi 4 Mini

Similar Models

Smaller context, Lower qualityCompare →
Smaller context, Lower quality, Smaller modelCompare →
Smaller context, Lower quality, Smaller modelCompare →

Minitron 4B

4B params · dense

Quality: 50

from $0.06/M

Smaller context, Lower qualityCompare →

Frequently Asked Questions

How much VRAM does Phi 4 Mini need for inference?

Phi 4 Mini 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 (65536 bytes per token) and activations (~0.50 GB).

What is the best GPU for Phi 4 Mini?

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

How much does Phi 4 Mini inference cost?

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