Source code for Twitter's Recommendation Algorithm
Go to file
2023-04-01 15:17:16 -07:00
.github/workflows Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
common Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
core Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
images Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
machines Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
metrics store returned metrics in variables prior to return statement. 2023-04-01 15:17:16 -07:00
ml_logging Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
optimizers Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
projects Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
reader Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
tools Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
.gitignore Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
.pre-commit-config.yaml Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
COPYING Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
LICENSE.torchrec Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
model.py Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
pyproject.toml Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00
README.md Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05:00

This project open sources some of the ML models used at Twitter.

Currently these are:

  1. The "For You" Heavy Ranker (projects/home/recap).

  2. TwHIN embeddings (projects/twhin) https://arxiv.org/abs/2202.05387

This project can be run inside a python virtualenv. We have only tried this on Linux machines and because we use torchrec it works best with an Nvidia GPU. To setup run

./images/init_venv.sh (Linux only).

The READMEs of each project contain instructions about how to run each project.