Source code for Twitter's Recommendation Algorithm
Find a file
2023-03-31 10:31:35 -05:00
.github/workflows The Algorithm ML 2023-03-31 10:31:35 -05:00
common The Algorithm ML 2023-03-31 10:31:35 -05:00
core The Algorithm ML 2023-03-31 10:31:35 -05:00
images The Algorithm ML 2023-03-31 10:31:35 -05:00
machines The Algorithm ML 2023-03-31 10:31:35 -05:00
metrics The Algorithm ML 2023-03-31 10:31:35 -05:00
ml_logging The Algorithm ML 2023-03-31 10:31:35 -05:00
optimizers The Algorithm ML 2023-03-31 10:31:35 -05:00
projects The Algorithm ML 2023-03-31 10:31:35 -05:00
reader The Algorithm ML 2023-03-31 10:31:35 -05:00
tools The Algorithm ML 2023-03-31 10:31:35 -05:00
.gitignore The Algorithm ML 2023-03-31 10:31:35 -05:00
.pre-commit-config.yaml The Algorithm ML 2023-03-31 10:31:35 -05:00
LICENSE.torchrec The Algorithm ML 2023-03-31 10:31:35 -05:00
model.py The Algorithm ML 2023-03-31 10:31:35 -05:00
pyproject.toml The Algorithm ML 2023-03-31 10:31:35 -05:00
README.md The Algorithm ML 2023-03-31 10:31:35 -05:00

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

Note these are released to be open about our recommendation system. However, these are not supported Twitter products and we are unable to provide support for the use of this code.

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.