Skip to main content
QUICK REVIEW

[论文解读] A Declarative System for Optimizing AI Workloads

Chunwei Liu, Matthew Russo|arXiv (Cornell University)|May 23, 2024
Machine Learning and Data ClassificationComputer Science被引用 3
一句话总结

Palimpzest 是一个声明式系统,通过为语义分析应用(SAPPs)自动生成成本效益高、质量优良的执行计划,自动优化 AI 工作负载。它在模型、提示词、硬件和数据处理之间综合进行逻辑与物理查询优化,相较于单线程 GPT-4 基线,实现了最高达 90.3 倍的加速和 9.1 倍的成本降低,同时保持了基线 83.5% 的 F1 分数。

ABSTRACT

A long-standing goal of data management systems has been to build systems which can compute quantitative insights over large corpora of unstructured data in a cost-effective manner. Until recently, it was difficult and expensive to extract facts from company documents, data from scientific papers, or metrics from image and video corpora. Today's models can accomplish these tasks with high accuracy. However, a programmer who wants to answer a substantive AI-powered query must orchestrate large numbers of models, prompts, and data operations. For even a single query, the programmer has to make a vast number of decisions such as the choice of model, the right inference method, the most cost-effective inference hardware, the ideal prompt design, and so on. The optimal set of decisions can change as the query changes and as the rapidly-evolving technical landscape shifts. In this paper we present Palimpzest, a system that enables anyone to process AI-powered analytical queries simply by defining them in a declarative language. The system uses its cost optimization framework to implement the query plan with the best trade-offs between runtime, financial cost, and output data quality. We describe the workload of AI-powered analytics tasks, the optimization methods that Palimpzest uses, and the prototype system itself. We evaluate Palimpzest on tasks in Legal Discovery, Real Estate Search, and Medical Schema Matching. We show that even our simple prototype offers a range of appealing plans, including one that is 3.3x faster and 2.9x cheaper than the baseline method, while also offering better data quality. With parallelism enabled, Palimpzest can produce plans with up to a 90.3x speedup at 9.1x lower cost relative to a single-threaded GPT-4 baseline, while obtaining an F1-score within 83.5% of the baseline. These require no additional work by the user.

研究动机与目标

  • 解决日益复杂的 AI 驱动分析查询所带来的挑战,这些查询需要编排多个模型、提示词和数据操作。
  • 通过声明式语言抽象低层级的 AI 优化决策,减轻开发者的负担。
  • 实现涉及非结构化数据和 AI 推理的语义分析应用(SAPPs)的高效、低成本且高质量执行。
  • 在模型选择、提示词设计、硬件和并行性之间优化运行时间、财务成本和输出质量之间的权衡。
  • 提供一个通用系统,支持超越信息提取等狭窄用例的多样化 AI 工作负载。

提出的方法

  • 该系统使用声明式语言表达 AI 工作负载,使用户能够指定高层逻辑,而无需关注底层实现细节。
  • 它执行联合的逻辑与物理优化,探索模型、提示词、硬件和并行策略的组合。
  • 优化器利用样本执行数据,在计划生成过程中估算成本、延迟和质量之间的权衡。
  • 它支持模型选择、提示词工程、标记减少和并行执行作为优化维度。
  • 该系统在统一的执行树中集成传统关系运算符与 LLM 驱动的操作。
  • 它采用基于成本的优化,并结合启发式方法剪枝低效计划,优先选择高质量、低成本的替代方案。

实验结果

研究问题

  • RQ1如何通过声明式系统自动为涉及多个模型和数据操作的复杂 AI 工作负载生成最优执行计划?
  • RQ2在 AI 驱动的分析查询中,成本、运行时间和输出质量之间的关键权衡是什么?
  • RQ3与简单基线相比,自动化优化是否能在真实世界的 SAPP 中实现显著的性能和成本改进?
  • RQ4该系统如何应对 AI 模型性能和成本随技术发展而动态变化的特性?
  • RQ5在效率和质量方面,声明式优化在多大程度上能超越手工调优的单模型基线?

主要发现

  • 在法律发现任务中,Palimpzest 相较于基线方法实现了 3.3 倍的加速和 2.9 倍的成本降低,同时提升了数据质量。
  • 启用并行处理后,Palimpzest 相较于单线程 GPT-4 基线实现了最高达 90.3 倍的加速和 9.1 倍的成本降低。
  • 在实际房地产搜索任务中,该系统保持了基线 83.5% 的 F1 分数,表明在优化过程中仍具备出色的质量保留能力。
  • 原型展示了多种具有吸引力的优化计划,表明自动优化可在无需用户干预的情况下实现显著的效率提升。
  • 该系统的优化器有效利用样本执行数据在成本、性能和质量之间进行权衡,实现了数据驱动的计划选择。
  • 即使在简单的原型形态下,Palimpzest 在多个 SAPP 工作负载中仍优于手工调优的基线,验证了其优化框架的有效性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。