arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.08056cs.LGcs.AIcs.MA
收藏

Cognify:通过分层自动调优增强生成式AI工作流

Cognify: Supercharging Gen-AI Workflows With Hierarchical Autotuning

UC San Diego(加州大学圣地亚哥分校);GenseeAI, Inc.(GenseeAI公司)

Zijian He, Reyna Abhyankar, Vikranth Srivatsa, Yiying Zhang

AI总结:

针对生成式AI工作流手动临时调优耗时易错的问题,提出分层自动调优框架Cognify及自适应分层搜索算法AdaSeek,通过分层分配并动态调整搜索预算优化工作流,在六种工作流上实现生成质量提升2.8倍、成本降低10倍、延迟减少2.7倍。

摘要:

如今涉及多个机器学习模型调用、工具/API调用、数据检索或通用代码执行的生成式AI工作流,通常以临时手动方式调优,既耗时又容易出错。本文提出一种自动调优生成式AI工作流的系统方法。核心洞见是生成式AI工作流可从结构、算子和提示词变更中获益,但生成式AI工作流的独特属性需要新的优化技术。我们提出AdaSeek,一种自适应分层搜索算法,用于生成式AI工作流的自动调优。AdaSeek基于用户指定的总搜索预算,将工作流调优方法组织到不同层,并根据每层的复杂度分配预算。在分层搜索过程中,AdaSeek基于工作流级评估结果,将搜索预算从较无用的调优配置重新分配到更有前景的配置。我们在名为Cognify的工作流自动调优框架中实现AdaSeek,并使用RAG问答、文本转SQL转换等六种工作流进行评估。总体而言,Cognify将这些工作流的生成质量提升高达2.8倍,执行成本降低高达10倍,端到端延迟减少2.7倍。

英文摘要:

Today's gen-AI workflows that involve multiple ML model calls, tool/API calls, data retrieval, or generic code execution are often tuned manually in an ad-hoc way that is both time-consuming and error-prone. In this paper, we propose a systematic approach for automatically tuning gen-AI workflows. Our key insight is that gen-AI workflows can benefit from structure, operator, and prompt changes, but unique properties of gen-AI workflows require new optimization techniques. We propose AdaSeek, an adaptive hierarchical search algorithm for autotuning gen-AI workflows. AdaSeek organizes workflow tuning methods into different layers based on the user-specified total search budget and distributes the budget across different layers based on the complexity of each layer. During its hierarchical search, AdaSeek redistributes the search budget from less useful to more promising tuning configurations based on workflow-level evaluation results. We implement AdaSeek in a workflow autotuning framework called Cognify and evaluate Cognify using six types of workflows such as RAG-based QA and text-to-SQL transformation. Overall, Cognify improves these workflows' generation quality by up to 2.8x, reduces execution monetary cost by up to 10x, and reduces end-to-end latency by 2.7x.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑