TensorX
返回文献探索

Paper · arXiv 2403.03870

Learning to Decode Collaboratively with Multiple Language Models

Shannon Zejiang Shen, Hunter Lang, Bailin Wang, Yoon Kim, David Sontag

20 upvotesMarch 6, 2024arXiv 预印本
AI 摘要

Multiple large language models collaborate by interleaving token-level generation decisions, optimizing performance across tasks without direct supervision.

large language modelsLLMtoken-level collaborationlatent variablemarginal likelihoodjoint systeminstruction-followingdomain-specific QAreasoning taskslatent decisionstemplate-filling

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.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
Learning to Decode Collaboratively with Multiple Language Models | TensorX