DreamShard: Generalizable Embedding Table Placement for Recommender Systems

Daochen Zha, Louis Feng, Qiaoyu Tan, Zirui Liu, Kwei-Herng Lai +4 more
10/5/2022
cs.LG
rl

Official code: daochenzha/dreamshard (28 stars, Python, MIT, last commit 2023-03-24).

Abstract

We study embedding table placement for distributed recommender systems, which aims to partition and place the tables on multiple hardware devices (e.g., GPUs) to balance the computation and communication costs. Although prior work has explored learning-based approaches for the device placement of computational graphs, embedding table placement remains to be a challenging problem because of 1) the operation fusion of embedding tables, and 2) the generalizability requirement on unseen placement tasks with different numbers of tables and/or devices.

Show full abstract

To this end, we present DreamShard, a reinforcement learning (RL) approach for embedding table placement. DreamShard achieves the reasoning of operation fusion and generalizability with 1) a cost network to directly predict the costs of the fused operation, and 2) a policy network that is efficiently trained on an estimated Markov decision process (MDP) without real GPU execution, where the states and the rewards are estimated with the cost network. Equipped with sum and max representation reductions, the two networks can directly generalize to any unseen tasks with different numbers of tables and/or devices without fine-tuning. Extensive experiments show that DreamShard substantially outperforms the existing human expert and RNN-based strategies with up to 19% speedup over the strongest baseline on large-scale synthetic tables and our production tables. The code is available at https://github.com/daochenzha/dreamshard

View on arXivView PDF

Code Implementations(1)

MIT

[NeurIPS 2022] DreamShard: Generalizable Embedding Table Placement for Recommender Systems

281PythonMay 1, 20223 years agoMIT

Similar Papers

Cite this paper

@article{zha2022dreamshard,
  title  = {DreamShard: Generalizable Embedding Table Placement for Recommender Systems},
  author = {Daochen Zha and Louis Feng and Qiaoyu Tan and Zirui Liu and Kwei-Herng Lai and Bhargav Bhushanam and Yuandong Tian and Arun Kejariwal and Xia Hu},
  year   = {2022},
  eprint = {2210.02023},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.02023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.02023.svg)](https://codeofpaper.com/paper/2210.02023)

Discussion