microsoft · text

Phi-4-mini-reasoning

microsoft/Phi-4-mini-reasoning

Phi-4-mini-reasoning at Q4_K_M is exactly 2,491,874,560 bytes (2.32 GiB / 2.49 GB) — an effective 5.197 bits per weight, not the nominal 4. Its KV cache at 32K is 4.00 GiB.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
3.8B
Architecture
phi3
32 layers
Context
131,072
native (config.json)
License
mit

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
UD-IQ1_S1.06 GiB1,141,193,6322.380unsloth
UD-IQ1_M1.11 GiB1,195,260,8322.493unsloth
UD-IQ2_XXS1.20 GiB1,293,319,0722.697unsloth
IQ2_M1.40 GiB1,507,424,8003.144bartowski
UD-IQ2_M1.43 GiB1,536,129,9523.204unsloth
UD-IQ3_XXS1.55 GiB1,668,545,4403.480unsloth
IQ3_XXS1.56 GiB1,678,866,9763.501bartowski
Q2_K1.57 GiB1,682,636,3203.509bartowski
Q2_K_L1.57 GiB1,682,636,7043.509unsloth
Q2_K1.57 GiB1,682,636,7043.509unsloth
Q2_K_L1.71 GiB1,831,483,9363.820bartowski
IQ3_XS1.71 GiB1,840,709,1523.839bartowski
Q3_K_S1.77 GiB1,897,332,2563.957bartowski
Q3_K_S1.77 GiB1,897,332,6403.957unsloth
IQ3_M1.88 GiB2,017,656,3524.208bartowski
Q3_K_M1.97 GiB2,117,533,2164.416bartowski
Q3_K_M1.97 GiB2,117,533,6004.416unsloth
IQ4_XS2.07 GiB2,224,487,9684.639bartowski
IQ4_XS2.07 GiB2,224,488,3524.639unsloth
Q3_K_L2.10 GiB2,249,653,5044.692lmstudio-community
Q3_K_L2.10 GiB2,249,653,7924.692bartowski
IQ4_NL2.17 GiB2,325,151,2644.849bartowski
IQ4_NL2.17 GiB2,325,151,6484.849unsloth
Q4_02.17 GiB2,331,442,7204.862bartowski
Q4_02.17 GiB2,331,443,1044.862unsloth
Q4_K_S2.18 GiB2,337,734,1764.875bartowski
Q4_K_M2.32 GiB2,491,874,5605.197lmstudio-community
Q4_K_M2.32 GiB2,491,874,8485.197bartowski
Q4_K_M2.32 GiB2,491,875,2325.197unsloth
Q4_12.35 GiB2,526,477,8565.269bartowski
Q4_12.35 GiB2,526,478,2405.269unsloth
Q4_K_L2.46 GiB2,640,722,4645.507bartowski
Q5_K_S2.54 GiB2,727,804,4485.689bartowski
Q5_K_M2.65 GiB2,848,128,5445.940bartowski
Q5_K_M2.65 GiB2,848,128,9285.940unsloth
Q5_K_L2.79 GiB2,996,976,1606.250bartowski
Q6_K2.94 GiB3,155,623,1686.581lmstudio-community
Q6_K2.94 GiB3,155,623,4566.581bartowski
Q6_K2.94 GiB3,155,623,8406.581unsloth
Q6_K_L3.08 GiB3,304,471,0726.891bartowski

KV cache by context

computed per layer
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.50 GiB0.50 GiB32 / 0 / 0
8,1921.00 GiB1.00 GiB32 / 0 / 0
16,3842.00 GiB2.00 GiB32 / 0 / 0
32,7684.00 GiB4.00 GiB32 / 0 / 0
65,5368.00 GiB8.00 GiB32 / 0 / 0
131,07216.00 GiB16.00 GiB32 / 0 / 0

Compare with

same modality, comparable size

Will it run on your card?

full quant x context sweep

Why other calculators give a different number

A parameters × bits ÷ 8 estimate puts Q4_K_M at roughly 2.01 GiB. The real file is 2.32 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
32
Attention heads
24
KV heads
8
Head dim
128
Hidden size
3072
Vocab
200,064
Sliding window
262144
SWA period
1
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does Phi-4-mini-reasoning need?
Q4_K_M is exactly 2,491,874,560 bytes (2.32 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is Phi-4-mini-reasoning's KV cache?
4.00 GiB at 32K context with an f16 cache, computed per layer. Quantizing the cache to q8_0 roughly halves it, which is often the difference between a context length fitting and not.
Which quantization of Phi-4-mini-reasoning should I use?
Q4_K_M is the usual default. Pick the largest quantization that fits your card at the context you actually need — the table above gives exact sizes for every one published.