{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/dreamshard-generalizable-embedding-table","title":"DreamShard: Generalizable Embedding Table Placement for Recommender Systems","arxiv_id":"2210.02023","date":"2022-10-05","proceeding":null,"authors":["Daochen Zha","Louis Feng","Qiaoyu Tan","Zirui Liu","Kwei-Herng Lai","Bhargav Bhushanam","Yuandong Tian","Arun Kejariwal","Xia Hu"],"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. 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","url_abs":"https://arxiv.org/abs/2210.02023v1","url_pdf":"https://arxiv.org/pdf/2210.02023v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"dreamshard-generalizable-embedding-table","repo_url":"https://github.com/daochenzha/dreamshard","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":null,"task_name":"GPU"},{"task_slug":"recommendation-systems","task_name":"Recommendation Systems"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.02023","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.02023"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/daochenzha/dreamshard","reach":null}],"summary":{"ran_honours":1,"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"official":{"samples":4,"ran":2,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"3146017b0709fbef","entry":"plan2allocation","repo":"daochenzha/dreamshard","repo_kind":"official","path":"dreamshard/sharders.py","file_url":"https://github.com/daochenzha/dreamshard/blob/HEAD/dreamshard/sharders.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3146017b0709fbef"}},{"code_sha256_prefix":"1853184b9cb1b65f","entry":"register_sharder","repo":"daochenzha/dreamshard","repo_kind":"official","path":"dreamshard/sharders.py","file_url":"https://github.com/daochenzha/dreamshard/blob/HEAD/dreamshard/sharders.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1853184b9cb1b65f"}},{"code_sha256_prefix":"fb67e93fab6a305e","entry":"dreamshard","repo":"daochenzha/dreamshard","repo_kind":"official","path":"dreamshard/sharders.py","file_url":"https://github.com/daochenzha/dreamshard/blob/HEAD/dreamshard/sharders.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fb67e93fab6a305e"}},{"code_sha256_prefix":"12b7f16889cfe1f2","entry":"shard","repo":"daochenzha/dreamshard","repo_kind":"official","path":"dreamshard/sharders.py","file_url":"https://github.com/daochenzha/dreamshard/blob/HEAD/dreamshard/sharders.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"12b7f16889cfe1f2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}