HackerPapers

arXiv:2211.15841cs.LG

MegaBlocks: Efficient Sparse Training with Mixture-of-Experts

Trevor Gale, Deepak Narayanan, Cliff Young, Matei Zaharia

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

We present MegaBlocks, a system for efficient Mixture-of-Experts (MoE) training on GPUs. Our system is motivated by the limitations of current frameworks, which restrict the dynamic routing in MoE layers to satisfy the constraints of existing software and hardware. These formulations force a tradeoff between model quality and hardware efficiency, as users must choose between dropping tokens from the computation or wasting computation and memory on padding. To address these limitations, we reformulate MoE computation in terms of block-sparse operations and develop new block-sparse GPU kernels that efficiently handle the dynamism present in MoEs. Our approach never drops tokens and maps efficiently to modern hardware, enabling end-to-end training speedups of up to 40% over MoEs trained with the state-of-the-art Tutel library and 2.4x over DNNs trained with the highly-optimized Megatron-LM framework.

arXiv comments
Journal reference
DOI
Subjects
cs.LGMachine Learning cs.AIArtificial Intelligence cs.DCDistributed, Parallel, and Cluster Computing

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Jan 2023 to Jan 2023.

Comments linking this paper, per year.

Discussed in comments1 thread

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.