WhoBuilt

Two Bugs That Hid in Plain Sight: A vLLM Debugging Detective Story

Sep 19, 2026· 18 min· 9.0K views·Watch on YouTube

Speakers

AI21 engineers Yuval Belfer and Asaf Gardin explain how they traced two silent vLLM bugs in Jamba inference during AI Engineer's talk.

A rare failure under load

During GRPO training of Jamba, a hybrid model with Mamba and attention layers, the team encountered occasional gibberish. It appeared roughly once in 1,000 requests, only in vLLM, and required a workload to reproduce.

Tracing the imposter request

Asaf reproduced the first bug by lowering GPU memory utilization from 90% to 20% and sending many requests at once; request 854 returned gibberish. He compared vLLM outputs with Hugging Face Transformers and added request IDs to vLLM's ForwardContext to inspect the failing request. The scheduler had sent an uncomputed request to decode before prefill, causing Mamba to read stale state from earlier requests.

Fixing the request lifecycle

Unlike attention, which writes a token's KV data before reading it, Mamba decode reads state that may still contain stale data. The fix was to check whether a request's tokens had been computed and initialize them for prefill when they had not.

Finding a cache index overflow

A second issue appeared as log-probability spikes between rollout and FSDP steps, despite unchanged weights and inputs, recurring every 12 steps. Increasing rollouts per prompt from 8 to 128 made it appear on the first step. Lowering GPU memory utilization hid the problem because the smaller state buffer did not reach the overflowing index; changing the Mamba cache index from uint32 to size_t fixed it.

Forensics for silent failures

Both bugs involved the Mamba state cache and were diagnosed through log-probability comparisons. Asaf recommends comparing against another inference framework, reproducing under constrained memory, varying engine settings to change the failure pattern, and threading request identity through code when tensors lose it.

Takeaways

  • Compare token log probabilities against a trusted inference baseline to catch silent output drift.
  • Vary workload and engine settings to learn which conditions change a bug's timing or behavior.
  • Track request identity into the forward pass so tensors can be tied back to failing inputs.
  • Check stateful request initialization and ordering, especially when decode can run before prefill.
  • Use index types large enough for the maximum cache offset, and test buffers at realistic scale.

Mentioned in this talk

Search inside this talk

What was claimed 13

  • built
    AI21 built Jamba
    “We started as a foundation model company, most famously known for Jamba.”
    YouTube
    Verified2 sources· Talk, Web· archived
  • works at
    Asaf Gardin works at AI21
    “We work at AI21, an AI research lab.”
    YouTube
    Verified2 sources· Talk, Web· archived
  • works at
    Verified4 sources· Talk, Web· archived
  • feature
    Jamba: Hybrid architecture combining Transformers and Mamba
    “a hybrid architecture between Transformers and Mamba”
    YouTube
    Unverified1 source· Talk
  • uses
    Jamba uses GRPO
    “during the training of our Jamba model, more specifically during GRPO”
    YouTube
    Unverified1 source· Talk
  • metric
    vLLM: Request 854 returned gibberish after reducing GPU memory utilization from 90% to 20% and running many requests simultaneously
    “request number 854 suddenly returned gibberish”
    YouTube
    Unverified1 source· Talk
  • feature
    vLLM: GPU memory utilization setting controls memory allocation for weights, activations, and KV cache
    “This lets you choose how much GPU memory to allocate for your weights, activations, KV cache”
    YouTube
    Unverified1 source· Talk
  • uses
    “Transformers has a very vanilla, plain implementation of our Mamba kernels”
    YouTube
    Unverified1 source· Talk
  • feature
    vLLM: Scheduler could classify an uncomputed request for decode before prefill, exposing stale Mamba state
    “the scheduler had decided that this request should decode before prefill”
    YouTube
    Unverified1 source· Talk
  • feature
    Mamba state cache: Decode reads state before computing, so stale state can affect outputs
    “when you first go through the decode kernels, you read the state and then compute over it”
    YouTube
    Unverified1 source· Talk
  • metric
    vLLM: Log-probability spikes occurred consistently every 12 steps before a weight update
    “We saw a log-probability spike consistently every 12 steps”
    YouTube
    Unverified1 source· Talk
  • feature
    vLLM: Increasing rollouts per prompt from 8 to 128 made the issue occur on step one
    “With 128 rollouts per prompt, it happened immediately on step one”
    YouTube
    Unverified1 source· Talk
  • feature
    Mamba state cache: Cache index changed from uint32 to size_t to prevent index overflow
    “change one data type from uint32 to size_t”
    YouTube
    Unverified1 source· Talk

Related talks