Skip to main content
QUICK REVIEW

[Paper Review] Branch-Train-Merge: Embarrassingly Parallel Training of Expert Language Models

Margaret Li, Suchin Gururangan|arXiv (Cornell University)|Aug 5, 2022
Topic ModelingComputer Science25 citations
TL;DR

BTM trains a set of independent expert language models on domain-specific data in parallel, then merges or averages them to form a scalable, efficient ensemble/single model, outperforming compute-matched baselines across sizes and domains.

ABSTRACT

We present Branch-Train-Merge (BTM), a communication-efficient algorithm for embarrassingly parallel training of large language models (LLMs). We show it is possible to independently train subparts of a new class of LLMs on different subsets of the data, eliminating the massive multi-node synchronization currently required to train LLMs. BTM learns a set of independent expert LMs (ELMs), each specialized to a different textual domain, such as scientific or legal text. These ELMs can be added and removed to update data coverage, ensembled to generalize to new domains, or averaged to collapse back to a single LM for efficient inference. New ELMs are learned by branching from (mixtures of) ELMs in the current set, further training the parameters on data for the new domain, and then merging the resulting model back into the set for future use. Experiments show that BTM improves in- and out-of-domain perplexities as compared to GPT-style Transformer LMs, when controlling for training cost. Through extensive analysis, we show that these results are robust to different ELM initialization schemes, but require expert domain specialization; LM ensembles with random data splits do not perform well. We also present a study of scaling BTM into a new corpus of 64 domains (192B whitespace-separated tokens in total); the resulting LM (22.4B total parameters) performs as well as a Transformer LM trained with 2.5 times more compute. These gains grow with the number of domains, suggesting more aggressive parallelism could be used to efficiently train larger models in future work.

Motivation & Objective

  • Motivate a scalable training paradigm for large language models that reduces cross-node synchronization by training domain-specialist experts independently.
  • Develop the Branch-Train-Merge (BTM) algorithm to grow an ELMforest by branching new experts from existing ones, training them on domain-specific data, and merging them back into the forest.
  • Enable flexible inference through ensembling or parameter averaging of experts to balance performance and inference cost.
  • Empirically evaluate BTM against compute-matched Transformer-LMs and prior domain-specialized baselines across multiple model scales and data domains.
  • Explore scalability to many domains and analyze factors like seed training, data provenance, and initialization on performance and efficiency.

Proposed method

  • Define an ELMforest as a set of independent expert LM s each specialized to a data domain and fully decoupled during training and inference.
  • Branch-Train-Merge: iteratively branch a new ELM from a weighted average of existing experts, train it on a new domain, and merge it into the forest; seed the process with a pretrained seed LM to improve fusion.
  • Ensemble inference combines ELM outputs with a domain posterior to compute p(X_t|x_<t) as a weighted sum over experts; sparsity allows top-k selection to reduce cost.
  • Alternative inference via parameter averaging creates a single model by weighted averaging of ELM parameters, with weights informed by domain posteriors or other schemes.
  • Compare against compute-matched baselines: Transformer-LM and DEMix; evaluate perplexity across 125M–1.3B parameter scales and 8 training + 8 evaluation domains; analyze seed budget and initialization effects.

Experimental results

Research questions

  • RQ1Does embarrassingly parallel training with domain-specialized experts (ELMs) outperform compute-matched Transformer-LMs and prior domain baselines in both in-domain and out-of-domain perplexity?
  • RQ2How does the Branch-Train-Merge procedure affect scalability when expanding to many domains (e.g., up to 64 domains) and larger parameter counts?
  • RQ3What is the impact of seed-phase training, initialization, and data provenance on the effectiveness of ELM ensembles and on parameter averaging performance?
  • RQ4How do ensembling and parameter averaging compare in terms of inference cost and performance as the number of domains grows?
  • RQ5What are the efficiency implications (updates per second, communication costs) of branched ELM training versus fully synchronized training?

Key findings

  • ELMs trained with BTM outperform compute-matched Transformer-LMs and prior DEMix baselines across multiple model scales (125M, 350M, 750M, 1.3B parameters).
  • BTM achieves higher updates-per-second than fully synchronized baselines, with efficiency gains increasing for larger models due to reduced cross-GPU communication.
  • Using domain-provenance-based domain specialization is crucial; random-data splits underperform compared to domain-focused splits.
  • ELMforest parameter averaging can approach ensembling performance with no extra inference cost, though ensembling remains stronger, especially as domains increase.
  • Scaling to 64 domains yields a 22.4B parameter ensemble performance comparable to a Transformer-LM trained with 2.5x more compute; benefits grow with more domains.
  • Seed training is essential for effective averaging and robust performance; optimal seed budget is typically around 40–60% of total compute, with robustness across a wide range.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.