Learning to Decode Collaboratively with Multiple Language Models
Abstract
We propose a method to teach multiple large language models (LLM) to collaborate by interleaving their generations at the token level. We model the decision of which LLM generates the next token as a latent variable. By optimizing the marginal likelihood of a training set under our latent variable model, the base LLM automatically learns when to generate itself and when to call on one of the ``assistant'' language models to generate, all without direct supervision. Token-level collaboration during decoding allows for a fusion of each model's expertise in a manner tailored to the specific task at hand. Our collaborative decoding is especially useful in cross-domain settings where a generalist base LLM learns to invoke domain expert models. On instruction-following, domain-specific QA, and reasoning tasks, we show that the performance of the joint system exceeds that of the individual models. Through qualitative analysis of the learned latent decisions, we show models trained with our method exhibit several interesting collaboration patterns, e.g., template-filling. Our code is available at https://github.com/clinicalml/co-llm.
Community
I've been thinking of ways to implement a "rewind" function but your deferral function is a lot more elegant than what I've been contemplating. Really nice work, this is the real MoE. This could be incredibly useful, especially as models become smaller and we can afford to to put many of them on the GPU.
Do you think this can or could work with a single model that "hot swaps" lora type modules on the fly? That would be interesting...
š
I also wonder whether this could use a single model, with different hyperparameters, in such a way as to reduce hallucinations?
That depends on what you mean by mixture of experts! It is a mixture of experts in the broad sense that it combines the generations of multiple models. But there are several differences to other MoE work, which we tried to outline in Section 6. The key is that this approach works with off-the-shelf experts and makes no assumptions about how the assistant and the base model should interact, allowing the interaction pattern to be learned from data.
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- Tuning Language Models by Proxy (2024)
- Learning to Generate Instruction Tuning Datasets for Zero-Shot Task Adaptation (2024)
- Learning to Reduce: Optimal Representations of Structured Data in Prompting Large Language Models (2024)
- Direct Alignment of Draft Model for Speculative Decoding with Chat-Fine-Tuned LLMs (2024)
- Learning to Route Among Specialized Experts for Zero-Shot Generalization (2024)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment:
@librarian-bot
recommend
Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper