Q4's Dominance: Up to 87.5% Memory Savings

4-bit quantization offers substantial efficiency gains for edge devices, reducing LLM memory footprint by up to 87.5% compared to 32-bit floating-point (FP32) models. For instance, a 7-billion-parameter model can shrink from 28 GB (FP32) to just 3.5 GB (INT4), enabling large models to run on resource-constrained hardware. [1, 2, 8]

The top 3

  1. Q4 Quantization Variants: Key Differences: Q4_K_M is the recommended 4-bit quantization, balancing quality and size by using mixed 4-bit and 6-bit precision for sensitive layers, offering 5-8% better quality than older Q4_0 at similar file sizes.
  2. Q4 vs. Q5 vs. Q8: Optimal Balance: Q4_K_M offers the best balance for most users, providing 70-75% memory savings with only 1-3% quality degradation compared to FP16, while Q5_K_M offers marginal quality gain with higher memory, and Q8_0 is near-lossless but uses double the memory of Q4.
  3. Q4 vs. Q5 vs. Q8: Optimal Balance for Hardware: Q4_K_M is the optimal default for most consumer setups, providing ~95-97% of FP16 quality at roughly 35% of the VRAM cost and 2-3x throughput. Q5_K_M offers a further quality/size trade-off, often with less than 1% accuracy loss from FP16, and is a sweet spot for 12-16GB VRAM. Q8_0 is effectively lossless (within 0.02-0.05 perplexity points of FP16) but demands significantly more VRAM, approximately double that of Q4_K_M.

Sources

Open the full topic