LLM-42: Enabling Determinism in LLM Inference with Verified Speculation

AI-generated keywords: Large Language Model (LLM) inference determinism floating-point non-associativity dynamic batching speculative decoding

AI-generated Key Points

  • Achieving determinism in Large Language Model (LLM) inference has been a challenge due to floating-point non-associativity, dynamic batching, and varying reduction orders in GPU kernels.
  • Disabling dynamic batching can eliminate non-determinism but degrades throughput.
  • LLM-42 introduces a scheduling-based approach inspired by speculative decoding techniques to enable determinism in LLM inference.
  • LLM-42 leverages shape-consistent reductions and decodes tokens using a non-deterministic fast path while enforcing determinism through a lightweight verify-rollback loop.
  • The verifier in LLM-42 replays candidate tokens under a fixed-shape reduction schedule to ensure consistency across runs.
  • LLM-42 mostly reuses existing kernels without significant modifications and incurs overhead proportional to the portion of traffic requiring determinism.
  • Table 4 presents key metrics characterizing throughput in offline inference for both SGLang and LLM-42, showcasing the total number of rollbacks for different datasets/configurations under each model.
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Raja Gond, Aditya K Kamath, Ramachandran Ramjee, Ashish Panwar

https://github.com/microsoft/llm-42
License: CC BY 4.0

Abstract: In LLM inference, the same prompt may yield different outputs across different runs. At the system level, this non-determinism arises from floating-point non-associativity combined with dynamic batching and GPU kernels whose reduction orders vary with batch size. A straightforward way to eliminate non-determinism is to disable dynamic batching during inference, but doing so severely degrades throughput. Another approach is to make kernels batch-invariant; however, this tightly couples determinism to kernel design, requiring new implementations. This coupling also imposes fixed runtime overheads, regardless of how much of the workload actually requires determinism. Inspired by ideas from speculative decoding, we present LLM-42, a scheduling-based approach to enable determinism in LLM inference. Our key observation is that if a sequence is in a consistent state, the next emitted token is likely to be consistent even with dynamic batching. Moreover, most GPU kernels use shape-consistent reductions. Leveraging these insights, LLM-42 decodes tokens using a non-deterministic fast path and enforces determinism via a lightweight verify-rollback loop. The verifier replays candidate tokens under a fixed-shape reduction schedule, commits those that are guaranteed to be consistent across runs, and rolls back those violating determinism. LLM-42 mostly re-uses existing kernels unchanged and incurs overhead only in proportion to the traffic that requires determinism.

Submitted to arXiv on 25 Jan. 2026

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2601.17768v2

In the field of Large Language Model (LLM) inference, achieving determinism in output across different runs has been a challenge due to floating-point non-associativity, dynamic batching, and varying reduction orders in GPU kernels. While disabling dynamic batching can eliminate non-determinism, it comes at a cost of degrading throughput. Another approach involves making kernels batch-invariant; however, this requires new implementations and imposes fixed runtime overheads. Inspired by speculative decoding techniques, a novel scheduling-based approach called LLM-42 has been introduced to enable determinism in LLM inference. The key insight behind LLM-42 is that if a sequence is in a consistent state, the next emitted token is likely to be consistent even with dynamic batching. Additionally, most GPU kernels utilize shape-consistent reductions. Leveraging these observations, LLM-42 decodes tokens using a non-deterministic fast path and enforces determinism through a lightweight verify-rollback loop. The verifier in LLM-42 replays candidate tokens under a fixed-shape reduction schedule: committing those that are guaranteed to be consistent across runs and rolling back those that violate determinism. Notably, LLM-42 mostly reuses existing kernels without significant modifications and only incurs overhead proportional to the portion of traffic requiring determinism. Table 4 presents two key metrics characterizing throughput in offline inference for both SGLang and LLM-42. SGLang operates in deterministic or non-deterministic mode for all requests while LLM-42 supports selective determinism based on the fraction of traffic requiring deterministic output. The table showcases the total number of rollbacks for different datasets/configurations under each model. In conclusion, By leveraging insights from speculative decoding and shape-consistent reductions, LLM-42 provides a practical method for ensuring consistency in output across multiple runs without imposing significant runtime overheads or requiring extensive kernel redesigns.
Created on 18 Jul. 2026

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.