Inside Q3_K_S: 3-Bit K-Means Block Quantization
Q3_K_S employs a sophisticated 3-bit precision scheme with K-means optimization applied to 'Small' blocks across all tensors. As part of the K-quant family, it uses a hierarchical affine quantizer that structures 256-weight super-blocks into smaller groups, incorporating additional quantized scale and minimum metadata to maintain fidelity despite the aggressive 3-bit compression.
The top 3
- K-Means' Core Advantage in 3-Bit LLM Quantization: K-Means clustering in Q3_K_S efficiently maps continuous LLM weights to just 8 discrete values by finding optimal centroids, minimizing distortion even at 3-bit precision. This non-uniform approach aligns with the natural distribution of weights, preserving more accuracy than simpler linear methods.
- Super-Block vs. Block: Q3_K_S's Memory Secret: Q3_K_S achieves its extreme RAM efficiency by organizing weights into 256-weight 'super-blocks', where a single main scale factor is shared, and smaller sub-blocks only store tiny adjustments. This hierarchical structure drastically reduces the metadata overhead compared to older per-block quantization schemes.
- Q3_K_S: The Trade-off Champion for Ultra-Low RAM: While offering maximal RAM savings, Q3_K_S typically incurs a 5-10% accuracy degradation compared to full-precision (FP16) models, making its quality loss noticeable in complex reasoning and math tasks. It is specifically recommended for resource-constrained deployments where fitting the model into memory is the absolute priority.
Sources
Open the full topic