Optimal Splitting of Language Models from Mixtures to Specialized Domains
Abstract
Lay Summary
Training language models (LMs) to master multiple specialized subjects including math, code, or science is highly inefficient when forcing a single model to learn everything simultaneously, and it is difficult to know exactly how much compute to spend on general knowledge versus specialized training. This work discusses "split model training" an approach that trains multiple copies of a model on different specialized knowledge domains and routes to different domains depending on a user query. To understand when to specialize, we propose a mathematical scaling law, which calculates the exact, optimal moment to stop general training on all data, and split to multiple independent models that each specialize in a specific domain. This optimized splitting strategy consistently boosts performance on reasoning and knowledge tests across multiple topics including math, science, and general knowledge compared to training on all data jointly. Since the independent expert models are trained in parallel on standard hardware, this further has the potential to enable broader access to training LLMs and help reduce the cost of training.