{"id":"arxiv:2403.08245","kind":"preprint","title":"Scattered Mixture-of-Experts Implementation","authors":["Shawn Tan","Yikang Shen","Rameswar Panda","Aaron Courville"],"author_count":4,"year":2024,"published":"2024-03-13","venue":null,"cited_by":2,"doi":null,"arxiv_id":"2403.08245","nct_id":null,"source_url":"https://arxiv.org/abs/2403.08245","archive_url":"https://space-kitty.com/papers/arxiv:2403.08245","updated":"2024-10-04","pmid":null,"pmcid":null,"openalex_id":"W4392822410","pdf_url":"https://arxiv.org/pdf/2403.08245","abstract":"We present ScatterMoE, an implementation of Sparse Mixture-of-Experts (SMoE) on GPUs. ScatterMoE builds upon existing implementations, and overcoming some of the limitations to improve inference and training speed, and memory footprint. This implementation achieves this by avoiding padding and making excessive copies of the input. We introduce ParallelLinear, the main component we use to build our implementation and the various kernels used to speed up the operation. We benchmark our implementation against Megablocks, and show that it enables a higher throughput and lower memory footprint. We also show how ParallelLinear enables extension of the Mixture-of-Experts concept by demonstrating with an implementation of Mixture of Attention.","abstract_license":"CC0-1.0 (arXiv descriptive metadata)","license":null,"is_open_access":false,"retracted":false,"peer_reviewed":false,"categories":["cs.LG","cs.DC"],"details":null,"provenance":"arxiv","attribution":"Abstract: arXiv descriptive metadata (CC0). Thank you to arXiv for use of its open access interoperability. This service was not reviewed or approved by, nor does it necessarily express or reflect the policies or opinions of, arXiv.","topics":[{"slug":"llm-architectures","name":"LLM Architectures & Pretraining","domain_slug":"ai"}],"cited_in_dossiers":[]}