Deterministic Inference across Tensor Parallel Sizes That Eliminates Training-Inference Mismatch
Not on the map. Why?
Abstract (arXiv)
Deterministic inference is increasingly critical for large language model (LLM) applications such as LLM-as-a-judge evaluation, multi-agent systems, and Reinforcement Learning (RL). However, existing LLM serving frameworks exhibit non-deterministic behavior: identical inputs can yield different outputs when system configurations (e.g., tensor parallel (TP) size, batch size) vary, even under greedy decoding. This arises from the non-associativity of floating-point arithmetic and inconsistent reduction orders across GPUs. While prior work has addressed batch-size-related nondeterminism through batch-invariant kernels, determinism across different TP sizes remains an open problem, particularly in RL settings, where the training engine typically uses Fully Sharded Data Parallel (i.e., TP = 1) while the rollout engine relies on multi-GPU TP to maximize the inference throughput, creating a natural mismatch between the two. This precision mismatch problem may lead to suboptimal performance or even collapse for RL training. We identify and analyze the root causes of TP-induced inconsistency and propose Tree-Based Invariant Kernels (TBIK), a set of TP-invariant matrix multiplication and reduction primitives that guarantee bit-wise identical results regardless of TP size. Our key insight is to align intra- and inter-GPU reduction orders through a unified hierarchical binary tree structure. We implement these kernels in Triton and integrate them into vLLM and FSDP. Experiments confirm zero probability divergence and bit-wise reproducibility for deterministic inference across different TP sizes. Also, we achieve bit-wise identical results between vLLM and FSDP in RL training pipelines with different parallel strategy. Code is available at https://github.com/nanomaoli/llm_reproducibility.
Key facts. Cited by 14 papers in the map (data through 14 Oct 2026). Builds on 28 of its 44 references that are in the map. First posted on arXiv 21 Nov 2025.
Builds on
28 of 44 references.
References · 28
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
- 2025Qwen3 Technical Reportcited by 8,820
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,073
- 2024HybridFlow: A Flexible and Efficient RLHF Frameworkcited by 2,057
- 2022GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformerscited by 1,919
- 2023AWQ: Activation-aware Weight Quantization for LLM Compression and Accelerationcited by 1,298
- 2023A Survey on Evaluation of Large Language Modelscited by 1,242
16 more
- 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,141
- 2025Group Sequence Policy Optimizationcited by 835
- 2024Large Language Model based Multi-Agents: A Survey of Progress and Challengescited by 769
- 2023PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallelcited by 660
- 2024KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cachecited by 637
- 2024LLMs-as-Judges: A Comprehensive Survey on LLM-based Evaluation Methodscited by 465
- 2024Judging the Judges: Evaluating Alignment and Vulnerabilities in LLMs-as-Judgescited by 205
- 2024Flex Attention: A Programming Model for Generating Optimized Attention Kernelscited by 185
- 2024On the Resilience of LLM-Based Multi-Agent Collaboration with Faulty Agentscited by 99
- 2025Defeating the Training-Inference Mismatch via FP16cited by 66
- 2025Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inferencecited by 53
- 2024KV Cache Compression, But What Must We Give in Return? A Comprehensive Benchmark of Long Context Capable Approachescited by 42
- 2025LMR-BENCH: Evaluating LLM Agent's Ability on Reproducing Language Modeling Researchcited by 29
- 2025Automating Expert-Level Medical Reasoning Evaluation of Large Language Modelscited by 22
- 2025An Outlook on the Opportunities and Challenges of Multi-Agent AI Systemscited by 8
- 2025The Science of Evaluating Foundation Modelscited by 5
Built on by
Citing papers per year: 2026: 14.
14 papers.
Sort:
By area:
- 2026Rethinking the Trust Region in LLM Reinforcement Learningcited by 37
- 2026LLM-42: Enabling Determinism in LLM Inference with Verified Speculationcited by 16
- 2026QaRL: Rollout-Aligned Quantization-Aware RL for Fast and Stable Training under Training--Inference Mismatchcited by 7
- 2026Diagnosing Training Inference Mismatch in LLM Reinforcement Learning via a Zero-Mismatch Referencecited by 7
- 2026MarginGate: Sparse Margin-Triggered Verification for Batch-Invariant LLM Inferencecited by 3
- 2026FloatDoor: Platform-Triggered Backdoors in LLMscited by 2
- 2026Demystifying Numerical Instability in LLM Inference: Achieving Reproducible Inference for Mission-Critical Tasks with HEALcited by 2
- 2026The Integer Alibi: Localizing Cross-Kernel Divergence in INT8-Quantized LLM Inferencecited by 2
- 2026Stage-Replay Divergence Follows the KV Cache: Fixed-Prefix Precision Controls and Bidirectional Cache Transplantationcited by 1
- 2026Deterministic LLM Inference Across GPU Kernels: Power-of-Two INT8 Quantization Scales and the Limits of Tolerance-Based Conformancecited by 1
- 2026From Accuracy to Auditability: A Survey of Determinism in Financial AI Systemscited by 0
- 2026Greedy Decoding Is Not Precision-Invariant: Cross-Precision Output Divergence in LLM Inferencecited by 0
- 2026Measuring and Reducing Cross-Vendor Mismatch in Language Models4 Oct 2026
- 2026FoldAttention: Declared-Reference Softmax for Fast Decode and Deterministic Backward27 Sep 2026
- 2026Greedy Decoding Is Not Precision-Invariant: Cross-Precision Output Divergence in LLM Inference22 Sep 2026
- 2026Deterministic LLM Inference Across GPU Kernels: Power-of-Two INT8 Quantization Scales and the Limits of Tolerance-Based Conformance25 Aug 2026
- 2026The Integer Alibi: Localizing Cross-Kernel Divergence in INT8-Quantized LLM Inference13 Aug 2026
- 2026Stage-Replay Divergence Follows the KV Cache: Fixed-Prefix Precision Controls and Bidirectional Cache Transplantation30 Jul 2026
- 2026Demystifying Numerical Instability in LLM Inference: Achieving Reproducible Inference for Mission-Critical Tasks with HEAL19 Jun 2026
- 2026FloatDoor: Platform-Triggered Backdoors in LLMs17 Jun 2026
- 2026MarginGate: Sparse Margin-Triggered Verification for Batch-Invariant LLM Inference28 May 2026
- 2026Diagnosing Training Inference Mismatch in LLM Reinforcement Learning via a Zero-Mismatch Reference14 May 2026
- 2026From Accuracy to Auditability: A Survey of Determinism in Financial AI Systems11 May 2026
- 2026QaRL: Rollout-Aligned Quantization-Aware RL for Fast and Stable Training under Training--Inference Mismatch9 Apr 2026
2 more
- 2026Demystifying Numerical Instability in LLM Inference: Achieving Reproducible Inference for Mission-Critical Tasks with HEALcited by 2
- 2026Stage-Replay Divergence Follows the KV Cache: Fixed-Prefix Precision Controls and Bidirectional Cache Transplantationcited by 1
- 2026FoldAttention: Declared-Reference Softmax for Fast Decode and Deterministic Backwardcited by 0
- 2026FoldAttention: Declared-Reference Softmax for Fast Decode and Deterministic Backward27 Sep 2026
- 2026Stage-Replay Divergence Follows the KV Cache: Fixed-Prefix Precision Controls and Bidirectional Cache Transplantation30 Jul 2026
- 2026Demystifying Numerical Instability in LLM Inference: Achieving Reproducible Inference for Mission-Critical Tasks with HEAL19 Jun 2026
- 2026Rethinking the Trust Region in LLM Reinforcement Learningcited by 37
- 2026FloatDoor: Platform-Triggered Backdoors in LLMscited by 2
- 2026FloatDoor: Platform-Triggered Backdoors in LLMs17 Jun 2026
- 2026LLM-42: Enabling Determinism in LLM Inference with Verified Speculationcited by 16
- 2026QaRL: Rollout-Aligned Quantization-Aware RL for Fast and Stable Training under Training--Inference Mismatchcited by 7
- 2026Diagnosing Training Inference Mismatch in LLM Reinforcement Learning via a Zero-Mismatch Referencecited by 7
- 2026MarginGate: Sparse Margin-Triggered Verification for Batch-Invariant LLM Inferencecited by 3
- 2026The Integer Alibi: Localizing Cross-Kernel Divergence in INT8-Quantized LLM Inferencecited by 2
- 2026Deterministic LLM Inference Across GPU Kernels: Power-of-Two INT8 Quantization Scales and the Limits of Tolerance-Based Conformancecited by 1
- 2026From Accuracy to Auditability: A Survey of Determinism in Financial AI Systemscited by 0
- 2026Greedy Decoding Is Not Precision-Invariant: Cross-Precision Output Divergence in LLM Inferencecited by 0
- 2026Greedy Decoding Is Not Precision-Invariant: Cross-Precision Output Divergence in LLM Inference22 Sep 2026
- 2026Deterministic LLM Inference Across GPU Kernels: Power-of-Two INT8 Quantization Scales and the Limits of Tolerance-Based Conformance25 Aug 2026
- 2026The Integer Alibi: Localizing Cross-Kernel Divergence in INT8-Quantized LLM Inference13 Aug 2026
- 2026MarginGate: Sparse Margin-Triggered Verification for Batch-Invariant LLM Inference28 May 2026
- 2026Diagnosing Training Inference Mismatch in LLM Reinforcement Learning via a Zero-Mismatch Reference14 May 2026
- 2026From Accuracy to Auditability: A Survey of Determinism in Financial AI Systems11 May 2026
- 2026QaRL: Rollout-Aligned Quantization-Aware RL for Fast and Stable Training under Training--Inference Mismatch9 Apr 2026
- 2026LLM-42: Enabling Determinism in LLM Inference with Verified Speculation25 Jan 2026
Similar, not cited
Close in wording, no citation either way
- 2026Characterizing Parallelism Strategies in LLM Inference: Fundamental Compute-Communication Trade-offs
- 2024Towards Low-bit Communication for Tensor Parallel LLM Inference
- 2026Scaling LLM Inference Beyond Amdahl`s Limits via Eliminating Non-Scalable Overheads ↗
- 2024Communication Compression for Tensor Parallel LLM Inference
- 2024Spectra: Surprising Effectiveness of Pretraining Ternary Language Models at Scale
- 2024TP-Aware Dequantization
- 2025Spectra 1.1: Scaling Laws and Efficient Inference for Ternary Language Models
- 2025SIMPLE: Disaggregating Sampling from GPU Inference into a Decision Plane for Faster Distributed LLM Serving