Slash LLM communication costs by 75% while keeping 98% performance
https://arxiv.org/abs/2411.07942
π― Original Problem:
Tensor parallelism in LLM inference requires high communication costs between devices. As models grow larger and need more devices, this communication overhead becomes a major bottleneck, especially when serving models at scale.
-----
π§ Solution in this Paper:
β The paper introduces a hybrid quantization method combining 4-bit and BF16 precision for communicating features between devices.
β During calibration, it calculates quantization parameters for each feature using exponential moving averages from a calibration dataset.
β The method identifies features with large quantization ranges and keeps them in BF16 precision while quantizing others to 4 bits.
β The selection of high-precision features remains fixed across all sequences and devices.
-----
π‘ Key Insights:
β A small number of features consistently show enormous ranges, causing large quantization errors
β Tensor parallelism naturally counteracts feature quantization errors through synchronization
β Quantizing partial sums before synchronization results in errors clustering around zero
β Only 1/64th of features need to be kept in BF16 to maintain performance
-----
π Results:
β Reduces average bits per value from 16 to 4.2
β Gemma 2 27B: Preserves 98% of original performance
β Llama 2 13B: Maintains 99.5% of original performance
β Mistral NeMo 12B: Retains 97.1% of original performance










