OneRec
OneRec generates a whole session of video semantic IDs with one MoE encoder-decoder, replacing the cascade.
Tabular and recommender · 1,107 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 722.1M
- Operations
- 1,107
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2025
- Paper
- OneRec: Unifying Retrieve and Rank with Generative Recommender and Iterative Preference Alignment
- Cited by
- 476 (as of 27 November 2026)
- Authors
- Jiaxin Deng, Shiyao Wang, Kuo Cai and others
- Source
- GitHub: jetxa/OneRec
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m2003
- Graph hash
- 4bef5a4fd1726e01663c94de28fd1fbbaddd91f88727a748dbbd0fbe7e222107
- Skeleton hash
- 10f156d42a789e4593304d023f665497ec98c009d865b88a9ea5c6404cb2489b
- Architecture hash
- 1161dc10d6b002f080d739c2b570ef7f01c3307ecc608a9544dd26a479262c70
- Diagram SHA-256
- ef526b6aa945784b7d25255f776cbae1459f011edb3abbff2e9f647b317b37fe
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
OneRec is a generative recommender from Kuaishou that replaces the cascaded retrieve-and-rank pipeline with a single unified generative model. Most modern recommender systems adopt a retrieve-and-rank strategy, where the generative model functions only as a selector during the retrieval stage. The authors claim it is the first end-to-end generative model that significantly surpasses current complex and well-designed recommender systems in real-world scenarios.
Videos are first tokenized into coarse-to-fine semantic IDs, three per item, using residual K-means quantization. An encoder-decoder structure encodes the user's historical behavior sequences and gradually decodes the videos that the user may be interested in. The design follows the T5 architecture, while the decoder's feed-forward networks are replaced with a sparse Mixture-of-Experts to scale model capacity without proportionally increasing computational FLOPs. The Mixture-of-Experts layers contain 24 experts with 2 experts activated per forward pass through top-k selection, and the captured member is sized like the technical report's OneRec-0.935B with 8 encoder-plus-decoder layers and a hidden dimension of 1024. Rather than predicting one next item, OneRec generates a whole session at once, where a session is a batch of short videos returned in response to a user's request, typically 5 to 10 videos. Training uses cross-entropy next-token prediction on the semantic IDs of the target session, followed by Iterative Preference Alignment with Direct Preference Optimization, where a reward model scores beam-search samples to pick chosen and rejected sessions. Only a small ratio of 1% of data goes through DPO training, yet it yields substantial gains.
Deployed in the main scene of Kuaishou, a short video platform with hundreds of millions of daily active users, OneRec achieved a 1.6% increase in watch-time. Thanks to the MoE architecture, during inference only 13% of the parameters are activated, and beam search uses a beam size of 128. The later technical report scales the family up to OneRec-2.633B and reports that the end-to-end architecture handles 25% of total queries per second in the Kuaishou and Kuaishou Lite apps.
Key idea. OneRec replaces the multi-stage cascade with one encoder-decoder generative model that decodes semantic-ID tokens session by session, scaled with a sparse Mixture-of-Experts decoder and aligned to user preference with iterative DPO.
- OneRec
- OneRec-V1
- generative recommendation
- Kuaishou
- semantic IDs
- session-wise generation
- mixture of experts recommender
- end-to-end recommender
- generative retrieval
- DPO recommendation
- OneRec Technical Report
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{deng2025onerecunifyingretrieverank,
title={OneRec: Unifying Retrieve and Rank with Generative Recommender and Iterative Preference Alignment},
author={Jiaxin Deng and Shiyao Wang and Kuo Cai and Lejian Ren and Qigen Hu and Weifeng Ding and Qiang Luo and Guorui Zhou},
year={2025},
eprint={2502.18965},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2502.18965},
}