# Detent: Batch-Invariant LLM Serving and RL Rollouts at Near-Stock Speed

DevFeed: [Detent: Batch-Invariant LLM Serving and RL Rollouts at Near-Stock Speed](<https://devfeed.tech/articles/detent-batch-invariant-llm-serving-and-rl-rollouts-at-near-stock-speed-125224.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.10611>)

Author: Peixu Xin (Independent Researcher, Boston University), Runchuan Feng (Independent Researcher, Boston University), Jiazhen Guo (Google), Kan Wu (RadixArk), Ming Yin (Princeton University,Georgia Instit

Published: 2026-11-10T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Distributed Computing](<https://devfeed.tech/sources/arxiv-distributed-computing.md>), [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [LLM optimization](<https://devfeed.tech/topics/llm-optimization.md>), [llm-reasoning](<https://devfeed.tech/topics/llm-reasoning.md>), [grpo](<https://devfeed.tech/topics/grpo.md>), [vllm](<https://devfeed.tech/topics/vllm.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>)

Tags: [batch](<https://devfeed.tech/tags/batch.md>), [bf16](<https://devfeed.tech/tags/bf16.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cs-dc](<https://devfeed.tech/tags/cs-dc.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [invariant](<https://devfeed.tech/tags/invariant.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [latency](<https://devfeed.tech/tags/latency.md>), [llama](<https://devfeed.tech/tags/llama.md>), [llama-3-1](<https://devfeed.tech/tags/llama-3-1.md>), [llm](<https://devfeed.tech/tags/llm.md>), [llm-serving](<https://devfeed.tech/tags/llm-serving.md>), [moe](<https://devfeed.tech/tags/moe.md>), [multi-gpu](<https://devfeed.tech/tags/multi-gpu.md>), [program](<https://devfeed.tech/tags/program.md>), [qwen3](<https://devfeed.tech/tags/qwen3.md>), [reinforcement-learning](<https://devfeed.tech/tags/reinforcement-learning.md>), [rl](<https://devfeed.tech/tags/rl.md>), [rl-rollouts](<https://devfeed.tech/tags/rl-rollouts.md>), [serving](<https://devfeed.tech/tags/serving.md>), [sglang](<https://devfeed.tech/tags/sglang.md>), [speed](<https://devfeed.tech/tags/speed.md>)

## AI overview

Detent makes LLM outputs batch-invariant by executing kernel selection as a program, fixing the few batch-dependent values it reads, and tuning those values for the workload. The abstract reports multi-GPU results for Llama-3.1-70B and Qwen3-30B-A3B in vLLM and SGLang: per-output-token latency was 1.04-1.17x each engine's standard settings, compared with 1.67-10.3x for deterministic modes. In SGLang, GSM8K accuracy matched its deterministic mode. Seeded rollouts replayed bit for bit across different batches and cache splits; a trainer matched rollout log probabilities bit for bit at 1.03x standard rollout time per token. BF16 GRPO remained stable in the reported run where the standard run collapsed.

## Source excerpt

arXiv:2611.10611v1 Announce Type: new 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.