{"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/fastmoe-a-fast-mixture-of-expert-training","title":"FastMoE: A Fast Mixture-of-Expert Training System","arxiv_id":"2103.13262","date":"2021-03-24","proceeding":null,"authors":["Jiaao He","Jiezhong Qiu","Aohan Zeng","Zhilin Yang","Jidong Zhai","Jie Tang"],"abstract":"Mixture-of-Expert (MoE) presents a strong potential in enlarging the size of language model to trillions of parameters. However, training trillion-scale MoE requires algorithm and system co-design for a well-tuned high performance distributed training system. Unfortunately, the only existing platform that meets the requirements strongly depends on Google's hardware (TPU) and software (Mesh Tensorflow) stack, and is not open and available to the public, especially GPU and PyTorch communities. In this paper, we present FastMoE, a distributed MoE training system based on PyTorch with common accelerators. The system provides a hierarchical interface for both flexible model design and easy adaption to different applications, such as Transformer-XL and Megatron-LM. Different from direct implementation of MoE models using PyTorch, the training speed is highly optimized in FastMoE by sophisticated high-performance acceleration skills. The system supports placing different experts on multiple GPUs across multiple nodes, enabling enlarging the number of experts linearly against the number of GPUs. The source of FastMoE is available at https://github.com/laekov/fastmoe under Apache-2 license.","url_abs":"https://arxiv.org/abs/2103.13262v1","url_pdf":"https://arxiv.org/pdf/2103.13262v1.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":"fastmoe-a-fast-mixture-of-expert-training","repo_url":"https://github.com/davidmrau/mixture-of-experts","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"fastmoe-a-fast-mixture-of-expert-training","repo_url":"https://github.com/laekov/fastmoe","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"fastmoe-a-fast-mixture-of-expert-training","repo_url":"https://github.com/Hanlard/M2M-by-fastmoe","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":null,"task_name":"GPU"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"adaptive-input-representations","method_name":"Adaptive Input Representations"},{"method_slug":"adaptive-softmax","method_name":"Adaptive Softmax"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"cosine-annealing","method_name":"Cosine Annealing"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-cosine-annealing","method_name":"Linear Warmup With Cosine Annealing"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer-xl","method_name":"Transformer-XL"},{"method_slug":"variational-dropout","method_name":"Variational Dropout"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2103.13262","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2103.13262"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/laekov/fastmoe","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Hanlard/M2M-by-fastmoe","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/davidmrau/mixture-of-experts","reach":null}],"summary":{"ran_draft_wrong":1,"unverified":5},"by_repo_kind":{"official":{"samples":6,"ran":1,"repositories":2}},"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":1,"samples":[{"code_sha256_prefix":"f678813f38739b3c","entry":"dummy_data","repo":"davidmrau/mixture-of-experts","repo_kind":"official","path":"example.py","file_url":"https://github.com/davidmrau/mixture-of-experts/blob/HEAD/example.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"f678813f38739b3c"}},{"code_sha256_prefix":"83987936aaca71ca","entry":"float_from_env","repo":"laekov/fastmoe","repo_kind":"official","path":"fmoe/fastermoe/config.py","file_url":"https://github.com/laekov/fastmoe/blob/HEAD/fmoe/fastermoe/config.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"83987936aaca71ca"}},{"code_sha256_prefix":"268830a4a5f536e6","entry":"get_expert_param_size","repo":"laekov/fastmoe","repo_kind":"official","path":"fmoe/fastermoe/expert_utils.py","file_url":"https://github.com/laekov/fastmoe/blob/HEAD/fmoe/fastermoe/expert_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"268830a4a5f536e6"}},{"code_sha256_prefix":"9a3880bba43ee017","entry":"get_rank_0_in_comm","repo":"laekov/fastmoe","repo_kind":"official","path":"fmoe/utils.py","file_url":"https://github.com/laekov/fastmoe/blob/HEAD/fmoe/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9a3880bba43ee017"}},{"code_sha256_prefix":"57456ba2ddb12fdf","entry":"no_shadow_policy","repo":"laekov/fastmoe","repo_kind":"official","path":"fmoe/fastermoe/shadow_policy.py","file_url":"https://github.com/laekov/fastmoe/blob/HEAD/fmoe/fastermoe/shadow_policy.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"57456ba2ddb12fdf"}},{"code_sha256_prefix":"65b2f15dfaa83242","entry":"switch_from_env","repo":"laekov/fastmoe","repo_kind":"official","path":"fmoe/fastermoe/config.py","file_url":"https://github.com/laekov/fastmoe/blob/HEAD/fmoe/fastermoe/config.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"65b2f15dfaa83242"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}