Towards Resource-Efficient Compound AI Systems

Gohar Irfan Chaudhry, Esha Choukse, Íñigo Goiri, Rodrigo Fonseca, Adam Belay, Ricardo BianchiniarXiv 2025

TL;DR

Current Compound AI systems suffer from massive resource inefficiencies due to the rigid, hard-coded coupling of application logic to specific models and hardware. This paper introduces Murakkab, a prototype system that uses a declarative programming model and an adaptive runtime to dynamically optimize model selection and hardware allocation. By decoupling "what to do" from "how to execute it," Murakkab achieves up to a 3.4× speedup and 4.5× higher energy efficiency without sacrificing output quality.

What Problem Does This Paper Address?

As AI tasks grow more complex, developers are increasingly building "Compound AI Systems"—applications that combine multiple LLMs, smaller specialized machine learning models, vector databases, and external tools (using frameworks like LangChain or DSPy).

However, today's implementations are highly inefficient. Workflows are typically written imperatively, meaning developers explicitly hardcode which model runs on which hardware configuration via specific API keys. This rigid cross-layer coupling creates a massive disconnect between the workflow orchestrator and the underlying cloud infrastructure. The system cannot dynamically adapt to changing workloads or hardware availability, leading to severe resource underutilization, stranded hardware, and an artificial, zero-sum trade-off between execution cost and output quality.

Figure 1: Today programmers use frameworks to call agents from different providers hosted on multiple cloud platforms. The rigid coupling between all layers of the system results in inefficiencies.

Methods

The authors propose a reimagined architecture called Murakkab that introduces flexibility through two core components:

  1. Declarative Workflow Programming: Instead of writing step-by-step execution code, developers provide a high-level natural language description of the job, its inputs, and high-level constraints (e.g., MIN_COST).
  2. Adaptive Runtime Scheduling & Cluster Management: At runtime, Murakkab uses an LLM to decompose the high-level job description into a Directed Acyclic Graph (DAG) of actionable tasks. It maintains a library of available models and tools, each mapped to pre-computed "efficiency vs. quality" profiles.

Crucially, Murakkab bridges the gap between the workflow orchestrator and the cluster manager. By exposing the workflow's future task graph (DAG) to the cluster manager, the system can predictively scale resources, exploit intra-task parallelism, and dynamically shift workloads between CPUs and various GPU tiers based on real-time availability and user constraints.

Figure 2: We envision fungible workflows with high-level descrip- tions, managed jointly by the Workflow Orchestrator and Cluster Manager. This allows higher resource multiplexing between inde- pendent workflows to improve efficiency.

Datasets

The paper evaluates its prototype using a Video Understanding workflow derived from the OmAgent framework. The workflow processes video files (such as "cats.mov" and "formula_1.mov") and requires a pipeline of diverse tasks: frame extraction via OpenCV, object detection via CLIP, speech-to-text transcription via Whisper, and text/embedding summarization via NVLM.

Because this is an systems-infrastructure paper, no new machine learning datasets or training benchmarks were introduced.

Key Insights and Ideas

  • Application Fungibility: The core "aha" moment is treating AI workflows as fungible. A task like "Speech-to-Text" doesn't need a hardcoded model or hardware target; it can be satisfied by multiple interchangeable models (e.g., Whisper vs. FastConformer) or hardware targets (CPU vs. GPU) depending on real-time cluster conditions.
  • Workflow-Aware Cluster Management: Traditional cluster managers (like Kubernetes) view AI workloads as black boxes. By exposing the workflow's DAG, the cluster manager gains visibility into upcoming tasks, allowing it to proactively reallocate resources (e.g., reclaiming idle GPU resources from a transcription tool to feed an LLM) before bottlenecks occur.
  • The Cost-Efficiency Sweet Spot: Hardcoding everything to the fastest, most expensive GPU isn't always optimal. For instance, running speech-to-text entirely on CPUs can drastically lower energy consumption while still meeting latency requirements if downstream LLM steps are the true bottleneck.

Key Results

The authors evaluated Murakkab on a cluster of two Azure VMs, each equipped with 96 AMD vCPUs and 8 NVIDIA A100 GPUs, comparing it against a sequential baseline execution.

  • Speedup: Murakkab achieved a ~3.4× speedup, reducing the video understanding workflow completion time from 283 seconds down to 77–83 seconds. It achieved this by automatically parallelizing transcription across multiple scenes and parallelizing intra-scene frame summarization.
  • Energy Efficiency: When given a MIN_COST constraint, Murakkab automatically routed the Speech-to-Text component to run entirely on 64 CPU cores instead of a GPU. This resulted in a ~4.5× increase in energy efficiency (consuming 34 Wh compared to the baseline's 155 Wh) with zero degradation in final output accuracy.
Execution traces demonstrating how Murakkab adjusts configurations to deliver faster execution and better resource utilization over the baseline.
Quantitative breakdown of energy consumption and execution times across different hardware configurations.

Limitations and Future Work

  • Exploding Search Space: As the library of models, tools, and hardware SKUs expands, finding the mathematically optimal execution path becomes a combinatorial nightmare. The authors are currently designing greedy search strategies to prune this space.
  • Cascading Quality Degradation: In complex pipelines, a slight drop in an early stage's quality (e.g., a faster but less accurate object detector) can cause catastrophic errors or hallucinations in downstream LLMs. Tracking and controlling these end-to-end quality cascades remains an open challenge.
  • Proprietary API Blindspots: When workflows rely on closed-source external APIs (like OpenAI's GPT-4o), Murakkab loses visibility into underlying resource usage and cannot perform cluster-level optimizations, requiring further research into hybrid local/remote scheduling.

Summary updated

BibTeX
@misc{chaudhry2025towards,
  author = {Gohar Irfan Chaudhry and Esha Choukse and Íñigo Goiri and Rodrigo Fonseca and Adam Belay and Ricardo Bianchini},
  title = {{Towards Resource-Efficient Compound AI Systems}},
  year = {2025},
  eprint = {2501.16634},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.16634},
}
Figure