用多个专家模型+动态路由,让大模型更省资源、更高效。
Composition of Experts: A Modular Compound AI System Leveraging Large Language Models
- 通过路由器按输入类别动态选最合适的专家模型
- 在Arena-Hard上仅用310亿活跃参数达59.4分
- 适合需要低成本部署复杂AI系统的开发者
大型语言模型(LLMs)虽进展显著,但其整体结构在可扩展性、成本和定制化方面存在挑战。本文提出模块化复合AI系统Composition of Experts(CoE),利用多个专家LLM并由路由器动态选择最适合的专家以提升资源利用率与性能。我们定义了训练CoE的一般问题,并讨论其内在复杂性。提出两步路由策略:先分类输入,再映射到对应专家。实证表明,CoE在降低计算开销的同时实现更优性能。针对多专家模型带来的独特服务需求,我们基于SambaNova SN40L RDUs三层次内存架构实现了高效部署。使用Qwen/Qwen2-7B-Instruct、google/gemma-2-9b-it、google/gemma-2-27b-it、meta-llama/Llama-3.1-70B-Instruct和Qwen/Qwen2-72B-Instruct等开源权重模型,CoE在Arena-Hard上取得59.4分,平均活跃参数仅310亿;在MT-Bench上得分9.06,平均活跃参数540亿。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have achieved remarkable advancements, but their monolithic nature presents challenges in terms of scalability, cost, and customization. This paper introduces the Composition of Experts (CoE), a modular compound AI system leveraging multiple expert LLMs. CoE leverages a router to dynamically select the most appropriate expert for a given input, enabling efficient utilization of resources and improved performance. We formulate the general problem of training a CoE and discuss inherent complexities associated with it. We propose a two-step routing approach to address these complexities that first uses a router to classify the input into distinct categories followed by a category-to-expert mapping to obtain desired experts. CoE offers a flexible and cost-effective solution to build compound AI systems. Our empirical evaluation demonstrates the effectiveness of CoE in achieving superior performance with reduced computational overhead. Given that CoE comprises of many expert LLMs it has unique system requirements for cost-effective serving. We present an efficient implementation of CoE leveraging SambaNova SN40L RDUs unique three-tiered memory architecture. CoEs obtained using open weight LLMs Qwen/Qwen2-7B-Instruct, google/gemma-2-9b-it, google/gemma-2-27b-it, meta-llama/Llama-3.1-70B-Instruct and Qwen/Qwen2-72B-Instruct achieve a score of $59.4$ with merely $31$ billion average active parameters on Arena-Hard and a score of $9.06$ with $54$ billion average active parameters on MT-Bench.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。