TL;DR
FlashRT is an "agent harness" that automates the complex task of deploying real-time multimodal AI pipelines across multiple GPUs. By guiding AI coding agents through a structured "chain-of-program" workflow, it transforms simple, single-GPU reference code into highly optimized deployments that achieve up to 70x latency reduction and significantly outperform expert-hand-crafted systems.
What Problem Does This Paper Address?
Modern AI applications, like interactive voice agents or real-time video generators, aren't just single models; they are complex pipelines of heterogeneous components (e.g., ASR, LLM, TTS, and Diffusion models). Optimizing these pipelines for real-world use is a nightmare for engineers. You have to decide which models share GPUs (co-location), which should be separated (disaggregation), how to stream data between them, and how to parallelize internal model steps.
Existing tools fall short: auto-parallelism compilers usually focus on single models or specific training workloads, while manual system engineering is slow and doesn't scale as new multimodal models emerge weekly. FlashRT aims to bridge this gap by using the reasoning power of AI agents to handle the "systems heavy lifting" automatically.
Methods
The authors found that simply asking an LLM to "optimize this code" fails because agents miss subtle parallelization opportunities and stop after finding easy wins. To solve this, FlashRT introduces two key architectural components:
- Chain-of-Program Paradigm: Instead of a one-shot translation, the agent follows a multi-pass process. It first converts the user's reference code into a Hierarchical Graph Intermediate Representation (IR). This IR explicitly maps out data dependencies and "persistent state" (like KV caches). By forcing the agent to annotate which parts of the pipeline share state, the system makes parallelization opportunities (like pipeline parallelism) obvious to the agent.
- Application-Grounded Validation Loop: The agent doesn't just write code; it enters a self-driven loop where it hypothesizes an optimization, implements it in an isolated environment, verifies that the output matches the original reference, and benchmarks the performance. It even builds its own test harness to simulate real user interactions.
Datasets and Applications
FlashRT was evaluated on five diverse, state-of-the-art multimodal applications:
- Face-to-Face Conversational Agent: A pipeline involving Qwen3-ASR, Qwen3-4B (LLM), Qwen3-TTS, and LiveAvatar (Video).
- Qwen3-Omni: A natively multimodal text-to-audio model.
- Video Background Editor: Combining Krea-Realtime (Video-to-Video) and SAM 3 (Segmentation).
- WorldPlay: An autoregressive video world model that responds to keyboard inputs.
- LongLive: A real-time video narrator.
The system was tested on both NVIDIA B200 and AMD MI355X GPUs to demonstrate hardware generalization.
Key Insights and Ideas
- State Awareness is Key: The "aha moment" for the agent comes from identifying independent states. For example, in video diffusion models, if the agent realizes that different denoising steps use independent KV caches, it can unlock pipeline parallelism that a human might take hours to verify.
- Agents as "System Architects": Unlike rule-based compilers, agents can reason about heterogeneous granularities. They might choose to co-locate small models to save on transfer costs while disaggregating heavy models to boost throughput.
- Scaling on Less Mature Platforms: FlashRT showed even greater relative gains on AMD hardware. This suggests that agent-driven optimization is a powerful tool for new hardware platforms that lack the decades of hand-tuned "expert" libraries available for CUDA.
Key Results
- Massive Latency Gains: On the conversational agent task, FlashRT achieved a ~70x reduction in time-to-first-output (TTFO) compared to a sequential baseline.
- Throughput Boosts: It delivered up to 2.8x throughput improvement on NVIDIA B200 and 3.6x on AMD MI355X.
- Outperforming Experts: For Qwen3-Omni inference on AMD hardware, FlashRT's agent-generated deployment reduced latency by 65% compared to the expert-written
vLLM-Omniimplementation. - Cost-Effective: Producing these optimized deployments cost between $75 and $167 in API usage—significantly cheaper than hiring a specialized systems engineer for several days.
Limitations and Future Work
While FlashRT is highly effective at the "macro" level of pipeline orchestration, it does not yet integrate agents for low-level kernel optimization (e.g., writing custom Triton or CUDA kernels). The authors identify this as a primary direction for future work. Additionally, the system currently relies on very high-capability models (like Claude 3.5 Opus or GPT-4o equivalents); how well it performs with smaller, open-source models remains an open question.
Summary updated