imatrix

by ggml · Technique · Text & code

A calibration method that runs a model on sample text to find its most important weights, so compression keeps them more precise.

promising

Calibration step llama.cpp uses to protect important weights when quantizing; gain not yet measured

Latest · Nov 17Used by ds4 and llama.cpp to find where quantization errors cost most, guiding which weights to compress harder.

Who says what

Opinion has settled

Donato Capitella and Alessio Garau, explaining how it works

Both describe running the full model on a calibration set, such as code, to find the weights where quantization error costs most and steering compression away from them; Garau notes llama.cpp and ds4 use it. Neither gives a quality number.

Garau's November description repeats what Capitella explained in October.

What would settle it. A measured comparison of imatrix and plain quants of the same model at the same size.

Evidence

  1. Oct 5
    Explains imatrix: run the original model on a calibration set (e.g. coding) to find important weights, then bias quantizer pattern choice toward them.
    Hands-on testDonato Capitella

Everything said about imatrix, on the wire

Alternatives

Works with