Branch-Train-MiX: Mixing Expert LLMs into a Mixture-of-Experts LLM
About
We investigate efficient methods for training Large Language Models (LLMs) to possess capabilities in multiple specialized domains, such as coding, math reasoning and world knowledge. Our method, named Branch-Train-MiX (BTX), starts from a seed model, which is branched to train experts in embarrassingly parallel fashion with high throughput and reduced communication cost. After individual experts are asynchronously trained, BTX brings together their feedforward parameters as experts in Mixture-of-Expert (MoE) layers and averages the remaining parameters, followed by an MoE-finetuning stage to learn token-level routing. BTX generalizes two special cases, the Branch-Train-Merge method, which does not have the MoE finetuning stage to learn routing, and sparse upcycling, which omits the stage of training experts asynchronously. Compared to alternative approaches, BTX achieves the best accuracy-efficiency tradeoff.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Image Classification | Flowers (test) | Accuracy75.07 | 183 | |
| Image Classification | EuroSAT (test) | Accuracy75.2 | 177 | |
| Language Understanding | MMLU 5-shot | -- | 153 | |
| Question Answering | CSQA (test) | Accuracy75.76 | 68 | |
| Paraphrase Identification | PAWS-X | Accuracy53.5 | 66 | |
| Image Classification | Oxford-IIIT Pet (test) | -- | 59 | |
| Image Classification | Pets (test) | Accuracy88.44 | 58 | |
| Causal Reasoning | XCOPA | Accuracy55.6 | 55 | |
| Story Reasoning | XStoryCloze | Accuracy56.4 | 51 | |
| Image Classification | Oxford 102 Flowers (test) | Mean Per-Class Accuracy78.52 | 44 |