Vosti: Specifying, Implementing, and Verifying Deterministic LLM Inference

Jianxing Qin, Alexander Du, Danfeng Zhang, Matthew Lentz, Danyang ZhuoarXiv 2026

TL;DR

Vosti is the first formally verified LLM inference engine that guarantees bitwise-identical outputs regardless of how requests are batched, chunked, or cached. By combining a Rust-based engine verified with Verus and a custom Triton kernel analyzer, Vosti ensures that performance-critical optimizations never compromise numerical reproducibility.

What Problem Does This Paper Address?

Modern LLM serving is highly dynamic. To maximize throughput, engines use techniques like continuous batching (mixing different requests), chunked prefill (splitting long prompts), and KV-cache reuse (sharing prefix computations).

However, these optimizations often break determinism. Because floating-point addition is non-associative—meaning $(a + b) + c$ does not always equal $a + (b + c)$—changing the order of operations changes the final bit pattern of the logits. In production, a GPU kernel might choose a different tiling strategy or reduction order based on the current batch size or query length, leading to "logit drift."

This non-determinism is more than a nuisance; it breaks speculative decoding, causes mismatches between training and rollout log-probabilities in Reinforcement Learning (RL), and makes it nearly impossible for operators to reproduce specific bugs or failures.

Methods

Vosti achieves bitwise determinism through a two-layer verification strategy, illustrated in the system overview:

Figure 1. Vosti’s inference system and two-layer verification. Brackets show each verifier’s scope; Verus assumes the shared kernel contracts, while our kernel verifier proves them.
  1. The Engine Layer (Verus): The authors implemented the inference engine in Rust and used Verus to formally prove that the scheduler and KV-cache manager are "history-preserving." They proved a central KV-cache invariant: any value retrieved from the cache is bitwise identical to what would have been computed from scratch (a "cold forward").
  2. The Kernel Layer (Triton + Z3): Since the engine relies on GPU kernels, the authors built a symbolic analyzer for Triton. It translates Triton IR into a tile-level representation and uses the Z3 SMT solver to prove that a kernel produces the same output for a specific request, regardless of whether that request is processed alone or as part of a larger, differently-shaped batch.
  3. Deterministic Design Rules: Vosti enforces strict rules to eliminate sources of noise:
  4. Fixed Kernels: It rejects runtime autotuning, pinning specific kernel configurations based on the model and hardware.
  5. Exact Prefix Matching: It uses rolling hashes and exact token checks to ensure KV-cache reuse is only permitted for identical logical prefixes.
  6. Isolation: It ensures that writing new KV values for one request cannot overwrite or interfere with the cached values of another.

Datasets

The authors evaluated Vosti using a suite of Llama and Gemma models:

  • Models: Llama 3.1-8B, Llama 3.2-3B, Gemma 3-4B, Gemma 3-12B, Gemma 3-27B, Gemma 4-12B, and Gemma 4-31B.
  • Benchmarks: They created 5,488 bitwise comparison tests covering four execution variations: batch composition, chunked prefill budgets, prefill-decode transitions, and prefix reuse.
  • Workload: A synthetic "agentic" workload was used to measure end-to-end session completion time, simulating multi-turn conversations with shared context.

Key Insights and Ideas

  • Production "Deterministic" Modes are Incomplete: The authors found that even with "batch-invariant" modes enabled, production engines like vLLM and SGLang still produce logit mismatches, particularly on Gemma models. These mismatches often stem from shape-dependent kernel specialization that isn't covered by simple batch-invariance.
  • The KV-Cache Invariant is Key: To support prefix sharing safely, the system must prove that the physical layout of the cache (paged memory) doesn't leak into the numerical results. Figure 2 shows how Vosti maintains this invariant across sharing, eviction, and recomputation.
The KV-cache invariant ensures that every live or retained entry equals the value obtained by recomputing its token prefix without a cache.
  • Determinism $\neq$ Functional Correctness: The authors explicitly note that a system can be deterministic but wrong (e.g., always returning zero). Vosti proves that the output is stable across executions, not necessarily that the model's math matches a specific reference implementation.

Key Results

  • Perfect Determinism: Vosti passed 100% (5,488/5,488) of bitwise comparison tests across all models and execution variations. In contrast, production engines failed several categories, especially in prefill-decode transitions and prefix reuse.
  • Competitive Performance: On an NVIDIA H200 GPU, Vosti achieved 1.36–3.19× the decode throughput of vLLM’s batch-invariant mode.
  • Session Efficiency: In agentic workloads (which are decode-heavy), Vosti completed sessions 1.14–2.20× faster than vLLM’s invariant modes, though it remains slower than the "default" (non-deterministic) modes of vLLM and SGLang.

Limitations and Future Work

  • Single-GPU Only: Vosti currently only supports single-GPU execution. Extending these proofs to multi-GPU setups involves handling the non-determinism of collective reductions (like All-Reduce) across a network.
  • Fixed Deployment: The determinism guarantee is tied to a specific hardware and compiler version. It does not guarantee that the same model will produce identical bits on an H200 vs. an A100, or across different versions of the Triton compiler.
  • Model Architectures: The current implementation does not yet support Mixture-of-Experts (MoE) or linear-attention architectures (like Mamba), which introduce new data-dependent routing and state-management challenges.

Summary updated

BibTeX
@misc{qin2026vosti,
  author = {Jianxing Qin and Alexander Du and Danfeng Zhang and Matthew Lentz and Danyang Zhuo},
  title = {{Vosti: Specifying, Implementing, and Verifying Deterministic LLM Inference}},
  year = {2026},
  eprint = {2609.38981},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.38981},
}
Figure