Introduction
The rapid advancement of Large Language Models (LLMs) has led to a paradigm where the most capable models, such as GPT-4 or PaLM-2, are often "black boxes." These models are accessible only via inference APIs, preventing users from accessing internal weights for traditional domain adaptation. Fine-tuning a 30B+ parameter model is computationally prohibitive for most organizations, even if weights were available. This creates an "access vs. adaptation" dilemma: how can researchers leverage the broad reasoning power of massive generalist models while injecting niche expertise for specific domains like legal or medical text?
The CombLM Framework
To address this, the authors introduce CombLM, a lightweight framework designed to adapt black-box models without weight access. The approach follows a two-step process:
- Small Expert Training: A smaller, "white-box" model (e.g., OPT-1.3B) is fine-tuned on a target domain.
- Probability Distribution Merging: Instead of merging weights, CombLM merges the output probability distributions of the large generalist ($P_L$) and the small expert ($P_S$).
A key innovation is the "combination function"—a tiny neural network that learns to weight the predictions of both models. The researchers explored several strategies, with Entropy-scalar emerging as particularly effective. This method uses the entropy (uncertainty) of each model's prediction to dynamically shift weight. If the large model is uncertain about a technical term while the small expert is confident, the system prioritizes the expert's output.
Experimental Evaluation
The framework was validated across three primary areas:
- Domain Adaptation: Using Amazon Reviews (e-commerce), Enron Emails (corporate), and FreeLaw (legal).
- Machine Translation: Evaluating English-German and English-Czech tasks using the WMT21 dataset.
- General Capability: Testing on a subset of The Pile to ensure domain specialization did not lead to "catastrophic forgetting" of general language skills.
The combination network proved remarkably data-efficient, requiring as few as 100 sequences to be trained effectively, making the final adaptation step fast and inexpensive.
Results and Analysis
CombLM consistently outperformed both the standalone large model and the fine-tuned small expert. In domain adaptation tasks, the method achieved up to a 9% improvement in perplexity on the Amazon Reviews dataset compared to the best single model.
In Machine Translation, the synergy between a 1.3B expert and a 30B generalist resulted in significant BLEURT score gains, surpassing the 30B model's zero-shot performance. These results highlight that the large model provides essential logic and grammar, while the small expert contributes specialized vocabulary and context. The method achieved these gains using a domain expert 23x smaller than the large black-box model.
Discussion and Limitations
While CombLM offers a powerful path for adaptation, it currently requires access to full vocabulary logprobs from the black-box API. Many commercial providers currently limit this output to the top-K tokens. Future work may involve estimating entropy from these limited values. Additionally, since the method requires inference from two models, it does not reduce per-token API costs, though it drastically reduces the cost and complexity of model training and adaptation.
Conclusion
CombLM demonstrates that effective domain adaptation of massive LLMs is possible without weight access or massive compute. By intelligently merging the outputs of a generalist and a specialist, researchers can achieve state-of-the-art performance with high data efficiency and minimal risk of forgetting general capabilities.
Summary updated