TL;DR
Dooly is a configuration-agnostic, redundancy-aware profiling framework that radically accelerates LLM inference simulation. By using taint propagation to identify identical mathematical operations across different models and automatically isolating complex attention kernels, Dooly cuts profiling overhead by 56.4% while maintaining high simulation accuracy (within 5% for TTFT and 8% for TPOT).
What Problem Does This Paper Address?
Deploying Large Language Models (LLMs) at scale requires navigating a massive configuration space: different hardware (A100 vs. H100), serving engines (vLLM, SGLang), attention backends (FlashAttention, FlashInfer), and model architectures. Because no single configuration performs best across all workloads—a phenomenon known as "winner inversion"—pre-deployment evaluation is critical.
Profile-based simulators are the gold standard for predicting performance without deploying live systems. However, current simulators suffer from two major flaws:
- Static Dependencies: They hardcode the operation set for specific configurations. Any software update or new model architecture requires tedious manual instrumentation.
- High Profiling Overhead: They treat every model configuration as entirely unique, re-profiling identical underlying computations from scratch. Profiling just four models can take nearly 28 hours on an A100 GPU, scaling linearly with every new model added.
Methods
Dooly introduces two key techniques to achieve configuration-agnostic, automated profiling:
- Taint Propagation: Dooly runs a single inference pass using a dummy prompt. It "taints" (labels) input dimensions at the serving engine's entry points to track whether a tensor's size is derived from the fixed model configuration (e.g., hidden dimension size) or the dynamic request workload (e.g., batch size, token count). This allows Dooly to generate a unique mathematical "signature" for every operation. If two different models use the same head size and layer structure, Dooly recognizes the duplicate signature and skips re-profiling it.
- Hierarchical Context Resolution: Stateful operations like attention kernels depend on complex runtime metadata and KV-cache memory layouts, making them impossible to run in isolation. Instead of manual hacking, Dooly reuses the serving engine's own initialization code to reconstruct the execution context. If an individual operation still cannot run standalone, Dooly automatically steps up the PyTorch module hierarchy to profile it at the finest possible runnable granularity.
The framework consists of DoolyProf, which builds the deduplicated latency database, and DoolySim, an end-to-end simulator that integrates directly with the serving engine's scheduler.
Datasets
The authors evaluated Dooly using real-world request traces from the ShareGPT4 dataset, alongside synthetic prefill-heavy and decode-heavy workloads to stress-test the system across diverse token distributions.
Key Insights and Ideas
- Structural Redundancy: Many distinct LLMs share identical sub-components (e.g., the same Grouped-Query Attention geometry). By identifying operations based on their invariant model-derived dimensions rather than the model's name, a profiler can safely share latency data across an entire family of models.
- Automation via Engine Reuse: Rather than fighting against the rapid evolution of serving software by manually writing simulator templates, frameworks should treat the serving engine as a partner—borrowing its scheduling and initialization logic to automate trace extraction.
Key Results
- Massive Overhead Reduction: Across a corpus of 12 models evaluated with three attention backends, Dooly reduced total profiling GPU-hours by 56.4% compared to traditional brute-force profiling. Once a few base architectures were profiled, adding new models required negligible extra time.
- High Simulation Fidelity: DoolySim predicted end-to-end serving latency within a Mean Absolute Percentage Error (MAPE) of 5% for Time to First Token (TTFT) and 8% for Time Per Output Token (TPOT).
- Scheduling Accuracy: Dooly accurately emulated vLLM’s batch scheduling decisions with an error rate below 0.5%, successfully capturing the exact workload inversion points across different hardware platforms.
Limitations and Future Work
- Dispatcher Bypassing: Custom kernels implemented in Triton that entirely bypass PyTorch's dispatcher can occasionally lack kernel-level taints, forcing Dooly to fall back to coarser module-level tracking.
- Modality Constraints: The current implementation focuses on text prompts. While the taint propagation concept is modality-agnostic, expanding Dooly to vision or audio models requires mapping new request entry points within the serving engines.
- MoE Routing: For Mixture-of-Experts (MoE) models, Dooly profiles kernels under random expert routing to capture average latency, leaving data-dependent routing behaviors as a challenge for the downstream simulator to resolve.
Summary updated