meta-recsys/generative-recommenders

Repository hosting code for "Actions Speak Louder than Words: Trillion-Parameter Sequential Transducers for Generative Recommendations" (https://arxiv.org/abs/2402.17152).

What it solves

This project addresses the compute scaling bottlenecks found in classical deep learning recommendation models (DLRMs). It reformulates recommendation as a generative modeling problem, allowing for the use of trillion-parameter sequential transducers to handle billion-user scale systems more efficiently.

How it works

The project implements "Generative Recommenders" (GRs), which treat recommendation as a sequence generation task. It introduces two primary algorithms to accelerate training and inference:

  • HSTU (Hierarchical Sequential Transducer Unit): A specialized architecture designed for high-performance sequential recommendation.
  • M-FALCON: An algorithm designed to further speed up the generative process.

To achieve maximum efficiency, the codebase includes custom Triton kernels and CUDA kernels, including an attention implementation based on FlashAttention V3 for H100 GPUs.

Who it’s for

It is designed for machine learning researchers and engineers working on large-scale recommendation systems, specifically those looking to scale sequential models to billions of users and trillions of parameters.

Highlights

  • Massive Scaling: Demonstrates scaling laws for deployed, billion-user scale recommendation systems.
  • Performance Gains: Claims training and inference acceleration of 10x to 1000x over traditional methods.
  • Empirical Success: Outperforms baselines like SASRec, BERT4Rec, and GRU4Rec on MovieLens and Amazon Reviews datasets.
  • Production Ready: Includes a DLRM-v3 model and benchmarks for training and and inference to facilitate real-world deployment.

Related

  • Project
  • Project
  • Project
  • Project
  • Project