Very Simple MoE Intro
I've written a notebook containing a model and training code for a deliberately-simple character-level Mixture-of-Experts Transformer model. I've removed as many complications as I can from it while still retaining better performance on a per-FLOP basis than a similar dense Transformer. The only non-default dependencies are PyTorch, and WanDB. The following explains how this model works, and how Mixture-of-Experts work in general. (Note: The implementation is closest to a Switch Transformer. But it isn't really that. For instance, my implementation is trained solely on an autoregressive language modeling task, while Switch Transformer uses a masked token language modeling task; I use a different position encoding method; and so on. And a big chunk of the contribution of Switch Transformer is the routing across multiple GPUs in a particular way, while I completely ignore multi-GPU training or inference.) Why would we care about MoEs? Well, MoE Transformers generally take less compute th
Very Simple MoE Intro 1 A 3 O R N 1 A 3 O R N Very Simple MoE Intro Created: 2024-02-03 Wordcount: 3k Tags: essays machine-learning effort-post I've written a notebook containing a model and training code for a deliberately-simple character-level Mixture-of-Experts Transformer model. I've removed as many complications as I can from it while still retaining better performance on a per-FLOP basis than a similar dense Transformer. The only non-default dependencies are PyTorch, and WanDB. The following explains how this model works, and how Mixture-of-Experts work in general. ( Note: The implement
related reading
- Papers I’ve read this week, Mixture of Experts editionfinbarrtimbers.substack.com
- Mixture of Experts Explainedhuggingface.co
- The Annotated Transformernlp.seas.harvard.edu
- The Annotated Transformernlp.seas.harvard.edu
- Towards Monosemanticity: Decomposing Language Models With Dictionary Learningtransformer-circuits.pub
- Non_Interactive – Software & MLnonint.com
- transformer_attention.pdfarxiv.org
- [2101.03961] Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsityarxiv.org
- microgptkarpathy.github.io
- Transformers from Scratche2eml.school
- frontier model training methodologies | Alex Wa's Blogdjdumpling.github.io
- Monet: Mixture of Monosemantic Experts for Transformers Explained — LessWronglesswrong.com