explaingit

facebookresearch/dlrm

Analysis updated 2026-07-03 · repo last pushed 2026-01-12

4,048PythonAudience · developerComplexity · 4/5MaintainedLicenseSetup · hard

TLDR

Meta's deep learning model for predicting ad clicks and product recommendations, handling both numerical and categorical user data to estimate the probability a user will click.

Mindmap

mindmap
  root((dlrm))
    What it does
      Click prediction
      Ad ranking
      Recommendations
    How it works
      Numerical path
      Embedding path
      Feature interaction
    Capabilities
      Multi-GPU training
      Checkpoint save/load
      MLPerf benchmark
    Tech Stack
      Python
      PyTorch
      Caffe2
    Audience
      ML engineers
      Ad platform devs
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a click-through rate prediction model for an e-commerce site to rank products a user is likely to buy.

USE CASE 2

Train a personalized recommendation system for a streaming service using viewing history and content metadata.

USE CASE 3

Benchmark ad-ranking model performance against the MLPerf standard using the Criteo advertising dataset.

USE CASE 4

Scale a recommendation model to billions of data points using distributed multi-GPU training.

What is it built with?

PythonPyTorchCaffe2CUDA

How does it compare?

facebookresearch/dlrmfacebookresearch/videopose3dkarpathy/makemore
Stars4,0484,0364,010
LanguagePythonPythonPython
Last pushed2026-01-122022-12-102024-06-04
MaintenanceMaintainedDormantDormant
Setup difficultyhardmoderateeasy
Complexity4/53/52/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires GPU and large datasets like Criteo, distributed training needs multiple machines or GPUs.

Apache 2.0, free for any use including commercial, keep the license notice.

In plain English

This repository contains code for a deep learning model designed to predict whether someone will click on an ad or product, useful for personalized recommendations and targeted advertising. Instead of treating all user data the same way, DLRM (Deep Learning Recommendation Model) handles two types of information differently: numerical features like age or price, and categorical features like product category or user ID. The model works by splitting the problem into two paths. One path processes numerical data through simple mathematical layers. The other path converts categorical features (like "user viewed category X") into dense numerical vectors called embeddings, then combines these vectors in ways that capture relationships between different categories. Finally, the two paths merge together, and the combined information flows through additional layers to produce a single score: the probability that the user will click. The architecture is flexible, you can swap in different ways of combining the categorical embeddings depending on what makes sense for your problem. People building recommendation systems, ad platforms, or e-commerce sites would use this code. For example, a streaming service could use DLRM to predict whether a user will watch a particular show based on their viewing history and show metadata. Facebook and other companies use variants of this approach at massive scale. The repository includes test scripts to verify correctness, benchmark scripts to measure performance, and support for training on well-known datasets like Criteo's advertising data. It also supports distributed training across multiple GPUs or machines, which is essential when working with billions of data points. The implementation is provided in two versions, PyTorch (a popular deep learning framework) and Caffe2, so teams can choose whichever fits their infrastructure better. The code handles real-world complexities like loading large datasets efficiently, saving and resuming training from checkpoints, and integrating with MLPerf, a standard benchmark for measuring machine learning system performance.

Copy-paste prompts

Prompt 1
Using facebookresearch/dlrm, write Python code to train a click prediction model on the Criteo dataset and evaluate it.
Prompt 2
Show me how to configure the DLRM embedding interaction method in facebookresearch/dlrm for my own categorical features.
Prompt 3
How do I set up distributed training with facebookresearch/dlrm across multiple GPUs on a single machine?
Prompt 4
Explain how DLRM combines numerical and categorical features differently and why that matters for recommendation systems.

Frequently asked questions

What is dlrm?

Meta's deep learning model for predicting ad clicks and product recommendations, handling both numerical and categorical user data to estimate the probability a user will click.

What language is dlrm written in?

Mainly Python. The stack also includes Python, PyTorch, Caffe2.

Is dlrm actively maintained?

Maintained — commit in last 6 months (last push 2026-01-12).

What license does dlrm use?

Apache 2.0, free for any use including commercial, keep the license notice.

How hard is dlrm to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is dlrm for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub facebookresearch on gitmyhub

Verify against the repo before relying on details.