Introduction
In the race to make Large Language Models (LLMs) faster, serving frameworks like vLLM and SGLang have become incredibly complex. They use sophisticated optimizations—such as paged attention, custom CUDA kernels, and fused layers—to squeeze out every bit of performance. However, this complexity creates a breeding ground for silent errors.
Unlike traditional bugs that cause a system to crash, silent errors allow the system to keep running while the quality of the output quietly degrades. For example, a subtle error in a sliding window attention implementation once caused a model's benchmark accuracy to drop by 30% without throwing a single warning. For developers, finding the root cause of such a drop is a nightmare. The semantic gap between a wrong mathematical output and a buggy line of C++ code deep in the stack can take months of manual effort to bridge.
To address this, researchers introduce Ekka, an automated system designed to diagnose silent errors in LLM serving frameworks. By using LLM agents to perform "differential debugging" between a buggy framework and a trusted reference (like HuggingFace), Ekka identifies root causes with 80% accuracy, and has even found four previously unknown bugs in production systems.
How Ekka Works: Differential Debugging
Ekka treats diagnosis as a differential debugging problem. If developers have a buggy framework (the Target) and a known-good one (the Reference, like HuggingFace Transformers), they can find the bug by systematically comparing their internal states. The system operates in two main stages:
1. Diagnosis Information Collection
Ekka builds a "Model Tree" (a compressed map of the architecture) and a "Code Index" for both frameworks. It then runs the same prompt through both the target and reference frameworks, hooking into the execution to save every intermediate tensor (activation).
2. Agent-Based Bug Diagnosis
This stage acts as the brain of Ekka. It uses LLM agents to solve three difficult alignment problems:
- Component Mapping: Frameworks often name components differently. An agent maps vLLM’s
QKVProjectionto HuggingFace’s separateq_proj,k_proj, andv_proj. - Activation Alignment: Even if components match, their data shapes might not. Ekka’s agent generates Python code to reshape or concatenate tensors so they can be compared directly.
- Error Analysis: To distinguish between a real bug and "numerical noise" (like the tiny differences between BF16 and FP32 precision), Ekka uses a robust error ratio. It then applies change-point analysis to find the exact moment in the execution sequence where the error ratio spikes and stays high, pinpointing the first buggy component.
Key Insights
- LLMs as Scaffolding, Not Just Solvers: A major insight from the paper is that while general-purpose coding agents struggle with deep systems bugs, they are excellent at "scaffolding"—mapping semantic concepts across different codebases and writing the glue code needed to align tensors.
- The "Sustained Elevation" Heuristic: In a complex model, an error in layer 5 will propagate to layers 6 through 80. Ekka doesn't just look for the biggest error; it looks for the first place where the error ratio shifts upward and remains elevated, effectively isolating the root cause from downstream noise.
- Precision-Aware Metrics: Simple subtraction cannot be used to find bugs in low-precision (BF16/FP8) environments because they are inherently noisy. Ekka’s robust error ratio normalizes the target's error against the reference's own precision-related instability, making the signal-to-noise ratio much clearer.
Datasets and Results
To evaluate the system, the authors curated a new Silent Error Benchmark consisting of 17 real-world bugs collected from the GitHub issue trackers of vLLM and SGLang. These cases cover a wide range of issues, including logic errors in kernels, distributed inference bugs, and precision mismatches across models like Llama, Gemma, and Qwen.
- High Accuracy: Ekka achieved an 80% pass@1 accuracy in identifying the correct buggy component, significantly outperforming state-of-the-art general coding agents like OpenCode (48%) and Mini-SWE-Agent (60%).
- Real-World Impact: The authors used Ekka to diagnose 4 new, previously unknown silent errors in vLLM and SGLang. All four were confirmed by the framework developers.
- Cost-Effective: The average cost to diagnose a bug was approximately $30, a tiny fraction of the cost of a senior engineer's time spent manual debugging for weeks.
- Robustness: The system remained effective even when using weaker LLM backends, proving the strength of the underlying workflow design.
Limitations and Future Work
While highly effective, Ekka has a few limitations. It is most effective for bugs that cause reproducible activation divergence, making it less suited for "heisenbugs" related to race conditions, hardware corruption, or pure performance regressions where the output remains mathematically correct.
Currently, Ekka localizes bugs to the module level (e.g., identifying that the attention layer is broken). Future work aims to achieve line-level granularity by capturing every intermediate variable within a function. Additionally, while the principles are general, the current prototype is optimized for PyTorch-based stacks, with expansion to JAX/Flax or other inference engines noted as a next step.
Summary updated