vLLM Fixes Qwen3.8 Non-Determinism Bug
Key point
vLLM resolved the non-deterministic output issue for Qwen3.8-Flash-Next at temperature 0 by fixing the sparse-attention kernel.
Details
A non-deterministic issue was discovered where vLLM generated different outputs on each run even at temperature 0 when serving the Qwen3.8-Flash-Next model. The root cause is a race condition in the persistent_topk kernel of the sparse-attention indexer used in GB10/DGX Spark environments.
Root Cause
A race condition occurs during the atomicAdd slot assignment in the persistent_topk kernel, causing the selected top-2048 positions to vary with each execution. This changes the context read by the attention layers, leading to unstable final outputs. This issue did not appear in llama.cpp or other vLLM models.
Solution and Performance
A 1-file overlay fix was proposed, applying torch.topk(sorted=False) and canonical tie ordering. This fix increases prefill cost by 1.35x (efficient compared to a 2.9x increase with full sorting) but does not impact decode/MTP performance. After the fix, re-run results showed unstable outputs dropped to 0 out of 50 tests, and scores previously misaggregated due to noise increased by 1 point.
Additional Findings
With determinism ensured, a greedy+thinking repetition loop issue previously masked by kernel noise was revealed. It was also confirmed that MTP (Multi-Token Prediction) output results differ from standard greedy decoding for this model.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.