[Paper Review] Branch-Train-MiX: Mixing Expert LLMs into a Mixture-of-Experts LLM
BTX trains domain-specific expert LLMs in parallel from a seed model, then merges them into a unified MoE model with token-level routing and fine-tuning, yielding strong accuracy with higher efficiency than baselines.
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.
Motivation & Objective
- Improve seed LLM performance on multiple domains (math, code, world knowledge) without prohibitive synchronization costs.
- Leverage embarrassingly parallel expert training and MoE finetuning to enable domain specialization within a unified model.
- Assess BTX against dense baselines, Branch-Train-Merge, and sparse upcycling in terms of accuracy and compute efficiency.
- Investigate routing strategies and ablations to understand how MoE finetuning affects performance across domains.
Proposed method
- Branch from a pretrained seed LLM and train N domain-specific expert LLMs in parallel on domain datasets.
- Merge the domain experts by forming a single MoE layer whose feedforward sublayers are composed from the experts, while averaging other modules.
- Finetune the unified MoE model to learn token-level routing via a router network.
- Explore routing schemes (Top-1/Top-2, soft vs hard, with/without load balancing) and additional variants (splitting/blending) to study performance and efficiency.
- Compare BTX to baselines (Dense DM, Sparse upcycling, BTM) using multi-domain evaluation benchmarks across math, code, and knowledge.
- Evaluate BTX on tasks such as GSM8K, MATH, HumanEval, MBPP, Natural Questions, TriviaQA, ARC, and MMLU to assess cross-domain performance.
Experimental results
Research questions
- RQ1How does branching into domain-specific experts and subsequent MoE finetuning affect overall performance compared to baselines?
- RQ2Can asynchronous, embarrassingly parallel expert training combined with MoE routing yield a favorable accuracy-efficiency tradeoff?
- RQ3What routing strategies provide the best balance between performance and compute for BTX across multiple domains?
Key findings
- Each domain expert excels in its respective domain when evaluated individually (Math and Code show large gains).
- BTX improves all tasks compared to the seed model and approaches specialized models in math and coding while preserving non-domain tasks.
- BTX outperforms Branch-Train-Merge and has better compute efficiency than dense or sparse upcycling baselines under the same data budget.
- MoE finetuning to learn token-level routing yields substantial gains over using simply averaged expert outputs (BTX vs BTM).
- Top-2 routing with load balancing provides more uniform expert utilization and strong overall performance; some routing variants offer trade-offs between math vs coding performance.
- BTX can train with more data and achieve higher average performance than pure MoE or single large models within similar compute budgets.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.