Microsoft
ChatCodingAI codingReasoning3.82B
Chat

Phi-4 Mini

Phi · MIT

Microsoft's tiny powerhouse. Punches well above its weight at 3.8B parameters, competitive with many 7B models on reasoning and coding benchmarks. Extremely fast inference. Ideal as a draft model or for resource-constrained setups.

Parameters
3.82B
Architecture
Dense
Context
16,384 tokens
Released
2025-02-27
Engines
llama.cpp, ollama, vLLM
Builder Tools
Cursor, Continue, Ollama, LM Studio

Parameters

3.82B

VRAM

3.3 GB

Context

16K

Formats

5

GPUs

43

Phi-4 Mini (3.82B) requires 3.3 GB VRAM at recommended quality (Q6_K). At efficient quality (Q4_K_M), it fits in 2.4 GB VRAM, making it compatible with the NVIDIA RTX 4060 Laptop (40-60W). On NVIDIA Grace Blackwell Ultra GB300, expect approximately 580 tok/s at Q8_0. For the best experience, Starter AI Desktop ($582) is recommended.

Source: OwnRig methodology

VRAM (Recommended)

3.3 GB

Quantization

Q6_K

File Size

2.9 GB

Max Context

16K tokens

Primary Use

Chat

Memory

VRAM Requirements

QualityQuantizationVRAMFile Size
fullQ8_04.3 GB3.8 GB
recommendedQ6_K3.3 GB2.9 GB
recommendedQ5_K_M2.8 GB2.5 GB
efficientQ4_K_M2.4 GB2.1 GB
compressedQ3_K_M2 GB1.7 GB
Scaling

Context Length Impact

KV cache VRAM at Q6_K quality. Longer context = more memory.

ContextKV CacheTotal VRAM
2K102 MB3.4 GB
4K102 MB3.4 GB
8K307 MB3.6 GB
16K512 MB3.8 GB

Compatible GPUs

43 devices
NVIDIA Grace Blackwell Ultra GB300Q8_0580 tok/sExcellent
Apple M4 Max (128GB Unified)Q8_090 tok/sExcellent
Apple M4 Max (36GB Unified)Q8_090 tok/sExcellent
Apple M4 Max (64GB Unified)Q8_090 tok/sExcellent
Apple M4 Pro (24GB Unified)Q8_055 tok/sExcellent
Apple M4 Pro (48GB)Q8_055 tok/sExcellent
Apple M4 Ultra (192GB)Q8_0135 tok/sExcellent
NVIDIA GeForce RTX 3060 12GBQ8_080 tok/sExcellent
NVIDIA GeForce RTX 3080 10GBQ8_0120 tok/sExcellent
NVIDIA GeForce RTX 3090Q8_0140 tok/sExcellent
NVIDIA GeForce RTX 4060 8GBQ5_K_M55 tok/sExcellent
NVIDIA GeForce RTX 4060 Ti 16GBQ8_068 tok/sExcellent
NVIDIA GeForce RTX 4070 SuperQ8_0100 tok/sExcellent
NVIDIA GeForce RTX 4070 Ti 12GBQ8_082 tok/sExcellent
NVIDIA GeForce RTX 4070 Ti SuperQ8_0120 tok/sExcellent
NVIDIA RTX 4080 Laptop (120-150W)Q8_057 tok/sExcellent
NVIDIA GeForce RTX 4080 SuperQ8_0130 tok/sExcellent
NVIDIA GeForce RTX 4090Q8_0160 tok/sExcellent
NVIDIA RTX 4090 Laptop (150-175W)Q8_058 tok/sExcellent
NVIDIA GeForce RTX 5080Q8_0150 tok/sExcellent
NVIDIA GeForce RTX 5090Q8_0185 tok/sExcellent
AMD Radeon Pro W7900Q8_059 tok/sExcellent
NVIDIA RTX PRO 6000 BlackwellQ8_0257 tok/sExcellent
NVIDIA RTX PRO 6000 Blackwell Max-QQ8_0236 tok/sExcellent
Apple M2 Pro (16GB Unified)Q8_032 tok/sExcellent
NVIDIA GeForce RTX 5060 8GBQ5_K_M63 tok/sExcellent
NVIDIA GeForce RTX 5060 Ti 16GBQ8_076 tok/sExcellent
Apple M3 Pro (18GB Unified)Q8_030 tok/sGood
Apple M4 (16GB Unified)Q8_028 tok/sGood
NVIDIA RTX 4060 Laptop (40-60W)Q5_K_M33 tok/sGood
NVIDIA RTX 4070 Laptop (80-115W)Q5_K_M39 tok/sGood
AMD Radeon RX 7600Q5_K_M43 tok/sGood
AMD Radeon RX 7900 XTXQ8_0120 tok/sGood
AMD Radeon RX 9070Q8_0120 tok/sGood
Apple M1 Pro (16GB Unified)Q8_028 tok/sGood
Apple M2 (8GB Unified)Q8_014 tok/sGood
Apple M2 (16GB Unified)Q8_014 tok/sGood
Apple M3 (8GB Unified)Q8_016 tok/sGood
Apple M3 (16GB Unified)Q8_016 tok/sGood
AMD Radeon RX 9060 XT 16GBQ8_060 tok/sGood
AMD Radeon RX 9060 XT 8GBQ8_060 tok/sGood
Apple M1 (8GB Unified)Q8_07 tok/sAcceptable
Apple M1 (16GB Unified)Q8_07 tok/sAcceptable

Showing 43 of 43 entries

Builder Context

Phi-4 Mini is commonly used with Cursor, Continue, Ollama, LM Studio. For an AI coding workflow, pair it with an embedding model like nomic-embed-text for local RAG.

Hardware

Recommended Builds

Complete PC builds that can run Phi-4 Mini.

FAQ

Frequently Asked Questions

How much VRAM does Phi-4 Mini need?
Phi-4 Mini requires 3.3 GB VRAM at recommended quality (Q6_K). At lower quality settings, it can fit in as little as 2 GB.
What is the best GPU for Phi-4 Mini?
The NVIDIA Grace Blackwell Ultra GB300 delivers the best performance for Phi-4 Mini, achieving 580 tok/s at Q8_0 with an excellent rating.
Can I run Phi-4 Mini on an RTX 4060 Ti?
Yes. On the NVIDIA GeForce RTX 4060 Ti 16GB, Phi-4 Mini runs at 68 tok/s (Q8_0, excellent).
What quantization should I use for Phi-4 Mini?
For the best quality, use Q6_K (3.3 GB VRAM). If your GPU has limited VRAM, Q3_K_M (2 GB) is the most efficient option with acceptable quality.
Is Phi-4 Mini good for coding?
Yes. Phi-4 Mini is used with Cursor, Continue, Ollama, LM Studio for local AI coding. For the best coding experience, pair it with an embedding model for local RAG.

Related Guides

All models

Data confidence: estimated. Source

VRAM requirements are calculated from model parameters and may vary by inference engine, context length, and batch size. Performance estimates are based on community benchmarks and should be verified for your specific configuration.Phi is a trademark of its respective owner. OwnRig is not affiliated with or endorsed by the model creator.