arXiv(opens in a new tab)cs.CLOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.07940

Hybrid Latent Attention for Looped Language Models

Yuhan Chen, Siyuan Zhang, Nan Wang, Feiyang Kang, Ruoxi Jia

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Looped language models apply the same stack of layers T times to each token, which deepens the model without adding parameters but multiplies its key–value (KV) cache by T. The larger cache limits how many sequences a GPU can decode at once and slows each decoding step, which reads the whole cache. We propose Hybrid Latent Attention (HLA), which keeps exact keys and values within a sliding window of W recent tokens and stores each older token as a compact latent that the query of each loop reads directly, without reconstructing keys and values. We uptrain HLA on Ouro looped models (T=4) with 1.4B and 2.6B parameters, keeping the pretrained weights frozen and training only the added parameters to reproduce the original attention. The cache shrinks by 10.7×10.7\times per token, fitting 4.0–8.8× as many concurrent sequences per GPU, and decoding throughput improves by 2.5×2.5\times at 1K-token contexts and by up to 7.4×7.4\times at 16K. HLA retains over 97% of the original accuracy on math, knowledge and reasoning benchmarks, and 96–100% on long-context retrieval up to 16K tokens. After supervised fine-tuning, it performs on par with the fine-tuned original model on competition-level math.

1 Introduction

A looped language model applies the same stack of Transformer layers T times to each token, gaining depth without adding parameters [Dehghani et al., 2019, Geiping et al., 2025, Zhu et al., 2025]. Ouro models with 1.4B and 2.6B parameters and T=4 are reported to match standard Transformers of up to 12B parameters on a wide range of benchmarks [Zhu et al., 2025].

The parameters saved by looping are paid back at inference time. Each loop attends to its own keys and values, so the key–value (KV) cache of a looped model is T times that of a non-looped model with the same layers. This cache bounds how many sequences decode together: an 80 GB GPU holds only five 16K-token sequences of Ouro-1.4B. Every decoding step also reads the whole cache, so the time per step of a single sequence grows from 13.6 ms at 1K tokens of context to 49.3 ms at 16K (Section 5.2). Faster decoding therefore requires shrinking both what is stored per token and the work spent on each stored token at every step.

Prior work reduces this cache in two ways. The first, suggested with Ouro [Zhu et al., 2025], keeps only the last loop's keys and values for generated tokens, so most loops read keys and values that were not computed for them. Ouro reports a small loss on GSM8K and MATH-500, but O'Neill and Reid [2026] find this reuse unsafe, and with long generations a variant at our memory budget retains 60% of the math accuracy of the full cache on Ouro-1.4B (Section 5). The second, Looped Latent Attention (LLA) [O'Neill and Reid, 2026], stores a compact latent per token, using the low-rank trajectory of its keys and values across loops, but every decoding step rebuilds the keys and values of each loop from the latents of the whole history; in our measurements LLA reaches 7–18% of the throughput of the full cache (Section 5.2).

This paper asks whether attention can read such a latent as it is, without reconstruction. Hybrid Latent Attention (HLA) writes one latent per token and layer as a linear function of the token's hidden states

Correspondence to: yuhan@vt.edu

Preprint. Under review.

Figure

Figure 1: Hybrid Latent Attention in one layer of a looped model with T loops. (a) The full cache stores the keys and values (KV) of every loop for every token. (b) HLA keeps exact KV for the last W tokens and stores each older token as one latent shared by loops 2 to T and a smaller latent for loop 1. (c) Attention within one loop. Blue modules are added by HLA and white modules are the frozen pretrained projections. The query and output maps let latent attention read the latent cache directly, and latent and exact attention share one softmax.

across loops, plus a smaller latent for the first loop, whose keys and values are the hardest to predict (Section 3.2). Each loop maps its query into the latent space, scores it against the stored latents, and maps their weighted sum to the attention output (Fig. 1); both maps act on the current token only, so no keys or values are rebuilt.

In a model that reads every past token through its latent, the 127 nearest tokens receive about a quarter of the attention but account for about half of its divergence from the original attention (Section 5.5 and Appendix D). HLA therefore keeps the exact keys and values of the most recent W tokens, a fixed cost per sequence, and reads all earlier tokens through the latent, with one softmax over both parts.

We add HLA to a pretrained model by uptraining [Ainslie et al., 2023]: with the pretrained weights frozen, the new maps are trained for 1,200 steps to match the attention of each layer of the original model. Fine-tuning is less direct, since a token's latent is complete only after its last loop, yet later tokens read it before their own last loop; a single parallel pass therefore does not reproduce decoding, but two passes, the first writing the latents and the second reading them, come close to it (Section 4.2).

On Ouro-1.4B and Ouro-2.6B served with vLLM [Kwon et al., 2023], HLA shrinks the cache by 10.7×10.7\times per token, from 768 to 72 KiB on the smaller model. With the window included, a GPU holds 4.0−8.8×4.0-8.8\times as many sequences at contexts from 1K to 16K tokens, and peak decoding throughput rises by 2.5−7.4×2.5-7.4\times. With the pretrained weights frozen, HLA retains over 97% of the original accuracy on MATH500 [Hendrycks et al., 2021, Lightman et al., 2023], MMLU-Pro [Wang et al., 2024] and BBH [Suzgun et al., 2023] and 96–100% on RULER [Hsieh et al., 2024] up to 16K tokens, and after two-pass fine-tuning it performs on par with the fine-tuned original models on AIME and HMMT problems.

Our contributions are as follows.

• Hybrid Latent Attention, which keeps exact keys and values for the most recent W tokens and stores older tokens as compact latents that each loop reads directly, without reconstructing keys and values.

• Uptraining with frozen weights and two-pass fine-tuning, which add HLA to a pretrained looped model and keep it trainable.

References (36)