Source code for Twitter's Recommendation Algorithm
Go to file
2023-04-01 17:14:02 -05: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 Twitter's Recommendation Algorithm - Heavy Ranker and TwHIN embeddings 2023-03-31 13:05:14 -05: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 Improving README Formatting and Clarity for Increased Accessibility 2023-04-01 17:14:02 -05:00

Twitter Machine Learning models

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

Models

Currently these are:

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

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

Installation

To install this project, follow these steps:

  1. Clone the repository to your local machine.

  2. Navigate to the project directory.

  3. Run the following command to set up a Python virtual environment:

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

Note: This command is only supported on Linux machines.

  1. Follow the instructions provided in the READMEs of each project to run the desired model.

Note:

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.

Contributing

To contribute to this project, please follow these steps:

  1. Submit a bug report or feature request via the issue tracker.
  2. Fork the repository and make your changes on a new branch.
  3. Submit a pull request with your changes.

License

This project is licensed under the [insert license here]. Copyright (c) [insert copyright information].

Resources