用4比特量化让推荐模型更小更快,精度不降反升。
DQRM: Deep Quantized Recommendation Models
- 通过感知量化训练,让推荐模型嵌入表实现4比特压缩。
- 在Kaggle和1TB数据集上,4比特模型精度超原版32位模型。
- 适合云服务部署与边缘设备运行,大幅降低通信开销。
大规模推荐模型是众多互联网公司的主要计算负载。这些推荐系统依赖于海量但稀疏访问的嵌入表(1TB以上),带来严重内存瓶颈。本文提出新型推荐框架DQRM,基于当前最先进的深度学习推荐模型(DLRM)。该框架使云端推理更高效,探索将强大推荐模型部署于小型边缘设备的可能,并优化了数据并行训练下的通信开销。具体而言,我们发现感知量化训练(QAT)具有强正则化作用,可有效缓解DLRM的严重过拟合问题。由此实现了无精度损失的4比特量化。进一步提出两项技术,专门优化推荐模型中嵌入表的常规QAT流程。此外,为提升训练效率,我们在支持的稀疏化基础上,将嵌入表梯度量化至8比特。结合梯度稀疏化与量化,显著减少通信量。实验表明,采用INT4的DQRM模型在Kaggle数据集上达79.07%准确率,模型仅0.27 GB;在Terabyte数据集上达81.21%准确率,模型大小为1.57 GB,均优于更大规模的FP32 DLRM(Kaggle: 2.16 GB, Terabyte: 12.58 GB)。
原文摘要 · Abstract (English)
Large-scale recommendation models are currently the dominant workload for many large Internet companies. These recommenders are characterized by massive embedding tables that are sparsely accessed by the index for user and item features. The size of these 1TB+ tables imposes a severe memory bottleneck for the training and inference of recommendation models. In this work, we propose a novel recommendation framework that is small, powerful, and efficient to run and train, based on the state-of-the-art Deep Learning Recommendation Model (DLRM). The proposed framework makes inference more efficient on the cloud servers, explores the possibility of deploying powerful recommenders on smaller edge devices, and optimizes the workload of the communication overhead in distributed training under the data parallelism settings. Specifically, we show that quantization-aware training (QAT) can impose a strong regularization effect to mitigate the severe overfitting issues suffered by DLRMs. Consequently, we achieved INT4 quantization of DLRM models without any accuracy drop. We further propose two techniques that improve and accelerate the conventional QAT workload specifically for the embedding tables in the recommendation models. Furthermore, to achieve efficient training, we quantize the gradients of the embedding tables into INT8 on top of the well-supported specified sparsification. We show that combining gradient sparsification and quantization together significantly reduces the amount of communication. Briefly, DQRM models with INT4 can achieve 79.07% accuracy on Kaggle with 0.27 GB model size, and 81.21% accuracy on the Terabyte dataset with 1.57 GB, which even outperform FP32 DLRMs that have much larger model sizes (2.16 GB on Kaggle and 12.58 on Terabyte).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。