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

Classical deep learning recommendation models (DLRMs) hit compute scaling bottlenecks when pushed to very large scale. This project shows that recommendation can be reformulated as a generative sequence-modeling problem, which removes those bottlenecks. It also provides efficient algorithms (HSTU and M-FALCON) that accelerate training and inference by 10x–1000x, and demonstrates scaling laws in deployed, billion-user recommendation systems.

How it works

The codebase treats a user's interaction history as a sequence and frames the next-item prediction as a generative task. The core architecture is HSTU (Hierarchical Sequential Transduction Unit), an attention-based transducer. To make this practical at scale, the project ships highly optimized kernels: Triton and CUDA kernels for NVIDIA GPUs (including a FlashAttention V3–based attention implementation) and Composable Kernel–based kernels for AMD GPUs. It also supports FP8 quantization for additional speedups. The repository includes a complete DLRM-v3 model built on HSTU, with training and inference pipelines, plus scripts to reproduce paper experiments on MovieLens and Amazon Reviews, and a synthetic-data generator that expands MovieLens-20M to 3 billion ratings.

Who it’s for

Researchers and engineers working on large-scale recommendation systems, especially those interested in sequential models, generative formulations of ranking, or efficient training/inference on GPU hardware. It is also useful for anyone reproducing the ICML'24 paper results or benchmarking HSTU against classical baselines.

Highlights

  • Reformulates classical DLRMs as generative sequence models to overcome compute scaling limits
  • Introduces HSTU, an attention-based architecture that outperforms SASRec, BERT4Rec, and GRU4Rec on MovieLens and Amazon Reviews benchmarks
  • Reports 10x–1000x training/inference speedups via HSTU and M-FALCON algorithms
  • Provides high-performance kernels for NVIDIA (FlashAttention V3–based) and AMD (Composable Kernel) GPUs
  • Supports FP8 quantization for further acceleration, with benchmark tables showing ~1.1–1.25x stack speedups and ~2x attention speedups
  • Includes a complete DLRM-v3 implementation with training and inference scripts, plus a synthetic dataset generator (fractal expansion) to scale data to billions of ratings
  • Apache 2.0 licensed, with AMD kernels MIT licensed

Related

  • Project
  • Project
  • Project
  • Project
  • Project