unsloth · text

Phi-3-mini-4k-instruct

unsloth/Phi-3-mini-4k-instruct

Phi-3-mini-4k-instruct at Q4_K_M is exactly 8,404,011,936 bytes (7.83 GiB / 8.40 GB) — an effective 17.595 bits per weight, not the nominal 4.

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

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
IQ2_XS3.91 GiB4,199,091,6168.791bartowski
IQ2_XS3.91 GiB4,199,091,6488.791bartowski
IQ2_S4.11 GiB4,409,812,8969.233bartowski
IQ2_S4.11 GiB4,409,812,9289.233bartowski
IQ2_M4.45 GiB4,780,500,89610.009bartowski
IQ2_M4.45 GiB4,780,500,92810.009bartowski
Q2_K4.85 GiB5,204,447,13610.896bartowski
Q2_K4.85 GiB5,204,447,16810.896bartowski
IQ3_XXS5.05 GiB5,418,452,89611.344bartowski
IQ3_XXS5.05 GiB5,418,452,92811.344bartowski
IQ3_XS5.38 GiB5,780,224,41612.102bartowski
IQ3_XS5.38 GiB5,780,224,44812.102bartowski
Q3_K_S5.65 GiB6,064,896,41612.698bartowski
Q3_K_S5.65 GiB6,064,896,44812.698bartowski
IQ3_M5.87 GiB6,299,904,41613.190bartowski
IQ3_M5.87 GiB6,299,904,44813.190bartowski
Q3_K_M6.29 GiB6,750,976,41614.134bartowski
Q3_K_M6.29 GiB6,750,976,44814.134bartowski
Q3_K_L6.84 GiB7,348,992,41615.386bartowski
Q3_K_L6.84 GiB7,348,992,44815.386bartowski
IQ4_XS6.99 GiB7,506,977,69615.717bartowski
IQ4_XS6.99 GiB7,506,977,72815.717bartowski
Q4_K_S7.41 GiB7,957,752,73616.661bartowski
Q4_K_S7.41 GiB7,957,752,76816.661bartowski
Q4_K_M7.83 GiB8,404,011,93617.595bartowski
Q4_K_M7.83 GiB8,404,011,96817.595bartowski
Q5_K_S8.96 GiB9,621,588,89620.144bartowski
Q5_K_S8.96 GiB9,621,588,92820.144bartowski
Q5_K_M9.20 GiB9,882,708,89620.691bartowski
Q5_K_M9.20 GiB9,882,708,92820.691bartowski
Q6_K10.67 GiB11,453,824,41623.980bartowski
Q6_K10.67 GiB11,453,824,44823.980bartowski
Q8_013.82 GiB14,834,719,13631.059bartowski
Q8_013.82 GiB14,834,719,16831.059bartowski
F322 shards52.01 GiB55,841,700,160bartowski
F322 shards52.01 GiB55,841,700,192bartowski

KV cache by context

unresolved

This model declares a 2,048-token sliding window, but we could not establish which layers use it. Its architecture publishes the layout as a per-layer array inside the model file rather than as a period in config.json, and we have not yet ingested that array.

A flat context × layers × heads figure would be substantially too high, so we are not showing one. This is tracked as a known gap rather than filled with a guess.

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.00 GiB. The real file is 7.83 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
32
Attention heads
32
KV heads
32
Head dim
96
Hidden size
3072
Vocab
32,064
Sliding window
2048
SWA period
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does Phi-3-mini-4k-instruct need?
Q4_K_M is exactly 8,404,011,936 bytes (7.83 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
Which quantization of Phi-3-mini-4k-instruct 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.