TL;DR
Flide is a high-performance inference engine specifically designed for LLM "decision models" that need to make multiple categorical choices based on a shared, often lengthy, context. By decoupling the logical tree structure of these requests from their physical execution on the GPU through a technique called ForkAttention, Flide achieves up to 9.5x speedups over state-of-the-art engines like vLLM and SGLang while maintaining bitwise mathematical exactness.
What Problem Does This Paper Address?
Modern LLM agent systems rely on "decision models" (like Jev) to perform rapid, reliable categorical reasoning—essentially "System One" thinking for AI. These models typically process a long shared state (e.g., a conversation history or an agent trajectory) and then answer several questions about it.
Existing inference engines, however, are optimized for linear text generation. This creates a fundamental mismatch:
- Redundancy: Engines like vLLM often recompute or reload the shared prefix for every individual question branch, leading to massive overhead.
- Inexactness: Techniques like "multi-item scoring" (concatenating questions with delimiters) corrupt the model's internal hidden states. This shifts output probabilities and can "flip" critical decisions compared to how the model would behave if each question were asked in isolation.
- Hybrid Architecture Challenges: New hybrid models (combining Attention with recurrent layers like Gated DeltaNet) are particularly difficult to "fork" because recurrent states fold all previous tokens into a single representation.
Methods
Flide introduces a "Flat-Graph" inference approach that treats a round of requests as a single flattened token stream while maintaining their logical tree structure in GPU-resident metadata.
Key Innovations:
- ForkAttention: This is the core mechanism. It allows question branches to "fork" from a shared trunk. In standard attention layers, it uses specialized masking to ensure query tokens see only the shared trunk and their own branch. In recurrent layers (like Gated DeltaNet), Flide runs two calls: one to compute the shared state $S_P$ once, and a second where all question branches resume from that exact $S_P$ simultaneously without copying data.
- Flat-Graph Execution: To avoid the CPU overhead of launching thousands of small kernels, Flide uses a compact set of pre-captured CUDA graphs. These graphs are "shape-agnostic" because the actual request boundaries and dependencies are supplied via GPU-resident metadata buffers.
- Incremental State Forking: For agents whose history grows over time, Flide can checkpoint the state at specific positions. Subsequent steps only need to compute the new "tail" of the history before forking new questions, as illustrated in the figure below.
Datasets
The authors evaluated Flide across six workloads derived from four public datasets:
- RACE: Middle-school reading comprehension.
- QuALITY: Long-document multiple-choice QA (articles up to 3,600 tokens).
- MultiRC: Multi-sentence reasoning, converted into yes/no questions.
- Decision Index: A benchmark for categorical choices in agentic workflows.
- SWE-agent trajectories: Real-world software engineering agent histories to test incremental state growth.
- GQA: Visual reasoning tasks to test multimodal decision-making.
Key Insights and Ideas
- Logical vs. Physical Decoupling: The "aha moment" is realizing that the bottleneck isn't just raw compute, but the rigid coupling of a request's logical structure to its physical layout in memory. By flattening the stream but forking the attention/recurrent state, you get the best of both worlds: batch throughput and logical isolation.
- Exactness is a Requirement, Not a Luxury: In decision-sensitive tasks (e.g., routing a request or taking an agent action), even a 1% shift in probability can change the outcome. Flide proves that you don't have to sacrifice speed for mathematical fidelity.
- Metadata-Driven Kernels: Moving the "intelligence" of the request structure into GPU metadata allows for static execution graphs that can handle highly dynamic workloads, drastically reducing latency for short, critical decision tasks.
Key Results
- Speed & Throughput: Flide is up to 9.5x faster than vLLM and SGLang on hybrid models. Its advantage grows as the number of questions per shared state increases.
- Fidelity: Flide stays closest to a float32 reference. While SGLang's multi-item scoring can flip up to 29% of decisions due to state corruption from delimiters, Flide's error rate remains negligible (max 2.3%), matching the behavior of isolated prompts.
- Agent Efficiency: In growing agent trajectories, Flide's marginal latency cost is only about 1ms per 1,000 tokens of history, whereas other engines suffer an order of magnitude higher penalty.
Limitations and Future Work
- System One Focus: The engine is specifically optimized for "System One" tasks (categorical choices, single-token outputs). Its performance characteristics for long-form text generation (System Two) are not the primary focus of this study.
- Architecture Specifics: While it supports standard attention and Gated DeltaNet, extending this to every emerging recurrent architecture may require custom kernel adjustments.
- Future Directions: The authors suggest that unifying high-throughput parallel execution with strict mathematical exactness establishes a new foundation for latency-critical AI agents. Future work could involve broader integration into general-purpose LLM serving stacks.
Summary updated