Blog
what is vLLM-GRsemantic IDsgenerative recommendation

What Is vLLM-GR? Semantic IDs and Beam Search Explained

vLLM-GR extends vLLM to serve recommendation models. Learn how semantic IDs, beam search and a shared cache return many ranked candidates from one request.

Portrait of Luis Chavez-Mattos
Edited by Luis Chavez-Mattos, Director, Product··RSS

For Engineering and Data & Analytics

Overhead view of a dense even grid of identical blank tags split into three sections, with one red tag slightly raised and casting a tiny sharp shadow.

What is vLLM-GR?

vLLM-GR is an extension to vLLM, a popular open source engine for running and serving large language models. The "GR" stands for generative recommendation. Instead of writing a text answer, the model looks at what a user watched or clicked and generates codes for items they might like next. These codes are called semantic IDs. Your application maps each code back to a real item, such as a video, a product or an article. The project lives under the vLLM project on GitHub.

TL;DR

  • vLLM-GR lets vLLM serve recommendation models, not just chatbots, by generating item codes instead of sentences.
  • A semantic ID is a code, built in three parts, that stands for one item. It is not a title. Your app translates it back.
  • Chat needs one good answer. Recommendation needs many ranked candidates, often over a hundred, and needs them fast.
  • vLLM-GR gets them with beam search: it explores many paths at once and keeps the best ones, so one request returns a scored list.
  • All those paths share one cached copy of the user's history, which avoids repeating the same work for every candidate.
  • Results can be limited to items in your catalog, so the output maps to things you actually sell or publish.
  • The project is early: one listed model, an experimental runner path, and ranking a list you supply is still planned.

Why do recommendation workloads differ from chat?

A chatbot usually needs one answer. You ask a question, it writes a reply, done.

A recommendation system works differently. When a video app builds your "up next" row, it does not need one video. It needs a long list of candidates, often more than a hundred, that it can then show, filter or reorder. And it needs that list quickly, because a person is waiting for a page to load.

Chat modelRecommendation model
InputA question or instructionA user's history of watches or clicks
OutputOne text answerMany ranked item codes with scores
What mattersQuality of one replyA good set of candidates, returned fast
Final stepShow the textMap codes back to real items

vLLM is already known for being fast and for using GPU memory efficiently. vLLM-GR applies that engine to this second kind of job.

What are semantic IDs?

A semantic ID is a short code that represents one item in a catalog. In the vLLM-GR example, each ID has three parts, and the output wraps each ID between a start token and an end token. A token is the small unit a language model reads and writes.

Think of it like a library call number. The number is not the book's title. It points to the book, and a librarian (your application) looks up the real item. In the same way, the model never writes "a video about robots." It writes a code, and your app turns that code into the matching video.

This is the core idea of generative recommendation. The model "writes" the next item the way a chat model writes the next word, except the vocabulary is item codes.

How does beam search build a ranked list?

Beam search is the technique that turns one request into many candidates. A beam is one possible path the model is exploring. The beam width is how many paths it keeps alive at once.

The model builds each semantic ID in three steps: first part A, then part B, then part C. At each step it tries different options and keeps only the best paths, rather than committing to a single one.

In a demonstration of the project, the beam width was set to 128. One request, a simple prompt asking for the next video, returned 128 candidates. The script printed the top five. Each candidate came with a score, and a score closer to zero ranks higher. So the candidate at rank zero is the model's top pick.

A simplified picture, taken from the diagram the project shares: the engine might keep two beams after part A, three after part B, and finish with two complete IDs, each with a score. Real runs use far more beams, but the shape is the same. Start wide, prune at each step, end with a scored list.

One caution from that demonstration: the first test gave the model no watch history and no catalog. The output was not personalized. It showed that the engine can return many ranked items from one request, not that the items were good recommendations.

How does the shared prompt cache work?

Here, the "prompt" is the user's history: what they watched or clicked. With 128 beams, you might expect the engine to copy that history 128 times. It does not.

All the paths share the same cached copy of the user history. Each beam keeps only its own small extra memory for the part it is building. That saves repeated work and GPU memory, which matters when you want a hundred or more candidates per request.

The project's diagram also shows how the work is overlapped. The engine core manages the search and prepares the next step on the CPU while the GPU is still running the current one. You can send a request through Python, HTTP or gRPC, and you get back a list of candidates with scores.

How does catalog filtering work?

A model that writes codes could, in principle, write a code that matches no real item. Catalog filtering addresses that. When the engine picks the best paths at each step, it can choose either from your catalog only or from the model's full vocabulary.

In a second demonstration, the model was given a watch history of three videos, expressed as semantic IDs, and asked for the next one. The top three results all came from the catalog, with a robot video ranked first because its score was closest to zero. The video titles were labels the presenter made up, so the model never saw them. That test showed the pipeline working end to end, ranking plus catalog filtering. It did not show whether the recommendations were good.

What can vLLM-GR do today, and what are its limits?

Be realistic. The project is young.

  • One listed model. The project page lists a single supported model, with 1.7 billion parameters. The example use case is video recommendation.
  • Experimental runner path. The logs describe the runner path as experimental.
  • A planned feature. Ranking a list of items you supply is still planned, not shipped.
  • Version-sensitive. It needs a specific vLLM version. The project provides an environment check that confirms the version and the platform (it detected CUDA in the demo). It does not test the model itself, so the real test is running one.
  • Modest hardware in the demo. The model download was about 4.29 GB, and it used just under 4 GB of GPU memory when loaded. The demo ran on a single NVIDIA RTX A6000 with 48 GB of memory. By default, the engine uses up to half of the GPU's memory.
  • No quality evidence yet. The demonstrations were about mechanics, not accuracy. No benchmark in the sources tells you how well it recommends.

What does this mean for you?

If you work in product, marketing or merchandising: the same idea could apply to online shopping, music, news or video. Knowing the vocabulary helps you ask better questions of your data team or vendors. Ask what the "items" are, how they are coded, how many candidates a request returns, and whether results are restricted to your real catalog.

If you work with data or engineering: this is worth watching, not betting on. Try it on a small GPU with the provided example, then test it with your own history data and your own catalog. Judge quality yourself, since the sources offer no quality numbers.

If you are a manager evaluating tools: note the shift. Recommendation is starting to be served by the same engines as chat, which may eventually simplify infrastructure. For now, with one listed model, treat it as a preview.

A practical first step for anyone: write down your catalog, how each item would get an ID, and what "history" you actually have per user. That prep work matters whichever engine you end up using.

Could you build the tooling around a recommendation model yourself?

A model returning ranked codes is only half of the job. Someone still has to keep the catalog that maps codes to real items, store user histories, and review what comes back. That is ordinary business software, and you can describe it to Remy in plain English: a catalog table with item codes and titles, a page to paste in a watch history, and a dashboard showing candidates and scores for review. Remy builds a full-stack app with a database and sign-in, deployed to a live URL, so a small team can own the tool instead of juggling spreadsheets. Remy does not run vLLM-GR for you, so the model itself would stay separate.

Frequently Asked Questions

4 questions

What does the GR in vLLM-GR stand for?

GR stands for generative recommendation. The model generates item codes (semantic IDs) for things a user might like next, based on what they watched or clicked.

Is a semantic ID the same as a product or video title?

No. A semantic ID is a code made of three parts that stands for an item. Your application has to map it back to the real item in your catalog.

Why does vLLM-GR use beam search?

Recommendation needs many candidates, not one answer. Beam search explores many paths at once and keeps the best ones, so a single request returns a ranked list with scores. In the demonstration, a beam width of 128 returned 128 candidates.

Can I use vLLM-GR in production today?

The sources describe it as very early. It lists one supported model, calls the runner path experimental, and says ranking a list you supply is still planned. It is better suited to experimentation and evaluation than to production use right now.

How we source, write, and correct our articles. Editorial standards

Related articles

Straight to your inbox.
New pieces as they publish. No noise.