Introduction
Compound LLM applications—systems that chain together multiple model calls, external APIs, and tools—are becoming the standard for complex AI tasks like multi-step coding agents or iterative retrieval-augmented generation (RAG). However, these applications introduce a "double uncertainty" that cripples traditional cluster schedulers. LLMSched is a novel framework designed to navigate this uncertainty by treating scheduling as an information-gathering problem, significantly reducing job completion times.
The Problem: Double Uncertainty
Traditional schedulers, such as those used in Spark or database clusters, rely on two key assumptions: the job structure (Directed Acyclic Graph or DAG) is known, and task durations are predictable. Compound LLM applications break both:
- Temporal Uncertainty: LLM generation is token-dependent, making task durations highly variable and difficult to estimate accurately.
- Structural Uncertainty: The workflow's path often depends on intermediate LLM outputs, meaning the full DAG is only revealed at runtime.
When standard "Shortest Job First" (SJF) logic is applied to these workloads, the scheduler makes suboptimal decisions based on inaccurate estimates, leading to GPU underutilization and long queues.
LLMSched: Information-Centric Scheduling
LLMSched addresses these challenges by prioritizing "information gain." Its architecture is built on four pillars:
- Dynamic Stages: Placeholders in the job graph represent yet-to-be-generated tasks, allowing the scheduler to reason about incomplete DAGs.
- Bayesian Network (BN) Profiler: Instead of treating tasks as independent, LLMSched uses a BN to learn correlations between stages. For instance, a complex planning stage often correlates with longer subsequent execution stages.
- Entropy-based Quantification: The system calculates "Uncertainty Reduction" for each stage. It identifies tasks that, if executed early, provide the most information about the remaining job structure and duration.
- $ε$-Greedy Scheduler: The scheduler balances exploitation (running estimated short jobs) with exploration (running high-uncertainty tasks to gain better data).
Evaluation and Results
The researchers evaluated LLMSched across six diverse applications, including task automation (TaskBench) and code generation (MBPP). Testing involved both a large-scale simulator and a physical testbed with NVIDIA H800 GPUs.
- Significant Performance Gains: LLMSched reduced average Job Completion Time (JCT) by 14% to 79% in simulations and 26% to 66% on physical hardware compared to state-of-the-art schedulers like Decima and Argus.
- Efficiency: The scheduling logic runs in under 3ms, ensuring negligible overhead even in high-throughput environments.
- Scalability: The benefits of LLMSched become more pronounced as system load increases, outperforming traditional methods more significantly in crowded clusters.
Conclusion
LLMSched demonstrates that in the era of compound LLM applications, information is a critical resource. By explicitly modeling and exploring uncertainty through Bayesian networks and entropy-based logic, LLMSched provides a robust path forward for efficient AI agent orchestration. Future work will focus on online retraining for shifting workloads and incorporating fairness constraints.
Summary updated