GraphFlow: 一种基于图的流程管理用于高效的LLM代理服务
GraphFlow: A Graph-Based Workflow Management for Efficient LLM-Agent Serving
AI总结:
本文提出了一种基于图的流程管理方法GraphFlow,通过统一图结构wGraph动态生成任务特定流程,提高LLM代理服务的效率和性能,实验表明其在多个基准数据集上表现优异,性能提升显著且内存占用减少。
摘要:
基于大型语言模型(LLM)的代理在有结构化指令引导下表现出强大的推理和执行能力,通常称为工作流。然而,现有的工作流辅助代理服务系统通常依赖于预定义模板和浅层匹配机制,限制了它们捕捉深层语义关系和泛化到以前未见过的任务的能力。为了解决这些限制,我们提出了一种新的工作流管理范式,通过统一图结构表示工作流,称为wGraph,其中每个节点对应一个原子操作。wGraph作为共享的基质,从其中动态实例化任务特定的工作流。基于wGraph的基本原理,我们引入了GraphFlow系统,通过两个关键设计高效地将工作流整合到代理服务中。首先,自适应工作流生成根据任务语义和约束要求从wGraph动态构建工作流。其次,工作流状态管理利用wGraph结构高效管理键值(KV)缓存,减少代理服务中的冗余计算。在五个基准数据集上的广泛实验表明,GraphFlow在多个基准数据集上表现优异,平均性能提升约4.95个百分点,同时实现内存占用约4倍的减少。
英文摘要:
Large Language Model (LLM)-based agents demonstrate strong reasoning and execution capabilities on complex tasks when guided by structured instructions, commonly referred to as workflows. However, existing workflow-assisted agent serving systems typically rely on predefined templates and shallow matching mechanisms, which limit their ability to capture deep semantic relationships and generalize to previously unseen tasks. To address these limitations, we propose a new workflow management paradigm that represents workflows using a unified graph, termed wGraph, where each node corresponds to an atomic operation. wGraph serves as a shared substrate from which task-specific workflows are dynamically instantiated. Building on wGraph primitives, we introduce GraphFlow, a system that efficiently integrates workflows into agent serving through two key designs. First, adaptive workflow generation dynamically constructs workflows from wGraph based on task semantics and constraint requirements. Second, workflow state management exploits wGraph structure to efficiently manage Key-Value (KV) caches, reducing redundant computation during agent serving. Extensive experiments across five benchmark datasets show that GraphFlow consistently outperforms state-of-the-art methods, yielding an average performance improvement of approximately 4.95 percentage points, while achieving an approximately 4$\times$ reduction in memory footprint.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。