从混合模型的角度重新思考大语言模型集成
Rethinking LLM Ensembling from the Perspective of Mixture Models
AI总结:
本文提出混合模型式集成(ME),通过将集成重新解释为混合模型,随机选择单个模型生成下一个token,避免显式计算完整集成分布,实现1.78x-2.68x加速,并揭示了集成与token级路由方法的联系。
摘要:
模型集成是提升机器学习模型性能的成熟技术。传统上,这涉及对多个模型的输出分布进行平均,并选择最可能的标签。这一思想已自然扩展到大型语言模型(LLMs),在提升性能的同时也带来了巨大的计算成本。这种低效源于将传统集成实现直接应用于LLMs,需要为每个模型单独进行前向传播以显式计算集成分布。在本文中,我们提出了混合模型式集成(ME)。通过将集成重新解释为混合模型,ME在每一步随机选择一个模型来生成下一个token,从而避免显式计算完整的集成分布。ME在数学上等价于从集成分布中采样,但只需调用一个模型,使其比传统集成快1.78x-2.68x倍。此外,这一视角将LLM集成与token级路由方法联系起来,表明LLM集成是路由方法的一个特例。我们的发现为高效的LLM集成开辟了新途径,并激励了对LLM token级路由策略的进一步探索。我们的代码可在https://github.com/Kamichanw/Mixture-model-like-Ensemble获取。
英文摘要:
Model ensembling is a well-established technique for improving the performance of machine learning models. Conventionally, this involves averaging the output distributions of multiple models and selecting the most probable label. This idea has been naturally extended to large language models (LLMs), yielding improved performance but incurring substantial computational cost. This inefficiency stems from directly applying conventional ensemble implementation to LLMs, which require a separate forward pass for each model to explicitly compute the ensemble distribution. In this paper, we propose the Mixture-model-like Ensemble (ME). By reinterpreting the ensemble as a mixture model, ME stochastically selects a single model at each step to generate the next token, thereby avoiding the need to explicitly compute the full ensemble distribution. ME is mathematically equivalent to sampling from the ensemble distribution, but requires invoking only one model, making it 1.78x-2.68x faster than conventional ensembling. Furthermore, this perspective connects LLM ensembling and token-level routing methods, suggesting that LLM ensembling is a special case of routing methods. Our findings open new avenues for efficient LLM ensembling and motivate further exploration of token-level routing strategies for LLMs. Our code is available at https://github.com/Kamichanw/Mixture-model-like-Ensemble.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。