Manuscript Offprint

arXiv:2609.01807

hLLM: Single Pass Decoding for Generative Reranking

Emil Laftchiev, Prachi Agrawal, Moe Kayali, Bixing Yan, Qi Xu, Zijie Lei, Chen Qiu, Zhi Hua, Ke Li, Luke Simon

ABSTRACT

Large language models (LLMs) achieve state-of-the-art generative ranking quality, but the ranking they produce must be decoded, and autoregressive decoding spends one sequential forward pass per emitted token. We observe that the only tokens a ranker must emit are the NN ordinal values naming the items in ranked order, and that this narrow, permutation-structured output format admits decoding strategies which are much more efficient than left-to-right generation. We introduce HLLM (Hungarian LLM), a format-specialized decoding strategy that decodes all NN ordinals in O(1)O(1) forward passes. HLLM reads an N×KN \times K item–position score matrix off the LLM's prefill hidden states with a lightweight self-attention head, then decodes the ordinals as the optimal bipartite assignment of that matrix via the Hungarian algorithm, yielding a valid permutation by construction rather than by repair. Through a systematic study of training signals and backbone adaptation, we show that LoRA-based fine-tuning combined with teacher ranking distillation reaches 28 ms end-to-end inference, a speed-up of 64× while maintaining ranking quality on par with the teacher. We provide a complete ablation decomposing the contributions of architecture, training signal, and backbone adaptation. Our framework connects generative ranking to combinatorial optimization, opening a path toward other O(1)O(1)-decode mechanisms for real-time ranking.

1 INTRODUCTION

Generative ranking, producing a complete ordering of NN candidates jointly rather than scoring each independently, is critical for recommendation, advertising, and search. Autoregressive LLMs have recently emerged as powerful generative rankers, achieving superior quality by jointly reasoning over all candidates in context (Sun et al., 2023). The output of such a ranker is a permutation, and the model must emit that permutation as tokens: concretely, the NN ordinal values that name the items in ranked order. Ranking is therefore an unusually format-specialized generation problem—the output alphabet is {1,…,N}\{1, \ldots, N\}, the output length is known before decoding begins, and every value must appear exactly once. It is this structure that determines which decoding strategies are available, and it is the axis along which we organize both the prior work and our contribution.

Autoregressive decoding, however, spends one sequential forward pass over the KV cache per emitted token, so decoding the NN ordinals uses O(N⋅T)O(N \cdot T) passes, where TT is the number of tokens per item identifier. This is a bottleneck of the decoder, not of the model: the prefill that computes the candidate representations is already parallel and already optimized in its computational complexity. As an example, in the experiments for this paper, a teacher with an explicit reasoning trace reaches 1807 ms per request on an A100 GPU, of which 28 ms is prefill. We address the re-ranking stage, in which a candidate set of NN items retrieved by an upstream system must be ordered by relevance under strict latency constraints.

Decoding strategies. Because the ordinals are what must be decoded, the design space is a space of decoders over a fixed backbone. Autoregressive decoding emits them left to right, one forward pass per token: exact and requiring no architectural change, but with a pass count that grows with the slate. Parallel decoders—non-autoregressive rerankers and multi-token predictors (Ren et al., 2024), and diffusion-based rerankers (Liu et al., 2026)—emit all positions at once and refine them over several steps, reducing the pass count but not to one, and without guaranteeing that the emitted ordinals form a permutation. We ask whether the ordinals can be decoded in a single pass:

References (26)