A Declarative System for Optimizing AI Workloads

A Declarative System for Optimizing AI Workloads

29 May 2024 | Chunwei Liu, Matthew Russo, Michael Cafarella, Lei Cao, Peter Baille Chen, Zui Chen, Michael Franklin, Tim Kraska, Samuel Madden, Gerardo Vitagliano
PALIMPZEST is a declarative system that enables users to process AI-powered analytical queries by defining them in a declarative language. The system optimizes query execution by balancing runtime, financial cost, and output data quality. It supports a wide range of AI workloads, including Legal Discovery, Real Estate Search, and Medical Schema Matching. PALIMPZEST automatically selects the best execution plan based on user preferences, such as speed, cost, or data quality. It can generate plans that are significantly faster and cheaper than baseline methods, with high-quality results. With parallelism enabled, PALIMPZEST can achieve up to 90.3x speedup at 9.1x lower cost compared to a single-threaded GPT-4 baseline, while maintaining an F1-score close to the baseline. The system is designed to be extensible, allowing new optimizations to be added in the future. PALIMPZEST uses a relational model and a convert operator to transform data between schemas, enabling AI tasks to be expressed in a relational and optimizable style. It supports a variety of logical and physical optimizations, including filter reordering, convert reordering, model selection, code synthesis, multi-data prompt marshaling, input token reduction, output token reduction, and model cascades. These optimizations help to reduce runtime, cost, and improve data quality. The system is designed to be used as a library in a host language, with the current implementation in Python. PALIMPZEST aims to enable AI system engineers to focus on programming the system logic while letting the optimizer select which models and physical optimizations are needed to meet the user's preferences for cost, runtime, or data quality. The system is evaluated on various workloads, showing that even a simple prototype offers a range of appealing plans with significant improvements in speed, cost, and data quality.PALIMPZEST is a declarative system that enables users to process AI-powered analytical queries by defining them in a declarative language. The system optimizes query execution by balancing runtime, financial cost, and output data quality. It supports a wide range of AI workloads, including Legal Discovery, Real Estate Search, and Medical Schema Matching. PALIMPZEST automatically selects the best execution plan based on user preferences, such as speed, cost, or data quality. It can generate plans that are significantly faster and cheaper than baseline methods, with high-quality results. With parallelism enabled, PALIMPZEST can achieve up to 90.3x speedup at 9.1x lower cost compared to a single-threaded GPT-4 baseline, while maintaining an F1-score close to the baseline. The system is designed to be extensible, allowing new optimizations to be added in the future. PALIMPZEST uses a relational model and a convert operator to transform data between schemas, enabling AI tasks to be expressed in a relational and optimizable style. It supports a variety of logical and physical optimizations, including filter reordering, convert reordering, model selection, code synthesis, multi-data prompt marshaling, input token reduction, output token reduction, and model cascades. These optimizations help to reduce runtime, cost, and improve data quality. The system is designed to be used as a library in a host language, with the current implementation in Python. PALIMPZEST aims to enable AI system engineers to focus on programming the system logic while letting the optimizer select which models and physical optimizations are needed to meet the user's preferences for cost, runtime, or data quality. The system is evaluated on various workloads, showing that even a simple prototype offers a range of appealing plans with significant improvements in speed, cost, and data quality.
Reach us at info@study.space