LLM-42: Enabling Determinism in LLM Inference with Verified Speculation
Open Access
- 28 September 2026
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 916-931
Abstract
In LLM inference, the same prompt often returns different outputs across different runs. At the system level, this non-determinism arises from floating-point non-associativity interacting with dynamic batching and GPU kernels whose reduction orders vary with batch size. A straightforward way to eliminate nondeterminism is to disable dynamic batching, but doing so severely degrades throughput. Another approach is to make the kernels batch-invariant; however, this tightly couples determinism to kernel design, requires new implementations, and imposes fixed overheads regardless of how much of the workload actually requires determinism. Inspired by self-speculative decoding, we present LLM-42 — a scheduling-based approach to enable determinism in LLM inference. Our key observation is that a given sequence of tokens is likely to emit the same next token across multiple runs, even with dynamic batching. Moreover, most GPU kernels use the same reduction schedules for all inputs of a given shape. Leveraging these insights, LLM-42 decodes tokens using a nondeterministic fast path and enforces determinism through a verify-rollback protocol. The verifier replays fast path tokens under a fixed batch size to obtain a deterministic reference output, commits tokens that match the reference, and rolls back those that do not. LLM-42 reuses many existing kernels unchanged and incurs overhead only proportional to the fraction of traffic that requires determinism.All Related Versions
This publication has 10 references indexed in Scilit:
- POD-A ttention : Unlocking Full Prefill-Decode Overlap for Faster LLM Inference2025
- vAttention: Dynamic Memory Management for Serving LLMs without PagedAttention2025
- DynamoLLM: Designing LLM Inference Clusters for Performance and Energy Efficiency2025
- The Good, The Bad, and The Greedy: Evaluation of LLMs Should Not Ignore Non-Determinism2025
- Splitwise: Efficient Generative LLM Inference Using Phase Splitting2024
- SpecInfer: Accelerating Large Language Model Serving with Tree-based Speculative Inference and Verification2024
- FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision2024
- Draft& Verify: Lossless Large Language Model Acceleration via Self-Speculative Decoding2024
- Efficient Memory Management for Large Language Model Serving with PagedAttention2023
- A Discourse-Aware Attention Model for Abstractive Summarization of Long Documents2018