microsoft · text
Phi-4-reasoning
microsoft/Phi-4-reasoningPhi-4-reasoning at Q4_K_M is exactly 9,053,116,096 bytes (8.43 GiB / 9.05 GB) — an effective 4.941 bits per weight, not the nominal 4. Its KV cache at 32K is 6.25 GiB.
From the file· summed from 1 file(s)From the file· KV per layer
Parameters
14.7B
Architecture
phi3
40 layers
Context
32,768
native (config.json)
License
mit
Shipped quantizations
● exact bytes, summed from published files
| Quant | Size● | Exact bytes● | Effective bpw● | Tensors● | Publisher |
|---|---|---|---|---|---|
| UD-IQ1_S | 3.33 GiB | 3,580,206,368 | 1.954 | — | unsloth |
| UD-IQ1_M | 3.57 GiB | 3,831,086,368 | 2.091 | — | unsloth |
| UD-IQ2_XXS | 3.98 GiB | 4,269,358,368 | 2.330 | — | unsloth |
| IQ2_S | 4.41 GiB | 4,731,549,664 | 2.582 | — | bartowski |
| IQ2_M | 4.76 GiB | 5,110,429,664 | 2.789 | — | bartowski |
| UD-IQ2_M | 4.90 GiB | 5,257,620,768 | 2.869 | — | unsloth |
| Q2_K | 5.17 GiB | 5,547,349,984 | 3.027 | — | bartowski |
| Q2_K | 5.17 GiB | 5,547,351,328 | 3.027 | — | unsloth |
| Q2_K_L | 5.28 GiB | 5,667,773,728 | 3.093 | — | unsloth |
| IQ3_XXS | 5.45 GiB | 5,846,685,664 | 3.191 | — | bartowski |
| UD-IQ3_XXS | 5.49 GiB | 5,890,862,368 | 3.215 | — | unsloth |
| Q2_K_L | 5.63 GiB | 6,049,109,984 | 3.301 | — | bartowski |
| IQ3_XS | 5.82 GiB | 6,246,701,024 | 3.409 | — | bartowski |
| Q3_K_S | 6.06 GiB | 6,504,749,024 | 3.550 | — | bartowski |
| Q3_K_S | 6.06 GiB | 6,504,750,368 | 3.550 | — | unsloth |
| IQ3_M | 6.44 GiB | 6,913,837,024 | 3.773 | — | bartowski |
| Q3_K_M | 6.86 GiB | 7,363,270,624 | 4.018 | — | bartowski |
| Q3_K_M | 6.86 GiB | 7,363,271,968 | 4.018 | — | unsloth |
| Q3_K_L | 7.39 GiB | 7,930,156,736 | 4.328 | — | lmstudio-community |
| Q3_K_L | 7.39 GiB | 7,930,157,024 | 4.328 | — | bartowski |
| IQ4_XS | 7.40 GiB | 7,941,380,064 | 4.334 | — | bartowski |
| IQ4_XS | 7.41 GiB | 7,957,437,728 | 4.343 | — | unsloth |
| IQ4_NL | 7.81 GiB | 8,383,420,384 | 4.575 | — | bartowski |
| IQ4_NL | 7.81 GiB | 8,383,421,728 | 4.575 | — | unsloth |
| Q4_0 | 7.83 GiB | 8,412,092,384 | 4.591 | — | bartowski |
| Q4_0 | 7.83 GiB | 8,412,093,728 | 4.591 | — | unsloth |
| Q4_K_S | 7.86 GiB | 8,440,764,384 | 4.606 | — | bartowski |
| Q4_K_M | 8.43 GiB | 9,053,116,096 | 4.941 | — | lmstudio-community |
| Q4_K_M | 8.43 GiB | 9,053,116,384 | 4.941 | — | bartowski |
| Q4_K_M | 8.43 GiB | 9,053,117,728 | 4.941 | — | unsloth |
| Q4_1 | 8.63 GiB | 9,267,501,024 | 5.058 | — | bartowski |
| Q4_1 | 8.63 GiB | 9,267,502,368 | 5.058 | — | unsloth |
| Q4_K_L | 8.79 GiB | 9,434,453,984 | 5.149 | — | bartowski |
| Q5_K_S | 9.45 GiB | 10,151,581,664 | 5.540 | — | bartowski |
| Q5_K_M | 9.88 GiB | 10,604,189,664 | 5.787 | — | bartowski |
| Q5_K_M | 9.88 GiB | 10,604,191,008 | 5.787 | — | unsloth |
| Q5_K_L | 10.17 GiB | 10,921,301,984 | 5.960 | — | bartowski |
| Q6_K | 11.20 GiB | 12,030,252,736 | 6.565 | — | lmstudio-community |
| Q6_K | 11.20 GiB | 12,030,253,024 | 6.565 | — | bartowski |
| Q6_K | 11.20 GiB | 12,030,254,368 | 6.565 | — | unsloth |
KV cache by context
computed per layer
| Context | KV cache (f16)● | Flat formula | Overstated by | Full / windowed / recurrent |
|---|---|---|---|---|
| 4,096 | 0.78 GiB | 0.78 GiB | — | 40 / 0 / 0 |
| 8,192 | 1.56 GiB | 1.56 GiB | — | 40 / 0 / 0 |
| 16,384 | 3.13 GiB | 3.13 GiB | — | 40 / 0 / 0 |
| 32,768 | 6.25 GiB | 6.25 GiB | — | 40 / 0 / 0 |
| 65,536 | 12.50 GiB | 12.50 GiB | — | 40 / 0 / 0 |
| 131,072 | 25.00 GiB | 25.00 GiB | — | 40 / 0 / 0 |
Compare with
same modality, comparable size
Will it run on your card?
full quant x context sweep
Radeon RX 6500 XT 4GBGeForce RTX 3050 6GBGeForce RTX 5050 8GBGeForce RTX 3080 10GBGeForce RTX 2080 Ti 11GBGeForce RTX 5070 12GBGeForce RTX 5060 Ti 16GBApple M3 Pro 18GBGeForce RTX 3080 Ti 20GBGeForce RTX 5090 D V2 24GBGeForce RTX 5090 D 32GBApple M5 Max 36GBApple M5 Pro 48GBApple M5 Max 64GBApple M3 Ultra 96GBApple M5 Max 128GBApple M2 Ultra 192GBApple M3 Ultra 256GBApple M3 Ultra 512GB
Why other calculators give a different number
A parameters × bits ÷ 8 estimate puts Q4_K_M at roughly 7.68 GiB. The real file is 8.43 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.
Architecture
from config.json
Layers
40
Attention heads
40
KV heads
10
Head dim
128
Hidden size
5120
Vocab
100,352
Sliding window
none
SWA period
1
MLA
no
Experts
—
Experts per token
—
use_sliding_window
—
Questions people ask
- How much VRAM does Phi-4-reasoning need?
- Q4_K_M is exactly 9,053,116,096 bytes (8.43 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-reasoning's KV cache?
- 6.25 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-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.