arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2305.01868cs.LGcs.DCcs.IRcs.PF
收藏

预训练与搜索:借助预训练神经代价模型实现高效嵌入表分片

Pre-train and Search: Efficient Embedding Table Sharding with Pre-trained Neural Cost Models

Rice University(莱斯大学);Meta Platforms, Inc.(元平台公司)

Daochen Zha, Louis Feng, Liang Luo, Bhargav Bhushanam, Zirui Liu, Yusuo Hu, Jade Nie, Yuzhen Huang, Yuandong Tian, Arun Kejariwal, Xia Hu

AI总结:

针对分布式训练中嵌入表分片的NP难与代价估算难题,提出“预训练+搜索”范式及NeuroShard方法,通过预训练神经代价模型结合搜索策略,在基准与生产场景均实现显著性能提升并开源代码。

摘要:

将大型机器学习模型跨多设备分片以平衡代价,在分布式训练中至关重要。这一问题颇具挑战性,因为划分属于NP难问题,且准确高效地估算代价难度较大。本研究探索了一种“预训练+搜索”的高效分片范式。其核心思路是预训练一个通用的、一劳永逸的神经网络来预测所有可能分片的代价,以此充当高效的分片模拟器。基于该预训练代价模型,我们随后执行在线搜索,针对任意特定分片任务确定最优分片方案。我们在深度学习推荐模型(DLRMs)中落地了这一思路,提出了用于嵌入表分片的NeuroShard。NeuroShard在增强表上预训练神经代价模型,以覆盖各类分片场景;随后分别通过束搜索和贪心网格搜索,确定最优的列级与表级分片方案。实验表明,NeuroShard在基准分片数据集上显著且持续优于现有最优方法,性能提升最高达23.8%。当部署在拥有数TB级嵌入表的超大规模生产DLRM中时,NeuroShard的嵌入代价比现有最优方法降低11.6%,对应端到端训练吞吐量提升6.6%。为推动“预训练+搜索”范式在ML for Systems领域的后续研究,我们已在https://github.com/daochenzha/neuroshard开源代码。

英文摘要:

Sharding a large machine learning model across multiple devices to balance the costs is important in distributed training. This is challenging because partitioning is NP-hard, and estimating the costs accurately and efficiently is difficult. In this work, we explore a "pre-train, and search" paradigm for efficient sharding. The idea is to pre-train a universal and once-for-all neural network to predict the costs of all the possible shards, which serves as an efficient sharding simulator. Built upon this pre-trained cost model, we then perform an online search to identify the best sharding plans given any specific sharding task. We instantiate this idea in deep learning recommendation models (DLRMs) and propose NeuroShard for embedding table sharding. NeuroShard pre-trains neural cost models on augmented tables to cover various sharding scenarios. Then it identifies the best column-wise and table-wise sharding plans with beam search and greedy grid search, respectively. Experiments show that NeuroShard significantly and consistently outperforms the state-of-the-art on the benchmark sharding dataset, achieving up to 23.8% improvement. When deployed in an ultra-large production DLRM with multi-terabyte embedding tables, NeuroShard achieves 11.6% improvement in embedding costs over the state-of-the-art, which translates to 6.6% end-to-end training throughput improvement. To facilitate future research of the "pre-train, and search" paradigm in ML for Systems, we open-source our code at https://github.com/daochenzha/neuroshard

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑