Q4 Quantization: Best Balance of Size & Accuracy

4-bit quantization, particularly Q4_K_M, is widely considered the optimal choice for local LLMs, offering up to 75% memory reduction with only 1-3% accuracy degradation on benchmarks like MMLU. This balances efficiency and performance better than 8-bit (less memory savings) or 2-bit (significant quality loss).

The top 3

  1. Q4_K_M's Secret: Mixed Precision for Best Balance: Q4_K_M achieves its superior balance by using K-quants, storing most weights at 4-bit but sensitive layers at 6-bit, and employing group-wise quantization for higher accuracy than pure 4-bit Q4_0.
  2. Q4 vs. Q5 vs. Q8: Quantization's Size-Accuracy Sweet Spot: Q4_K_M reduces a 7B model to ~4.5GB with 1-3% quality loss, offering a 75% size reduction. Q5_K_M provides slightly better accuracy with ~70% reduction, while Q8_0 for a 7B model is ~7GB.
  3. Gemma's Q4 Edge: Architectural Resilience to Quantization: Gemma 3 demonstrates exceptional Q4 tolerance, showing a -0.7% perplexity change (slight improvement) under Q4 quantization, while Llama 3.1 degrades by +2.8%. This is attributed to Gemma's architecture, such as sliding-window layers.

Sources

Open the full topic