Q4_K_M: The Goldilocks Quantization for Local LLMs

Q4_K_M is widely recommended for consumer hardware, reducing a 7B model's VRAM from ~14GB (FP16) to ~4.5GB, a 72% cut, while retaining 96.5% of baseline quality due to its mixed-precision K-quantization. [2, 8, 15, 18]

The top 3

  1. Q4_K_M's Edge: Mixed Precision K-Quantization Explained: Q4_K_M leverages 'K-quants'—a block-wise, mixed-precision method—meaning it stores most weights at 4-bit but uses 6-bit precision for the most sensitive layers. This intelligent allocation, indicated by the 'K' and 'M' (medium variant), provides a significantly better quality-to-size ratio than simpler 4-bit formats like Q4_0.
  2. Unmatched Efficiency: 70% Size Reduction with Minimal Quality Loss: Q4_K_M dramatically reduces model size; a 7B parameter model typically shrinks from ~14GB (FP16) to ~4.5GB, a ~70% reduction in memory footprint. This compression comes with only 1-3% quality loss, making it a highly efficient choice compared to Q8_0, which uses ~7.7GB for less than 0.5% quality loss but requires significantly more VRAM.
  3. Optimal Balance: Q4_K_M's Sweet Spot for Local Inference: Q4_K_M is widely recommended as the 'goldilocks' format for local LLM inference, striking an optimal balance between model size, inference speed, and output accuracy. It offers a superior trade-off compared to smaller, lower-quality formats like Q2_K, and is more efficient than larger, slightly higher-quality options like Q5_K_M for most consumer hardware.

Sources

Open the full topic