the-algorithm-ml README

The project's README from github.com/twitter/the-algorithm-ml. As one markdown file: README.md.

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.

the-algorithm-ml (twitter/the-algorithm-ml)

Searching Database…

这是什么?这是 Twitter(现 X)推荐算法的部分源代码,具体来说是用于为“For You”时间线中的内容排序并生成嵌入向量(embedding)的机器学习模型。
这是完整的应用,还是只有机器学习模型的代码?只有机器学习模型的代码,不是可以直接运行的应用或服务。它包含两个独立的项目(Heavy Ranker 和 TwHIN embeddings),各自都有自己的 README 和运行说明。
我该怎么让它运行起来?先创建一个 Python 虚拟环境,然后运行初始化脚本 ./images/initvenv.sh;再按照每个项目文件夹里的 README,了解如何运行对应的模型。
运行这个需要特定的操作系统或硬件吗?它只在 Linux 上测试过。由于依赖 torchrec,最好使用 Nvidia GPU 来运行。
没有 GPU,或者在 Windows/macOS 上,能跑得好吗?官方并不支持。初始化脚本只能在 Linux 上运行,而且 torchrec 依赖让 Nvidia GPU 成为强烈推荐的选择,因此非 Linux 或没有 GPU 的环境不在官方支持的范围内。
这对谁有用?适合想研究或复现 Twitter 推荐信息流背后实际排序和嵌入模型的研究人员和机器学习工程师。
我一定需要 Nvidia GPU 吗?是的,有 Nvidia GPU 效果最好,因为这些模型用到了 torchrec 库。
什么是“Heavy Ranker”?它是用于为“For You”时间线中的内容排序的模型,位于 projects/home/recap 文件夹中。
TwHIN embeddings 是做什么用的?TwHIN(Twitter Heterogeneous Information Network,Twitter 异构信息网络)embeddings 是用户、推文等实体的向量表示,位于 projects/twhin 文件夹中,作为推荐模型的输入。
这是整个 Twitter 推荐系统吗?不是。这个仓库只开源了 Twitter 使用的部分机器学习模型,并不包含完整的端到端推荐流程。
Creator
twitter
Size
0.1 MB
Stars
10.6K
Updated
CommitApr 06
Age
3y
Commits · 90 Days