TL;DR
MIST is an event-driven, end-to-end simulation framework designed to evaluate multi-stage LLM inference pipelines across heterogeneous, multi-vendor hardware architectures. By accurately modeling complex workloads like RAG and KV cache retrieval, MIST achieves within 6% fidelity of real systems while enabling developers to discover hardware configurations that boost cost-efficiency by up to 49.3% tokens/$.
What Problem Does This Paper Address?
LLM inference is no longer just a simple matter of "prefill" and "decode." Modern AI applications introduce multi-stage pipelines involving Retrieval-Augmented Generation (RAG) and complex Key-Value (KV) cache reuse strategies. Each stage imposes vastly different compute, memory, and network demands.
Navigating this massive configuration space is incredibly challenging for two reasons:
- Prohibitive Costs: Exhaustively benchmarking configurations on real cloud hardware can easily exceed $40,000 for a single model deployment.
- Hardware Heterogeneity: The hardware landscape is diversifying rapidly beyond NVIDIA to include AMD GPUs, Google TPUs, and custom ASICs. Today’s software stacks lack unified support to evaluate "disaggregated" setups where different stages of a single request run on hardware from different vendors.
Methods
The authors introduce MIST (Multi-stage AI Inference Simulation Toolkit), an event-driven simulator that models the entire serving stack across three distinct layers:
- AI Workload Layer: Simulates diverse pipeline stages (RAG, KV retrieval, prefill, decode).
- System & Software Layer: Manages global routing, load balancing, client-level scheduling, batching strategies, and tiered KV cache management.
- Hardware Layer: Provides a logical abstraction of compute, memory, and network resources.
To bypass the need for a unified software stack across different hardware vendors, MIST utilizes pluggable accelerator models. It predicts hardware execution times using an ensemble of machine learning regressors trained on empirical data, achieving a 20–50× speedup over real execution. For network modeling between disaggregated clusters, MIST integrates with ASTRA-sim to capture contention-aware communication latencies.
Datasets
MIST was validated and evaluated using a mix of real-world and synthetic datasets:
- ShareGPT: Used for validating standard aggregated online workloads.
- Azure LLM Inference Trace 2023: Real production traces (Conversational and Code distributions) used to validate disaggregated serving and KV cache behavior.
- Narrative QA: Used as a representative workload for streaming chat conversations.
- GitHub Code Dataset: Used to simulate code generation requests with high prefix-KV cache reuse.
Key Insights and Ideas
- The Power of Cross-Vendor Pairings: Different hardware architectures excel at different stages. For instance, an ASIC designed for raw compute (like Etched Soho) can absorb the compute-heavy prefill requirements of "whale requests" (long context recomputations), while a Google TPUv6e efficiently handles the memory-bound decode stage due to its high memory bandwidth per dollar.
- Data Transfers Matter: Even if a stage like RAG or KV retrieval has a modest runtime, the secondary effects—such as transferring large context tensors across network fabrics—fundamentally alter Time-To-First-Token (TTFT) and memory bandwidth pressure.
- KV Storage Topology is Workload-Dependent: For private user contexts, platform-level shared caches or local LPDDR work best because request loads naturally balance out. However, for shared global KV caches (e.g., enterprise codebases), a rack-level SSD-based cache is optimal because it provides the capacity needed to handle frequent hotspots without causing system imbalance.
Key Results
- High Fidelity: MIST achieves end-to-end simulation accuracy within 6% of real deployed systems for disaggregated setups, and under 2% error for aggregated workloads.
- Cost Optimization: In a code generation case study, an optimized heterogeneous deployment (Etched Soho for prefill + TPUv6e for decode) discovered by MIST delivered 49.3% more tokens/$ at a 34.4% lower deployment cost compared to the best single-vendor alternative.
Limitations and Future Work
While MIST provides a highly modular architecture for hardware-software co-design, the paper notes that future extensions are needed to support adaptive model routing based on real-time request characteristics (like complexity or priority). Additionally, the authors plan to use MIST to design adaptive cross-stage schedulers and model emerging multi-agent LLM orchestration patterns.
Summary updated