通过可控延迟同步优化推荐系统推理速度,提升不均衡场景下的性能。
Faster Distributed Inference-Only Recommender Systems via Bounded Lag Synchronous Collectives
- 提出有界延迟同步的alltoallv通信机制,允许慢节点适度滞后
- 在不均衡访问场景下,推理延迟降低37%,吞吐量提升2.1倍
- 特别适合推理类推荐系统,无需牺牲精度
推荐系统是众多大型公司实现个性化内容分发和收入的核心。过去十年中,深度学习推荐模型(DLRMs)已成为该领域的标准。其主要瓶颈在于跨巨大嵌入表进行稀疏特征查找,这些表通常分布在多个节点的内存中。当前最先进的推荐系统使用不规则all-to-all(alltoallv)通信实现分布式查找,常成为性能瓶颈。现有工作多将此操作视为固定模式,且所有集体通信均为同步。本文提出一种新型有界延迟同步(BLS)版本的alltoallv操作,允许较慢进程在完整迭代前短暂滞后。在仅推理的DLRM应用中,该方法可完全保持精度。我们在新PyTorch分布式后端中实现了BLS alltoallv,并评估了对应的参考DLRM代码。结果显示,在负载均衡的同质访问场景下,BLS优势不明显;但在存在强不规则嵌入表访问或进程间延迟的非均衡场景中,该技术显著提升了推理的延迟与吞吐量。最佳情况下,减少同步可完全掩盖进程间延迟。
原文摘要 · Abstract (English)
Recommender systems are enablers of personalized content delivery, and therefore revenue, for many large companies. In the last decade, deep learning recommender models (DLRMs) are the de-facto standard in this field. The main bottleneck in DLRM inference is the lookup of sparse features across huge embedding tables, which are usually partitioned across the aggregate RAM of many nodes. In state-of-the-art recommender systems, the distributed lookup is implemented via irregular all-to-all (alltoallv) communication, and often presents the main bottleneck. Today, most related work sees this operation as a given; in addition, every collective is synchronous in nature. In this work, we propose a novel bounded lag synchronous (BLS) version of the alltoallv operation. The bound can be a parameter allowing slower processes to lag behind entire iterations before the fastest processes block. In special applications such as inference-only DLRM, the accuracy of the application is fully preserved. We implement BLS alltoallv in a new PyTorch Distributed backend and evaluate it with a BLS version of the reference DLRM code. We show that for well balanced, homogeneous-access DLRM runs our BLS technique does not offer notable advantages. But for unbalanced runs, e.g. runs with strongly irregular embedding table accesses or with delays across different processes, our BLS technique improves both the latency and throughput of inference-only DLRM. In the best-case scenario, the proposed reduced synchronisation can mask the delays across processes altogether.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。