Sphere
Log in Join
☆ 10

llama-quantize output worse than thebloke gguf

quantized a llama3.1-8b f16 model myself with llama-quantize model-f16.gguf model-q4_K_M.gguf Q4_K_M from b4610. output seems noticeably worse than the official bartowski q4_K_M of the same model. did i mess up the quantization or is there a step i'm missing?

⚑ Report

4 replies

☆ 0
C cardboard ·2026-10-27#1

how big is your output file vs bartowski's? if sizes match, the difference is probably the calibration/imatrix. bartowski uses importance matrix quantization for some quants, plain llama-quantize Q4_K_M doesn't.

⚑ Report
☆ 0
P paper64 ·2026-10-27#2

sizes are basically the same (4.92 vs 4.91 gb). didn't use imatrix, just ran the plain command. is there a simple way to generate an imatrix for quantization?

⚑ Report
☆ 0
C cactus11 ·2026-10-31#3

yes, use llama-imatrix over a calibration dataset first, produces imatrix.dat, then llama-quantize --imatrix imatrix.dat .... the quality gain at Q4_K_M is modest but measurable. bartowski's files usually note whether they used imatrix in the repo README.

⚑ Report
☆ 0
K kernel ·2026-11-04#4

generated imatrix from a few thousand wiki/text samples, requantized, and the quality gap closed. turns out plain Q4_K_M is fine but imatrix is what those repos do. good to know for models i can't find pre-quantized.

⚑ Report
Log in to reply.