Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

DreamShard: Generalizable Embedding Table Placement for Recommender Systems

About

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. 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

Daochen Zha, Louis Feng, Qiaoyu Tan, Zirui Liu, Kwei-Herng Lai, Bhargav Bhushanam, Yuandong Tian, Arun Kejariwal, Xia Hu• 2022

Related benchmarks

TaskDatasetResultRank
Embedding Table PlacementDLRM-20 4 (train)
Latency (ms)18.6
8
Embedding Table PlacementDLRM-100 (test)
Cost (ms)77.8
7
Embedding Table PlacementProd-80 8 (train)
Cost (ms)33.6
7
Embedding Table PlacementDLRM 1.0 (train)
Running Time (ms)15.1
7
Embedding Table PlacementDLRM 1.0 (test)
Latency (ms)13.9
7
Embedding Table PlacementUltra-Large Industrial Recommendation Model (train)
Embedding Cost61.59
6
Embedding Table PlacementDLRM-50 1.0 (test)
Latency (ms)65.5
3
Embedding Table PlacementDLRM-20 1.0 (train)
Running Time (ms)27.1
2
Embedding Table PlacementDLRM-30 1.0 (test)
Running Time (ms)38.6
2
Showing 9 of 9 rows

Other info

Code

Follow for update