Fast and Effective Personalized Recommendation with Language Models
Data · Training & Evaluation · Efficient Serving · Ablations · Checkpoint Guide
- [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.
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]
We thank UC Irvine, Google DeepMind, and Oracle for their support.
- 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.
| 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.
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 -qFollow the workflow in order:
- Prepare data: download the public inputs, construct the item catalog, and freeze training and evaluation candidates.
- Train and evaluate: train the teacher, build its score cache, train DuoLM, and evaluate the selected checkpoint.
- Export and serve: precompute item vectors and launch the ranker with the pinned SGLang overlay.
- 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.
- 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.
@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.

