sarvesh.
Notebook

What does “four-bit” mean inside a model file?

I inspected a local Gemma 3 4B file labeled Q4_K_M. Of its stored tensor elements—the individual numbers in its weight arrays—70.06% used Q4_K, 29.93% used Q6_K, and 0.0095% used F32. The label described a mixed storage recipe, not a promise that every number occupied four bits.

Those percentages count elements, not tensors or disk bytes. Quantized blocks also store scales and other information, so multiplying the number of parameters by four bits would not give the exact file size. These measurements describe this particular file.

The header was enough to reveal the mixture. It could not tell me why the converter chose it or whether those choices preserved a particular behavior. Testing that would require matched conversions from the same checkpoint, with the prompt, tokenizer, and runtime held fixed.

Related project · Gemma Microscope