Optimal Bit-Depths: Quantization for Each Hardware Type
INT8 quantization is a robust default for CPUs and edge devices, offering significant memory and speed benefits with minimal accuracy loss. Newer GPU architectures, such as NVIDIA's Ampere and Hopper, provide hardware acceleration for INT4 and FP8 formats, enabling even greater efficiency and memory savings.
The top 3
- 4-bit vs. 8-bit: The Quantization Sweet Spot: 8-bit quantization offers near-original accuracy (over 99%) with a 50% memory reduction, ideal for high-fidelity production. 4-bit cuts memory by 75% and speeds up inference by 2.4x, often seen as the optimal balance with advanced techniques like AWQ or GPTQ.
- GPU's Edge: Optimal Bit-Depths for LLM Throughput: High-end GPUs, like NVIDIA H100s, achieve 2.2x higher token processing with FP8 precision compared to FP16. For consumer GPUs, 4-bit quantization allows models such as Llama 3.1 8B to run efficiently on as little as 4GB VRAM, processing around 68 tokens/second, often utilizing techniques like GPTQ or AWQ.
- Edge Devices: Pushing Sub-4-bit for Extreme Efficiency: For memory-constrained edge devices, sub-4-bit quantization (2-bit, 3-bit) can reduce model size by over 90%. While generic sub-4-bit methods often halve accuracy, specialized techniques like Picovoice's picoLLM with X-bit allocation can maintain near-float16 accuracy even at 2-bit on benchmarks like MMLU.
Sources
Open the full topic