K-Quants' Double Quantization: Two-Layer Precision

K-quants achieve their efficiency by implementing a hierarchical two-level quantization: first, weights are quantized into blocks, and then the quantization constants (scales and offsets) for these blocks are themselves quantized to further reduce storage overhead.

The top 3

  1. How K-Quants' Dual-Layer Compression Works: K-Quants employ a hierarchical quantization where initial high-precision weights are grouped into blocks, which are then part of larger super-blocks. Block-specific scaling factors and offsets are calculated and subsequently quantized (e.g., to INT8), while the overarching super-block retains a separate set of higher-precision constants.
  2. Memory Savings: Effective Bits-Per-Weight Achieved: This two-layer precision dramatically reduces the effective storage per weight. For example, IQ2_K achieves an impressive 2.375 bits per weight, and IQ3_K reaches 3.4375 bits per weight, by utilizing compact lookup tables (containing 4 to 32 INT8 values) for the quantized block scales.
  3. Maintaining Accuracy in Aggressive Quantization: The dual-level precision in K-Quants, by quantizing block-level scales to INT8 while retaining higher-precision super-block constants, significantly improves accuracy at very low bit counts (e.g., 2-3 bits per weight) compared to conventional single-layer methods. This hierarchical design is key to balancing efficiency and model quality.

Sources

Open the full topic