Detent: Batch-Invariant LLM Serving and RL Rollouts at Near-Stock Speed
Peixu Xin (Independent Researcher, Boston University), Runchuan Feng (Independent Researcher, Boston University), Jiazhen Guo (Google), Kan Wu (RadixArk), Ming Yin (Princeton University, Georgia Institute of Technology)
Key points
From the paper's conclusion- On multi-GPU deployments of Llama-3.1-70B and Qwen3-30B-A3B in vLLM and SGLang, Detent is batch-invariant.
Abstract
Reproducible evaluation, verifiable inference and on-policy reinforcement learning (RL) need an LLM engine to give a request the same output bits whichever requests share its batch. Batch-invariant kernels exist, but engines still select each kernel and its parameters from the batch. Two kernels that compute the same sum can round it differently. The engines' deterministic modes remove the choice by keeping one conservative kernel per operator and pay for it in latency. Many fast kernels are batch-invariant by themselves, so it is enough to fix the few batch-dependent values that kernel selection reads. Detent expresses kernel selection as a program that the engine executes. It finds the fewest values in this program that must be fixed and tunes them for the workload before deployment. On multi-GPU deployments of Llama-3.1-70B and Qwen3-30B-A3B in vLLM and SGLang, Detent is batch-invariant. Tuned per load, it serves at 1.04-1.17x the latency per output token of Stock (each engine with its standard settings), against 1.67-10.3x for the deterministic modes. In SGLang it matches the GSM8K accuracy of SGLang's deterministic mode. Detent covers multiple deployment combinations, including multiple engines, GPU generations, tensor-parallel degrees, and dense and MoE models. Seeded RL rollouts of models up to Llama-3.1-70B replay bit for bit under other batches and cache splits. A trainer on Detent's kernels and values matches every rollout logprob bit for bit at 1.03x Stock's rollout time per token. BF16 GRPO then stays stable where Stock's run collapses.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- God Does Not Play Dice: Enforcing Batch Invariance in Agentic Kernel GenerationarXiv · 2026
- Reproducible LoRA Inference Through Deterministic Split-K ReductionarXiv · 2026
- BlockLock: Reproducible LLM Inference with Fixed Batch GeometryarXiv · 2026
- Evaluating Inference Compute for Generative AI: A Framework for Enterprise WorkloadsarXiv · 2026
- RTP-LLM: Building an Evolvable and Reliable LLM Inference Engine at Alibaba ScalearXiv · 2026
- A Controlled Experimental Evaluation of Configuration and Cache Architecture in LLM Serving EnginesarXiv · 2026