Skip to content
jiangLLMPublic

About

DuoLM: Fast and Effective Personalized Recommendation with Language Models

Topics

Resources

Stars

23 stars

Watchers

0 watching

Forks

Repository files navigation

DuoLM

Fast and Effective Personalized Recommendation with Language Models

Paper on arXiv Hugging Face: DuoLM-Books Hugging Face: DuoLM-Video-Games Source license: MIT

Data · Training & Evaluation · Efficient Serving · Ablations · Checkpoint Guide

🔥 Update

  • [2026.10.21] DuoLM model weights are released on Hugging Face: Books and Video Games!
  • [2026.10.21] DuoLM code is released! See Getting started for training, evaluation, and efficient serving.

Overview

DuoLM makes personalized recommendation more efficient by jointly training an item encoder and an LLM ranker with recommendation supervision and teacher distillation. It pairs compact, reusable item representations with a serving runtime that shares history computation across candidates, preserving recommendation quality while reducing online computation.

flowchart LR
    I[Item content] --> E[Encoder LLM]
    E --> V[Offline item vectors]
    V --> R[Personalized ranker LLM]
    H[User history and feedback] --> R
    R --> S[Candidate scores]
Loading

Acknowledgment

We thank UC Irvine, Google DeepMind, and Oracle for their support.

University of California, Irvine Google DeepMind Oracle

What's included

  • Data preparation, training, and evaluation for Books and Video Games recommendation.
  • Pretrained checkpoints and an inference guide for scoring new items.
  • Efficient serving with offline item encoding, shared history, and CUDA Graphs.
  • Model and runtime ablations from the paper.

Released checkpoints

Domain Model
Books DuoLM-Books
Video Games DuoLM-Video-Games

Both checkpoints include model weights, tokenizers, and configs. See the checkpoint guide to get started.

Getting started

Use Python 3.11 or 3.12. Training requires a CUDA GPU with BF16 support; synthetic correctness tests run on CPU without downloading model weights.

git clone https://github.com/jiangLLM/DuoLM.git
cd DuoLM
python -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'
python -m pytest -q

Follow the workflow in order:

  1. Prepare data: download the public inputs, construct the item catalog, and freeze training and evaluation candidates.
  2. Train and evaluate: train the teacher, build its score cache, train DuoLM, and evaluate the selected checkpoint.
  3. Export and serve: precompute item vectors and launch the ranker with the pinned SGLang overlay.
  4. Run ablations: change one mechanism while keeping the data, initialization, and evaluation protocol fixed.

Serving uses a separate environment from training/export because it requires a different Transformers version. See the exact installation steps in the serving guide.

Results

  • Recommendation quality: DuoLM outperforms the full-text teacher on Books and achieves comparable performance on Video Games.
  • Serving efficiency: On the paper's recommendation benchmark, DuoLM reaches approximately 26,400 candidate scores/s on one H100, about 60× the throughput of the full-text teacher served with vLLM and automatic prefix caching.

See the paper for the full results and evaluation details for the benchmark setup.

Citation

Download BibTeX · Paper

@misc{duolm2026,
  title         = {{DuoLM}: Fast and Effective Personalized Recommendation with Language Models},
  author        = {Jiang Wu and Yutong Song and Hongbo Wang and Guanghe Cao and Jeff Lei Liang},
  year          = {2026},
  eprint        = {2610.24481},
  archivePrefix = {arXiv},
  primaryClass  = {cs.IR},
  doi           = {10.48550/arXiv.2610.24481},
  url           = {https://arxiv.org/abs/2610.24481}
}

We thank SGLang, Hugging Face Transformers, and Qwen for their open-source code and models, and the Amazon Reviews 2023 team for the dataset. DuoLM's original code is released under the MIT License; code adapted from SGLang retains its Apache 2.0 license. See third-party notices for details.

About

DuoLM: Fast and Effective Personalized Recommendation with Language Models

Topics

Resources

Stars

23 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages