Enabling batch-invariant (deterministic) kernels in vLLM costs 1.6x-2.1x wall clock: Qwen-3-8B, 1 GPU, 1000 sequences at 90-110 output tokens
Fields
benchmarks/vllm-batch-invariant-determinism-throughput-cost-1-6xNotes
THE COST OF THE ORACLE, WHICH IS WHY DETERMINISM IS USUALLY SHIPPED OFF. Anyone proposing batch-invariance as a default needs this number: determinism is not free, it is 1.6x-2.1x on this workload and the authors were explicit they had not finished optimizing. This is also why the recommended posture is to run the invariant as a TEST ORACLE on a small configuration rather than enable it in production - you get the correctness signal without the throughput cost. The 42 s figure shows most of the recoverable cost is in attention specifically, which matches their analysis that attention is the hardest op to make batch-invariant (decode-time query length is tiny, so the reduction must be split along the KV dimension, and FlashInfer's 'balanced scheduling' picks a different split count per call). One caveat on reading the ratio: these are whole-request wall times, so the slowdown is not the same as a decode-throughput slowdown and should not be multiplied into an existing tok/s benchmark.