[Paper Review] Post-Training 4-bit Quantization on Embedding Tables
This paper proposes row-wise uniform quantization with greedy search and codebook-based quantization using k-means clustering to enable post-training 4-bit quantization on embedding tables in recommender systems. It achieves state-of-the-art accuracy preservation, reducing model size to just 13.89% of the original while maintaining neutral performance on a production Facebook ranking model.
Continuous representations have been widely adopted in recommender systems where a large number of entities are represented using embedding vectors. As the cardinality of the entities increases, the embedding components can easily contain millions of parameters and become the bottleneck in both storage and inference due to large memory consumption. This work focuses on post-training 4-bit quantization on the continuous embeddings. We propose row-wise uniform quantization with greedy search and codebook-based quantization that consistently outperforms state-of-the-art quantization approaches on reducing accuracy degradation. We deploy our uniform quantization technique on a production model in Facebook and demonstrate that it can reduce the model size to only 13.89% of the single-precision version while the model quality stays neutral.
Motivation & Objective
- To address the challenge of reducing memory and inference latency in large-scale recommender systems where embedding tables dominate model size.
- To develop post-training 4-bit quantization techniques that minimize accuracy degradation, especially when training data is unavailable.
- To overcome the limitations of existing quantization methods—based on histograms or distributional assumptions—that fail on small embedding row vectors.
- To design efficient, deployable quantization methods that maintain high model fidelity while enabling extreme compression.
- To demonstrate practical viability by deploying the method in a real-world production system at Facebook.
Proposed method
- Row-wise uniform quantization with greedy search to find optimal clipping thresholds by iteratively exploring local minima of mean squared error.
- Use of FP16 precision for scale and bias parameters to further reduce model size without increasing quantization error.
- Codebook-based quantization via k-means clustering to map input vectors to non-uniformly distributed values, improving representation fidelity.
- Two-tier k-means clustering (KMEANS-CLS) to reduce codebook size while maintaining accuracy.
- Empirical evaluation of quantization error using normalized ℓ₂ loss across varying embedding dimensions and quantization methods.
- Comparison of all methods against state-of-the-art approaches including ACIQ, histogram-based clipping, and symmetric/asymmetric quantization.
Experimental results
Research questions
- RQ1Can post-training 4-bit quantization achieve negligible accuracy degradation on embedding tables when prior methods fail?
- RQ2Does a greedy search over clipping thresholds outperform distribution-based or histogram-based clipping for small embedding row vectors?
- RQ3Can codebook-based quantization with k-means clustering achieve better accuracy than uniform quantization at the same compression rate?
- RQ4To what extent can model size be reduced while preserving model quality in a real-world production setting?
- RQ5Does using FP16 for scale and bias parameters in uniform quantization further reduce model size without increasing error?
Key findings
- Row-wise uniform quantization with greedy search reduced model size to 13.89% of the original single-precision model size while maintaining neutral accuracy in a production Facebook ranking model.
- The proposed greedy search method achieved the lowest normalized ℓ₂ loss (0.03889–0.06221) among all 4-bit uniform quantization methods across different embedding dimensions.
- Codebook-based quantization with k-means clustering achieved the smallest normalized ℓ₂ loss (0.03670–0.05781) and matched the original model’s log loss while reducing model size to 18.8%–37.5% of the original.
- Using FP16 for scale and bias parameters in the greedy method reduced model size to 13.28% of the original at d=128, with no measurable loss in performance.
- The method outperformed state-of-the-art approaches such as ACIQ, histogram-based clipping, and symmetric quantization in both quantization error and model accuracy.
- Empirical results show that prior 4-bit quantization methods perform no better than simple range-based clipping when applied to small embedding row vectors, validating the need for new approaches.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.