Parameters
3.8B
Context Length
128K
Modality
Text
Architecture
Dense
License
MIT
Release Date
27 Feb 2025
Knowledge Cutoff
Jun 2024
API Pricing (per 1M)
Input: $0.00 · Output: $0.00
VRAM requirements for different quantization methods and context sizes
1,024 tokens
Consumer
1x RTX 4090
24GB VRAM
Datacenter
1x NVIDIA A100
80GB VRAM
Apple Silicon
1x Apple M3 Max
128GB VRAM
128,000 tokens
Consumer
2x RTX 4090
24GB VRAM
Datacenter
1x NVIDIA A100
80GB VRAM
Apple Silicon
1x Apple M3 Max
128GB VRAM
Rank
#183
| Benchmark | Score | Rank |
|---|---|---|
Professional Knowledge | 0.528 | 45 |
Graduate-Level QA | 0.252 | 108 |
Coding Index | 0.04 | 138 |
Intelligence Index | 0.06 | 242 |
General Knowledge Reference | 0.673 | 28 |
Overall Rank
#183
Coding Rank
#132
Phi-4-Mini is a compact 3.8B open model from Microsoft optimized for low-latency reasoning, function calling, and edge deployment via ONNX. It features an expanded 200K vocabulary and LongRoPE context management for on-device AI.
Attention
Attention Structure
Grouped-Query Attention
Attention Heads
24
Key-Value Heads
8
Attention Head Dimension
-
Position Embedding
ROPE
RoPE Theta
10,000
Sliding Window Attention
Yes
Sliding Window Size
262,144
Sliding Window Ratio
-
Linear Attention
-
Linear Attention Ratio
-
Normalization
RMS Normalization
Activation Function
Swish
Dimensions
Hidden Dimension Size
3,072
Number of Layers
32
FFN Intermediate Size (Dense)
8,192
Multi-Token Prediction Heads
-
Tokenizer
Vocabulary Size
200,064
The Microsoft Phi-4 model family comprises small language models prioritizing efficient, high-capability reasoning. Its development emphasizes robust data quality and sophisticated synthetic data integration. This approach enables enhanced performance and on-device deployment capabilities.
Assistant
Online