Manuscript Offprint

arXiv:2611.05150

What Sets the Serving Speed of Looped Language Models? Measurements and Optimizations Graded by Exactness

Dezhen Lu, Runguo Li, Zixiang Ni, Yuchen Tang, Xingquan Kong, Jiaxing Yang, Jiarui Guo, Lingxiang Gao

ABSTRACT

Looped language models apply one block of layers many times per token, so a serving engine pays every per-layer overhead once per loop; we measure serving for Ouro and Huginn-0125 in an open-source looped-model engine and grade our optimizations from bitwise-identical changes to those that require an accuracy check. At batch 1, fusing all loop submissions leaves Ouro throughput at 0.99×; the 5689 small kernels per token are the real cost, and fusing them behind rounding fences raises throughput 1.11–1.59× while 1014/1014 requests remain identical. An approximate fusion is no faster and misses a one-point GSM8K rule on 87 questions (61 and 62 correct versus 64), so we do not ship it. Huginn's released defaults avoid dead KV slots, reuse prefix-cache pages, and serve 1.77–3.16× faster than the base engine; Ouro reaches 1.65–2.15× and agent sessions 1.91–3.21×, while Huginn's noise and prefix-reuse changes stay within one point on all 1319 Huginn test questions; Huginn's packed prefill, −0.61 points on the same questions, meets that rule only on its point estimate. Position-keyed noise makes CPU cache reuse exact but still leaves 20 of 128 GPU full hits different, while loop fusion delays prefill admission and a 64-graph cache prevents eager fallbacks. Under prefill–decode disaggregation ExactLoop reaches up to 3.3× the base throughput with peer error handling disabled, and 3.1× in two of three runs with it enabled. Its transfer budget, sized to hold one request's KV in flight, cuts the commit tail from about one second under the earlier budget to 16 ms (base: 2.8 s), removing the polling rounds that the engine's interval would otherwise impose.

1 INTRODUCTION

Looped, or recurrent-depth, language models reuse one block of transformer layers several times for each token. Huginn-0125 runs a four-layer block 32 times between a short prelude and coda (Geiping et al., 2025); Ouro runs all of its layers four times and can exit early (Zhu et al., 2025). Depth becomes a run-time knob, which makes these models attractive for reasoning at a fixed parameter count. For a serving engine a looped model looks like a much deeper model whose layers share weights. The natural first optimization is to fuse the loops of a decode step into one GPU submission, which removes host round trips that grow with depth.

We tried this on vllm-rlt (InferMatrixLab, 2026), an open-source engine built for looped models (main branch at com-

mit 66920da), and it did almost nothing at low load. On an RTX 5090, fusing Ouro's four loops halved the submissions per token (6.0 to 3.0) and left batch-1 throughput at 0.99×; it helped only at higher load (1.09× at 32 requests). The loops are not the problem. The problem is that every per-layer cost is paid once per loop, so small costs that a conventional engine can ignore become large. We found two that matter most.

Dead KV slots. The engine keeps a separate KV plane for each recurrence depth, so that a token at depth dd attends to keys computed at depth dd. Each plane reserves a slot for every layer. In Huginn only the four recurrent layers write deeper planes; the four prelude and coda layers write plane 0 only. Of the 8×32=2568 \times 32 = 256 layer slots a token reserves, 124 are never written. On a GH200 the base engine therefore stops scaling near 65 tokens/s, because only a few dozen requests fit in the KV pool. The same layout breaks prefix caching: the cache publishes a prefix only when every layer of every plane has written it, which never happens for Huginn.

Kernel count. At batch 1, an Ouro token costs 5689 GPU kernels on a GH200, most of them small elementwise and reduction kernels from RMSNorm, rotary embedding (RoPE)

¹University of Tübingen, Tübingen, Germany ²University of Illinois Urbana-Champaign, Urbana, IL, USA ³Xi'an Jiaotong University, Xi'an, China ⁴Zhejiang Sci-Tech University, China ⁵Southwest Petroleum University, China ⁶Fudan University, Shanghai, China ⁷Nankai University, Tianjin, China ⁸Swan College, Central South University of Forestry and Technology, Changsha, China. Correspondence to: Dezhen Lu dezhen.lu@student.unituebingen.de.

Preprint.

and the gated activation, each repeated for 24 layers and four loops. CUDA graphs remove their launch cost but not their minimum run time. Fusing them is the obvious remedy, but fused kernels round differently, and in a recurrent model a one-ulp difference passes through 96 layer applications. Our first fused kernels changed GSM8K answers.

The exactness ladder. An optimization for a deployed model is easier to adopt the less it changes outputs. Table 1 records what each ExactLoop change preserves at two levels: the arithmetic applied to the same inputs and batch, and the tokens observed after deployment. A R0 change is bitwise identical under the same batch composition. It may change capacity or scheduling, which can in turn expose the batch-size-dependent arithmetic called R1; an end-to-end comparison then contains both effects. R1 changes preserve each row's operations but change the rows that share a batch, so GEMM algorithms can flip bits (He, 2025). R2 changes target the same sampling distribution with different random numbers. R3 changes alter arithmetic and need a task-level accuracy check. Rungs 0 and 1 produce the Huginn high-concurrency and Ouro batch-1 gains. Long-prompt and session gains come mainly from rungs 2 and 3, while the PD gain is split between rung-3 packed prefill and a rung-0 transfer budget.

References (40)