面向边缘推理的分布式智能体混合(Mixture-of-Agents)架构:基于大语言模型
Distributed Mixture-of-Agents for Edge Inference with Large Language Models
AI总结:
本文研究边缘设备上基于大语言模型的分布式智能体混合架构,通过去中心化 gossip 协作推理,并从理论和实验上分析了设备队列的稳定性条件及不同配置对回答质量的影响。
摘要:
智能体混合(Mixture-of-Agents,MoA)最近被提出作为一种增强大语言模型(LLMs)性能的方法,使多个独立的 LLM 能够协同工作以进行协作推理。与依赖单个 LLM 相比,这种协作方法能够对用户提示产生更优的响应。在本文中,我们考虑在分布式环境下采用这种 MoA 架构,其中 LLM 运行在各自的边缘设备上,每个设备唯一地关联一个用户,并配备自身的分布式计算能力。这些设备使用去中心化的 gossip 算法交换信息,使不同设备节点能够在没有集中式服务器监督的情况下进行通信。在所考虑的设置中,不同用户拥有各自的 LLM 模型来处理用户提示。此外,设备之间通过 gossip 传播各自的用户特定提示或增强提示,以针对某些查询生成更精细的答案。当用户提示对应的 LLM 忙碌时,这些提示会临时存储在设备队列中。鉴于边缘设备的内存限制,确保系统中平均队列长度保持有界至关重要。在本文中,我们通过在合理假设下从理论上计算设备队列的排队稳定性条件来解决这一问题,并通过实验进行了验证。此外,我们利用开源 LLM 实现分布式 MoA,并通过实验证明,在 AlpacaEval 2.0 基准上评估时,某些 MoA 配置相比其他配置能够产生更高质量的响应。实现代码可在以下地址获取:https://github.com/purbeshmitra/distributed_moa。
英文摘要:
Mixture-of-Agents (MoA) has recently been proposed as a method to enhance performance of large language models (LLMs), enabling multiple individual LLMs to work together for collaborative inference. This collaborative approach results in improved responses to user prompts compared to relying on a single LLM. In this paper, we consider such an MoA architecture in a distributed setting, where LLMs operate on individual edge devices, each uniquely associated with a user and equipped with its own distributed computing power. These devices exchange information using decentralized gossip algorithms, allowing different device nodes to talk without the supervision of a centralized server. In the considered setup, different users have their own LLM models to address user prompts. Additionally, the devices gossip either their own user-specific prompts or augmented prompts to generate more refined answers to certain queries. User prompts are temporarily stored in the device queues when their corresponding LLMs are busy. Given the memory limitations of edge devices, it is crucial to ensure that the average queue sizes in the system remain bounded. In this paper, we address this by theoretically calculating the queuing stability conditions for the device queues under reasonable assumptions, which we validate experimentally as well. Further, we demonstrate through experiments, leveraging open-source LLMs for the implementation of distributed MoA, that certain MoA configurations produce higher-quality responses compared to others, as evaluated on AlpacaEval 2.0 benchmark. The implementation is available at: https://github.com/purbeshmitra/distributed_moa.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。