vLLM-GR: efficient inference for generative recommendation models

Today the project announces vLLM-GR, an open-source inference and serving framework built on vLLM for generative recommendation models. The system addresses a practical problem: recommendation services must turn a long interaction history into a set of candidates within a single request's latency budget. Generating each item ID may take only a few tokens, yet the engine must explore many paths and return items the application can serve.

From viewer history to semantic IDs with OneRec

Consider a video feed. Given a viewer's history, a model such as OneRec can generate a semantic ID (SID) for a video the viewer might watch next. To assemble a feed, the application needs a set of candidates. The OneRec-1.7B example below follows the generation path, from a viewer's history to 128 candidate SIDs. vLLM-GR extends vLLM's model execution and paged key-value (KV) cache with beam search that explores multiple candidate IDs in one request.

Why candidate searches strain request latency

A recommendation service has to turn a long interaction history into a set of candidates within a single request's latency budget. The engine runs successive beam-search steps in one request and selects candidates on the accelerator, reducing duplicate work and per-step coordination with the host. Candidate paths share the cached user history, which the framework exploits to avoid copying the viewer's history for each candidate.

Running recommendation models on the vLLM stack

Teams can reuse vLLM's model execution, scheduling, and paged KV cache when moving from offline evaluation to online serving on NVIDIA GPUs and Ascend NPUs. The framework keeps recommendations aligned with the item catalog; catalog constraints guide the search toward IDs that map to real items, and support for model and catalog updates lets teams refresh what the service recommends as models and inventory change.

Beam search spanning the entire recommendation search

vLLM-GR builds its recommendation search into the vLLM engine. vLLM supplies the scheduler, model execution, and paged KV cache. vLLM-GR adds a beam session that spans the whole search and keeps track of how candidate paths branch. EngineCore owns each beam session from admission to completion. The scheduler dispatches prefill and decode stages to a worker. At each stage, the model runner scores the next token and beam selection records the score and parent of each surviving path. The next decode uses those parent indices to read the right KV state.

Simplicity: submit beam search through familiar interfaces

Submit a complete beam search through the offline Python interface, OpenAI-compatible HTTP, or gRPC. The engine runs the decode loop and returns candidate sequences and scores in one response. This simplicity means teams can integrate generative recommendation without building custom serving infrastructure.

Flexibility: full vocabulary or restricted semantic IDs

Search the full vocabulary or restrict generation to semantic IDs in the item catalog. Per-stage beam widths and per-parent candidate limits let a service explore more partial IDs than it ultimately returns. Catalog constraints keep the search grounded in real items while still allowing exploration of partial ID paths.

Performance: sharing prompt KV across beams

Sharing prompt KV across beams avoids copying the viewer's history for each candidate. While the accelerator executes one stage, the host prepares the next, reducing the wait between decode steps. This overlap of accelerator execution and host preparation is a key reason the framework achieves lower tail latency in benchmarks.

Benchmarks: P99 latency across GPUs and NPUs

The benchmarks measure P99 latency to show how beam width and batch size affect tail latency for generative recommendation. The overview charts hold the input length at 1,024 tokens and compare beam widths of 256 and 128 at batch sizes 1, 4, and 8 across four NVIDIA GPUs and two Ascend NPUs.

On RTX PRO 6000, vLLM-GR, SGLang Beam, and NVIDIA SID-GR ran OneRec-1.7B in BF16 and generated three tokens from the same synthetic inputs with catalog constraints disabled. Each point reports whole-batch P99 over 48 timed batches after three warmups. With beam width denoted by W and candidate pool size by K, vLLM-GR and NVIDIA SID-GR used K equal to W. SGLang Beam used its native pool of 2W candidates.

At beam width 256, vLLM-GR recorded the lowest P99 among the backends shown at batch sizes 4 and 8 on all six accelerators. On H20 at beam width 256 and batch size 8, P99 was 369.4 ms for vLLM-GR, 1,280.1 ms for SGLang, and 428.1 ms for NVIDIA SID-GR. At beam width 256 and batch size 1 on RTX PRO 6000, NVIDIA SID-GR reported 28.25 ms versus 29.21 ms for vLLM-GR. On A2 at the same beam width and batch size 8, vLLM-GR and xLLM reported 312.69 ms and 324.60 ms, respectively, with catalog constraints enabled for both.

At beam width 128 and batch size 8 on A100, NVIDIA SID-GR measured 199.0 ms and vLLM-GR measured 209.7 ms. At beam width 256 on A100 batch size 8, vLLM-GR measured 274.5 ms and NVIDIA SID-GR measured 451.5 ms. On L20 at batch size 8 and beam width 256, vLLM-GR measured 474.3 ms P99 followed by NVIDIA SID-GR at 790.7 ms. On A5 at batch size 8, vLLM-GR measured 128.2 ms P99 at beam width 128 and 151.7 ms at beam width 256, recording the lowest P99 among the backends shown at all three batch sizes for both overview beam widths.

Future roadmap for vLLM-GR

The project is working toward a framework that can serve both candidate generation and ranking, from long user histories to wide beam searches. Broader model support will extend candidate scoring to HSTU, MTGR, and RankMixer, add native serving for OneTrans, and explore serving optimizations for recommendation models with larger total parameter counts, including mixture-of-experts (MoE) models.

More flexible beam search will explore value-aware candidate selection and additional output heads for semantic IDs. Support for deeper SID hierarchies across device types and variable-length generation that can stop individual beams at EOS, release their slots and KV, and admit new requests is also planned. Online batching and scheduling will decide when to form a batch and which queued requests to include, allowing requests with different user history lengths to run together while keeping queues bounded under overload. Groups of batches with similar shapes will reuse the same captured computation graph for replay with less padding.

Long histories and KV reuse will optimize prefill for histories of 10,000 tokens or more and explore beam search with linear or sparse attention. As a user's history grows, reuse KV blocks for the unchanged prefix across requests to avoid repeating prefill for those tokens. Distributed inference and KV caching will let a serving instance reuse KV blocks from another device on the same node or on a different node, evaluating model sharding and KV transfer costs in both settings. Closer integration with upstream vLLM will build on vLLM's engine and platform interfaces to bring upstream improvements in scheduling and KV cache management to recommendation workloads. Regular updates to newer stable vLLM releases will validate engine correctness, recommendation quality, and serving performance across supported devices.

Getting started with vLLM-GR

vLLM-GR 0.30.0 is built on vLLM 0.30.0 and supports NVIDIA GPUs and Ascend NPUs. Follow the installation guide for your accelerator, either NVIDIA CUDA or Ascend NPU. Serving generative recommendation models: run OneRec-1.7B offline or follow the HTTP serving example or the gRPC serving example for CUDA. If bringing another recommendation model to vLLM-GR, the project welcomes contributions describing how the model represents interaction history and what it predicts. Reports of serving bottlenecks should include the model, history length, beam width, and hardware so others can reproduce the issue.

The GitHub repository, issue tracker, and contributing guide are the primary entry points for getting involved. The project acknowledges Hongsheng Liu and Han Zhang from the InferMatrix team for first proposing that vLLM support high-performance inference for generative recommendation, and Roger Wang and Zhipeng Wang from Inferact for in-depth discussions that helped shape the vLLM-GR roadmap and architecture. Additional thanks go to Inferact, InferMatrix Team, openPangu, TikTok-Global E-commerce, ByteDance-Commerce & Advertising, and Lingquai for contributing experience and feedback from large-scale production deployments.